block u to impede v is an arrangement u=x0→x1→x2→⋯→xk=v, where there is a street from block xi−1 to obstruct 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 recollects the two unique numbers L and R yet fails to remember the numbers
Correct answer will be upvoted else downvoted. Computer science.
way from block u to impede v is an arrangement u=x0→x1→x2→⋯→xk=v, where there is a street from block xi−1 to obstruct 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 recollects the two unique 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 (on the grounds 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 view 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)- ceaseless city inside 32 squares, print "NO" in a solitary line.
In any case, print "YES" in the primary line followed by a depiction of a (L,R)- ceaseless city.
The subsequent line ought to contain two integers n (2≤n≤32) and m (1≤m≤n(n−1)2), where n signifies the number of squares and m means 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≤
Step by step
Solved in 3 steps with 1 images