Codeforces Global Round 14

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
1515 Codeforces Global Round 14 FINISHED False 10800 117300262 May 2, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1052 ) G Phoenix and Odometers PROGRAMMING dfs and similar graphs math number theory

B"In Fire City, there are n intersections and m one-way roads. The i -th road goes from intersection a_i to b_i and has length l_i miles. There are q cars that may only drive along those roads. The i -th car starts at intersection v_i and has an odometer that begins at s_i , increments for each mile driven, and resets to 0 whenever it reaches t_i . Phoenix has been tasked to drive cars along some roads (possibly none) and return them to their initial intersection with the odometer showing 0 . For each car, please find if this is possible. A car may visit the same road or intersection an arbitrary number of times. The odometers don't stop counting the distance after resetting, so odometers may also be reset an arbitrary number of times. The first line of the input contains two integers n and m ( 2 <= n <= 2 cdot 10^5 ; 1 <= m <= 2 cdot 10^5 ) -- the number of intersections and the number of roads, respectively. Each of the next m lines contain three integers a_i , b_i , and l_i ( 1 <= a_i, b_i <= n ; a_i neq b_i ; 1 <= l_i <= 10^9 ) -- the information about the i -th road. The graph is not necessarily connected. It is guaranteed that between any two intersections, there is at most one road for each direction. The next line contains an integer q ( 1 <= q <= 2 cdot 10^5 ) -- the number of cars. Each of the next q lines contains three integers v_i , s_i , and t_i ( 1 <= v_i <= n ; 0 <= s_i < t_i <= 10^9 ) -- the initial intersection of the i -th car, the initial number on the i -th odometer, and the number at which the i -th odometer resets, respectively. Print q answers. If the i -th car's odometer may be reset to 0 by driving through some roads (possibly none) and returning to its starting intersection v_i , print YES. Othe"...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
114982719 AThousandMoon G May 3, 2021, 3:10 a.m. OK GNU C++11 TESTS 64 124 22835200
114984769 xyf007 G May 3, 2021, 3:44 a.m. OK GNU C++11 TESTS 64 124 27136000
114984489 zeyuguo G May 3, 2021, 3:40 a.m. OK GNU C++11 TESTS 64 139 22835200
114979238 fishcathu. G May 3, 2021, 1:55 a.m. OK GNU C++11 TESTS 64 139 28057600
114981608 1443356159 G May 3, 2021, 2:48 a.m. OK GNU C++11 TESTS 64 139 35225600
114977318 Newbie_Rainbow_sjy G May 3, 2021, 1:04 a.m. OK GNU C++11 TESTS 64 140 36761600
114983737 haojiandan G May 3, 2021, 3:27 a.m. OK GNU C++11 TESTS 64 187 31027200
114983651 Capitalist_Wang G May 3, 2021, 3:26 a.m. OK GNU C++11 TESTS 64 217 30720000
114980537 deafff G May 3, 2021, 2:25 a.m. OK GNU C++11 TESTS 64 234 19251200
114982892 luogu_bot3 G May 3, 2021, 3:13 a.m. OK GNU C++11 TESTS 64 234 29696000
114984023 tzxydby G May 3, 2021, 3:32 a.m. OK GNU C++14 TESTS 64 311 27443200
114964557 BSBandme G May 2, 2021, 7:28 p.m. OK GNU C++14 TESTS 64 373 59494400
114965764 SuperJ6 G May 2, 2021, 7:50 p.m. OK GNU C++14 TESTS 64 374 31539200
114953078 al3xstr33t G May 2, 2021, 5:15 p.m. OK GNU C++14 TESTS 64 374 32051200
114954658 caoyue G May 2, 2021, 5:22 p.m. OK GNU C++14 TESTS 64 389 48025600
114953811 yijan G May 2, 2021, 5:18 p.m. OK GNU C++14 TESTS 64 389 63078400
114953845 tmwilliamlin168 G May 2, 2021, 5:19 p.m. OK GNU C++14 TESTS 64 404 31436800
114962702 krismaz G May 2, 2021, 7:05 p.m. OK GNU C++14 TESTS 64 452 40243200
114978752 AhoCorasick G May 3, 2021, 1:45 a.m. OK GNU C++14 TESTS 64 514 23756800
114953520 AwakeAnay G May 2, 2021, 5:17 p.m. OK GNU C++14 TESTS 64 967 52428800
114985007 sd0061 G May 3, 2021, 3:47 a.m. OK GNU C++17 TESTS 64 312 27545600
114973681 JustasZ G May 2, 2021, 10:53 p.m. OK GNU C++17 TESTS 64 327 29081600
114981789 Flying2021 G May 3, 2021, 2:52 a.m. OK GNU C++17 TESTS 64 327 31027200
114973207 YeongTree G May 2, 2021, 10:40 p.m. OK GNU C++17 TESTS 64 342 25190400
114995068 tenkei G May 3, 2021, 5:47 a.m. OK GNU C++17 TESTS 64 343 25395200
114956351 sd0061 G May 2, 2021, 5:29 p.m. OK GNU C++17 TESTS 64 358 27545600
114968884 Luca G May 2, 2021, 8:43 p.m. OK GNU C++17 TESTS 64 373 29798400
114985117 yugurt G May 3, 2021, 3:49 a.m. OK GNU C++17 TESTS 64 374 36454400
114952741 mshcherba G May 2, 2021, 5:14 p.m. OK GNU C++17 TESTS 64 374 39731200
114962181 Egor.Lifar G May 2, 2021, 7 p.m. OK GNU C++17 TESTS 64 374 42598400
114986184 DQ9911 G May 3, 2021, 4:04 a.m. OK GNU C++17 (64) TESTS 64 295 33996800
114973348 Nanored G May 2, 2021, 10:44 p.m. OK GNU C++17 (64) TESTS 64 295 44953600
114985548 compute G May 3, 2021, 3:55 a.m. OK GNU C++17 (64) TESTS 64 296 65536000
114972437 Nanored G May 2, 2021, 10:18 p.m. OK GNU C++17 (64) TESTS 64 311 40652800
114995877 triple__a G May 3, 2021, 5:54 a.m. OK GNU C++17 (64) TESTS 64 311 55193600
114964588 RCG G May 2, 2021, 7:28 p.m. OK GNU C++17 (64) TESTS 64 311 68915200
114969496 MarcosK G May 2, 2021, 8:56 p.m. OK GNU C++17 (64) TESTS 64 312 38604800
114957131 Hyperbolic G May 2, 2021, 5:32 p.m. OK GNU C++17 (64) TESTS 64 312 44339200
114973753 Nanored G May 2, 2021, 10:56 p.m. OK GNU C++17 (64) TESTS 64 312 44953600
114971188 WeakestTopology G May 2, 2021, 9:40 p.m. OK GNU C++17 (64) TESTS 64 327 39116800
114954957 uwi G May 2, 2021, 5:23 p.m. OK Java 11 TESTS 64 592 87347200
114954371 insert_cool_handle G May 2, 2021, 5:21 p.m. OK Java 11 TESTS 64 1092 124825600
114953266 fetetriste G May 2, 2021, 5:16 p.m. OK Java 8 TESTS 64 498 67379200
114952287 Tlatoani G May 2, 2021, 5:12 p.m. OK Kotlin TESTS 64 1138 92979200
114962355 Seyaua G May 2, 2021, 7:02 p.m. OK MS C++ 2017 TESTS 64 1169 37068800
114991678 sh1194 G May 3, 2021, 5:13 a.m. OK PyPy 3 TESTS 64 888 80486400
114980415 titia G May 3, 2021, 2:22 a.m. OK PyPy 3 TESTS 64 904 80179200
114991992 sh1194 G May 3, 2021, 5:16 a.m. OK PyPy 3 TESTS 64 950 80588800
114992265 sh1194 G May 3, 2021, 5:19 a.m. OK PyPy 3 TESTS 64 1138 83251200
114953245 conqueror_of_tourist G May 2, 2021, 5:16 p.m. OK PyPy 3 TESTS 64 1856 80896000
114960638 sansen G May 2, 2021, 6:49 p.m. OK Rust TESTS 64 202 59801600

remove filters

Back to search problems