Contest 2050 and Codeforces Round 718 (Div. 1 + Div. 2)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
1517 Contest 2050 and Codeforces Round 718 (Div. 1 + Div. 2) FINISHED False 9900 117991463 April 23, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 75 ) H Fly Around the World PROGRAMMING dp dp dp dp geometry geometry

B"After hearing the story of Dr. Zhang, Wowo decides to plan his own flight around the world. He already chose n checkpoints in the world map. Due to the landform and the clouds, he cannot fly too high or too low. Formally, let b_i be the height of Wowo's aircraft at checkpoint i , x_i^- <= b_i <= x_i^+ should be satisfied for all integers i between 1 and n , where x_i^- and x_i^+ are given integers. The angle of Wowo's aircraft is also limited. For example, it cannot make a 90 -degree climb. Formally, y_i^- <= b_i-b_{i-1} <= y_i^+ should be satisfied for all integers i between 2 and n , where y_i^- and y_i^+ are given integers. The final limitation is the speed of angling up or angling down. An aircraft should change its angle slowly for safety concerns. Formally, z_i^- <= (b_i - b_{i-1}) - (b_{i-1} - b_{i-2}) <= z_i^+ should be satisfied for all integers i between 3 and n , where z_i^- and z_i^+ are given integers. Taking all these into consideration, Wowo finds that the heights at checkpoints are too hard for him to choose. Please help Wowo decide whether there exists a sequence of real numbers b_1, ldots, b_n satisfying all the contraints above. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 66 ,666 ). Description of the test cases follows. The first line of each test case contains a single integer n ( 3 <= n <= 100 ,000 ). The i -th of the next n lines contains two integers x_i^- , x_i^+ ( -10^8 <= x_i^- <= x_i^+ <= 10^8 ) denoting the lower and upper bound of b_i . The i -th of the next n-1 lines contains two integers y_{i+1}^- , y_{i+1}^+ ( -10^8 <= y_{i+1}^- <= y_{i+1}^+ <= 10^8 ) denoting the lower and upper bound of b_{i+1}-b_i . The i -th of the next n-2 lines "...

Tutorials

Contest 2050 and Codeforces Round #718 (Div.1 + Div.2) Editorial

Submissions

No solutions yet.