block u to obstruct v is a grouping u=x0→x1→x2→⋯→xk=v, where there is a street from block xi−1 to hinder xi for each 1≤i≤k. The length of a way is the amount of lengths over all streets in the way. Two ways x0→x1→⋯→xk and y0→y1→⋯→yl are unique, if k≠l or xi≠yi for some 0≤i≤min{k,l}.    Subsequent to moving to

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

Correct answer will be upvoted else downvoted. Computer science.

 

 way from block u to obstruct v is a grouping u=x0→x1→x2→⋯→xk=v, where there is a street from block xi−1 to hinder xi for each 1≤i≤k. The length of a way is the amount of lengths over all streets in the way. Two ways x0→x1→⋯→xk and y0→y1→⋯→yl are unique, if k≠l or xi≠yi for some 0≤i≤min{k,l}. 

 

Subsequent to moving to another city, Homer just recalls the two exceptional numbers L and R yet fails to remember the numbers n and m of squares and streets, separately, and how squares are associated by streets. Be that as it may, he accepts the number of squares ought to be no bigger than 32 (in light of the fact that the city was little). 

 

As the dearest companion of Homer, if it's not too much trouble, let him know whether it is feasible to see as a (L,R)- constant city or not. 

 

Input 

 

The single line contains two integers L and R (1≤L≤R≤106). 

 

Output 

 

In case it is difficult to track down a (L,R)- consistent city inside 32 squares, print "NO" in a solitary line. 

 

In any case, print "YES" in the principal line followed by a depiction of a (L,R)- constant city. 

 

The subsequent line ought to contain two integers n (2≤n≤32) and m (1≤m≤n(n−1)2), where n means the number of squares and m indicates the number of streets. 

 

Then, at that point, m lines follow. The I-th of the m lines ought to contain three integers simulated intelligence, bi (1≤ai<bi≤n) and ci (1≤ci≤106) demonstrating that there is a guided street from block artificial intelligence to impede bi of length ci.

 

 

Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY