Codeforces Global Round 15

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
1552 Codeforces Global Round 15 FINISHED False 9900 110042663 July 25, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2993 ) F Telepanting PROGRAMMING binary search data structures dp sortings

B'An ant moves on the real line with constant speed of 1 unit per second. It starts at 0 and always moves to the right (so its position increases by 1 each second). There are n portals, the i -th of which is located at position x_i and teleports to position y_i < x_i . Each portal can be either active or inactive. The initial state of the i -th portal is determined by s_i : if s_i=0 then the i -th portal is initially inactive, if s_i=1 then the i -th portal is initially active. When the ant travels through a portal (i.e., when its position coincides with the position of a portal): How long (from the instant it starts moving) does it take for the ant to reach the position x_n + 1 ? It can be shown that this happens in a finite amount of time. Since the answer may be very large, compute it modulo 998 ,244 ,353 . The first line contains the integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of portals. The i -th of the next n lines contains three integers x_i , y_i and s_i ( 1 <= y_i < x_i <= 10^9 , s_i in {0,1 } ) -- the position of the i -th portal, the position where the ant is teleported when it travels through the i -th portal (if it is active), and the initial state of the i -th portal. The positions of the portals are strictly increasing, that is x_1<x_2< cdots<x_n . It is guaranteed that the 2n integers x_1, , x_2, , ... , , x_n, , y_1, , y_2, , ... , , y_n are all distinct. Output the amount of time elapsed, in seconds, from the instant the ant starts moving to the instant it reaches the position x_n+1 . Since the answer may be very large, output it modulo 998 ,244 ,353 . Explanation of the first sample: The ant moves as follows (a curvy arrow denotes a teleporting, a straight arrow denotes normal movement with speed 1 and the time spent during the movement is written'...

Tutorials

Editorial of Global Round 15

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
123760176 Gassa F July 25, 2021, 4:52 p.m. OK D TESTS 60 576 23756800
123779931 rainboy F July 25, 2021, 9:06 p.m. OK GNU C11 TESTS 61 109 6860800
123764205 Backseat-Stargazer F July 25, 2021, 5:09 p.m. OK GNU C++11 TESTS 60 46 9011200
123755264 hangyesheng F July 25, 2021, 4:31 p.m. OK GNU C++11 TESTS 60 62 7884800
123755711 fallleaves01 F July 25, 2021, 4:33 p.m. OK GNU C++11 TESTS 60 62 8908800
123796074 idxcalcal F July 26, 2021, 4:30 a.m. OK GNU C++11 TESTS 61 62 9216000
123764002 Katou_Umi F July 25, 2021, 5:08 p.m. OK GNU C++11 TESTS 60 77 8908800
123761743 ZAwei F July 25, 2021, 4:59 p.m. OK GNU C++11 TESTS 60 77 9523200
123758461 guapisolo F July 25, 2021, 4:45 p.m. OK GNU C++11 TESTS 60 77 11673600
123762974 jxm2001 F July 25, 2021, 5:04 p.m. OK GNU C++11 TESTS 60 77 11878400
123767451 wind_cross F July 25, 2021, 5:19 p.m. OK GNU C++11 TESTS 60 78 11673600
123757212 c8kbf F July 25, 2021, 4:39 p.m. OK GNU C++11 TESTS 60 78 11878400
123793325 LptN21 F July 26, 2021, 3:36 a.m. OK GNU C++14 TESTS 61 140 7168000
123754351 ZigZagK F July 25, 2021, 4:28 p.m. OK GNU C++14 TESTS 60 140 7680000
123769523 cscscs F July 25, 2021, 6:01 p.m. OK GNU C++14 TESTS 60 140 12185600
123754983 Daredemo_Daisuki F July 25, 2021, 4:30 p.m. OK GNU C++14 TESTS 60 140 31846400
123761951 visiteur F July 25, 2021, 4:59 p.m. OK GNU C++14 TESTS 60 156 5427200
123769458 doublefire F July 25, 2021, 6:01 p.m. OK GNU C++14 TESTS 60 171 18124800
123766249 antguz F July 25, 2021, 5:16 p.m. OK GNU C++14 TESTS 60 186 7782400
123755806 Huah2 F July 25, 2021, 4:33 p.m. OK GNU C++14 TESTS 60 186 16588800
123779335 smasHR F July 25, 2021, 8:49 p.m. OK GNU C++14 TESTS 60 187 6963200
123793748 Zinn F July 26, 2021, 3:45 a.m. OK GNU C++14 TESTS 61 187 8601600
123758746 aa2985759 F July 25, 2021, 4:46 p.m. OK GNU C++17 TESTS 60 124 10137600
123764371 CSHwang F July 25, 2021, 5:09 p.m. OK GNU C++17 TESTS 60 139 6963200
123758827 ljcleo F July 25, 2021, 4:46 p.m. OK GNU C++17 TESTS 60 140 6963200
123778679 krijgertje F July 25, 2021, 8:33 p.m. OK GNU C++17 TESTS 60 140 7782400
123763003 Frank_DD F July 25, 2021, 5:04 p.m. OK GNU C++17 TESTS 60 140 8499200
123754221 AquaBlaze F July 25, 2021, 4:27 p.m. OK GNU C++17 TESTS 60 140 8601600
123753668 Clix F July 25, 2021, 4:25 p.m. OK GNU C++17 TESTS 60 140 31846400
123769223 skywalkert F July 25, 2021, 5:59 p.m. OK GNU C++17 TESTS 60 155 7782400
123762093 yan_qiu_ynlchrz F July 25, 2021, 5 p.m. OK GNU C++17 TESTS 60 155 7782400
123758494 skyh F July 25, 2021, 4:45 p.m. OK GNU C++17 TESTS 60 155 7884800
123761896 xyf007 F July 25, 2021, 4:59 p.m. OK GNU C++17 (64) TESTS 60 77 9420800
123772102 0xC0DEF F July 25, 2021, 6:29 p.m. OK GNU C++17 (64) TESTS 60 77 33382400
123772137 ainta F July 25, 2021, 6:30 p.m. OK GNU C++17 (64) TESTS 60 109 16384000
123772454 DmitryLzr F July 25, 2021, 6:34 p.m. OK GNU C++17 (64) TESTS 60 124 7475200
123776636 rgnerdplayer F July 25, 2021, 7:47 p.m. OK GNU C++17 (64) TESTS 60 124 8294400
123769135 kitsune F July 25, 2021, 5:59 p.m. OK GNU C++17 (64) TESTS 60 124 8294400
123761986 WeakestTopology F July 25, 2021, 5 p.m. OK GNU C++17 (64) TESTS 60 124 8294400
123755370 DeadlyCritic F July 25, 2021, 4:32 p.m. OK GNU C++17 (64) TESTS 60 124 8294400
123754651 Arch_of_Triumph F July 25, 2021, 4:29 p.m. OK GNU C++17 (64) TESTS 60 124 8294400
123787366 wmRdIXOc F July 26, 2021, 1:28 a.m. OK GNU C++17 (64) TESTS 61 124 8396800
123757539 lucasr F July 25, 2021, 4:41 p.m. OK Java 11 TESTS 60 421 31232000
123756262 cirno3153 F July 25, 2021, 4:35 p.m. OK Java 11 TESTS 60 530 42086400
123764042 nick_301 F July 25, 2021, 5:08 p.m. OK Java 11 TESTS 60 810 69017600
123754025 Justyo F July 25, 2021, 4:26 p.m. OK Java 11 TESTS 60 997 59187200
123787566 SecondThread F July 26, 2021, 1:33 a.m. OK Java 8 TESTS 61 420 36556800
123766803 dandoh F July 25, 2021, 5:18 p.m. OK Kotlin TESTS 60 342 24780800
123762842 alexey.enkov F July 25, 2021, 5:03 p.m. OK Kotlin TESTS 60 498 41267200
123766625 r57shell F July 25, 2021, 5:17 p.m. OK MS C++ TESTS 60 124 7884800
123770815 TonySnark F July 25, 2021, 6:13 p.m. OK MS C++ 2017 TESTS 60 311 27852800
123765530 kim_young_hyun F July 25, 2021, 5:14 p.m. OK MS C++ 2017 TESTS 60 343 27238400
123760480 new_acc_ F July 25, 2021, 4:53 p.m. OK MS C++ 2017 TESTS 60 592 13414400
123769238 danilgrig F July 25, 2021, 6 p.m. OK MS C++ 2017 TESTS 60 967 36966400
123764925 azukun F July 25, 2021, 5:12 p.m. OK .NET Core C# TESTS 60 311 29900800
123776755 TheNoOneCoder F July 25, 2021, 7:50 p.m. OK PyPy 3 TESTS 60 405 56217600
123775307 TheNoOneCoder F July 25, 2021, 7:23 p.m. OK PyPy 3 TESTS 60 420 54681600
123776706 TheNoOneCoder F July 25, 2021, 7:49 p.m. OK PyPy 3 TESTS 60 436 54988800
123775293 TheNoOneCoder F July 25, 2021, 7:22 p.m. OK PyPy 3 TESTS 60 452 54784000
123772507 ayaoni F July 25, 2021, 6:35 p.m. OK PyPy 3 TESTS 60 592 31641600
123769537 eepsilon F July 25, 2021, 6:02 p.m. OK PyPy 3 TESTS 60 608 34099200
123763556 ayaoni F July 25, 2021, 5:06 p.m. OK PyPy 3 TESTS 60 733 50790400
123754077 NecroSean38 F July 25, 2021, 4:26 p.m. OK PyPy 3 TESTS 60 826 49664000
123765488 aberent F July 25, 2021, 5:14 p.m. OK PyPy 3 TESTS 60 826 57548800
123755328 shotoyoo F July 25, 2021, 4:31 p.m. OK PyPy 3 TESTS 60 873 181350400
123754170 nwi F July 25, 2021, 4:27 p.m. OK Python 2 TESTS 60 982 42291200
123770183 r57shell F July 25, 2021, 6:07 p.m. OK Python 3 TESTS 60 623 25497600
123780812 belkka F July 25, 2021, 9:32 p.m. OK Python 3 TESTS 61 982 28774400
123765367 belkka F July 25, 2021, 5:13 p.m. OK Python 3 TESTS 60 1013 32870400
123757160 kobae964 F July 25, 2021, 4:39 p.m. OK Rust TESTS 60 249 13721600

remove filters

Back to search problems