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.
Problems
B"This problem was copied by the author from another online platform. Codeforces strongly condemns this action and therefore further submissions to this problem are not accepted. Debajyoti has a very important meeting to attend and he is already very late. Harsh, his driver, needs to take Debajyoti to the destination for the meeting as fast as possible. Harsh needs to pick up Debajyoti from his home and take him to the destination so that Debajyoti can attend the meeting in time. A straight road with n traffic lights connects the home and the destination for the interview. The traffic lights are numbered in order from 1 to n . Each traffic light cycles after t seconds. The i -th traffic light is color{green}{ text{green}} (in which case Harsh can cross the traffic light) for the first g_i seconds, and color{red}{ text{red}} (in which case Harsh must wait for the light to turn color{green}{ text{green}} ) for the remaining (t xe2 x88 x92g_i) seconds, after which the pattern repeats. Each light's cycle repeats indefinitely and initially, the i -th light is c_i seconds into its cycle (a light with c_i=0 has just turned color{green}{ text{green}} ). In the case that Harsh arrives at a light at the same time it changes colour, he will obey the new colour. Formally, the i -th traffic light is color{green}{ text{green}} from [0,g_i) and color{red}{ text{red}} from [g_i,t) (after which it repeats the cycle). The i -th traffic light is initially at the c_i -th second of its cycle. From the i -th traffic light, exactly d_i seconds are required to travel to the next traffic light (that is to the (i+1) -th light). Debajyoti's home is located just before the first light and Debajyoti drops for the interview as soon as he passes the n -th light. In other words, no time is required to reach the first light from Debajyoti's home or to reach"... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
171155951 |
Chinese_zjc_ |
F |
Sept. 6, 2022, 5:55 p.m. |
OK |
GNU C++14 |
TESTS |
41 |
358 |
13926400 |
|
|
171145910 |
dlalswp25 |
F |
Sept. 6, 2022, 4:38 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
390 |
10752000 |
|
|
171183813 |
Hongzy |
F |
Sept. 7, 2022, 1:43 a.m. |
OK |
GNU C++14 |
TESTS |
41 |
701 |
140185600 |
|
|
171144182 |
feecIe6418 |
F |
Sept. 6, 2022, 4:34 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
795 |
100556800 |
|
|
171185343 |
DataStructures |
F |
Sept. 7, 2022, 2:15 a.m. |
OK |
GNU C++14 |
TESTS |
41 |
1091 |
64102400 |
|
|
171164329 |
Lily |
F |
Sept. 6, 2022, 7:05 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
343 |
16281600 |
|
|
171162840 |
fallleaves07 |
F |
Sept. 6, 2022, 6:50 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
389 |
18329600 |
|
|
171154777 |
upobir |
F |
Sept. 6, 2022, 5:49 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
420 |
21094400 |
|
|
171162212 |
Lightnessqwq |
F |
Sept. 6, 2022, 6:44 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
421 |
18636800 |
|
|
171157117 |
Devesh._.Gautam |
F |
Sept. 6, 2022, 6:03 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
482 |
22425600 |
|
|
171186104 |
Gracey |
F |
Sept. 7, 2022, 2:32 a.m. |
OK |
GNU C++17 |
TESTS |
41 |
483 |
29900800 |
|
|
171186092 |
Gracey |
F |
Sept. 7, 2022, 2:32 a.m. |
OK |
GNU C++17 |
TESTS |
41 |
530 |
29900800 |
|
|
171149185 |
kizen |
F |
Sept. 6, 2022, 4:46 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
732 |
61952000 |
|
|
171185049 |
JOHNKRAM |
F |
Sept. 7, 2022, 2:09 a.m. |
OK |
GNU C++17 |
TESTS |
41 |
732 |
246067200 |
|
|
171159634 |
JOHNKRAM |
F |
Sept. 6, 2022, 6:22 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
733 |
246886400 |
|
|
171186135 |
yzc2005 |
F |
Sept. 7, 2022, 2:32 a.m. |
OK |
GNU C++17 (64) |
TESTS |
41 |
358 |
30617600 |
|
|
171164185 |
Sana |
F |
Sept. 6, 2022, 7:04 p.m. |
OK |
GNU C++17 (64) |
TESTS |
41 |
436 |
19660800 |
|
|
171146552 |
natsugiri |
F |
Sept. 6, 2022, 4:40 p.m. |
OK |
GNU C++17 (64) |
TESTS |
40 |
452 |
32256000 |
|
|
171193096 |
lqx2005 |
F |
Sept. 7, 2022, 4:54 a.m. |
OK |
GNU C++17 (64) |
TESTS |
41 |
452 |
33792000 |
|
|
171143160 |
Toxel |
F |
Sept. 6, 2022, 4:31 p.m. |
OK |
GNU C++17 (64) |
TESTS |
40 |
514 |
32358400 |
|
|
171147996 |
Juanzhang |
F |
Sept. 6, 2022, 4:43 p.m. |
OK |
GNU C++17 (64) |
TESTS |
40 |
623 |
244940800 |
|
|
171155501 |
tabr |
F |
Sept. 6, 2022, 5:53 p.m. |
OK |
GNU C++17 (64) |
TESTS |
41 |
624 |
42598400 |
|
|
171146710 |
TLEwpdus |
F |
Sept. 6, 2022, 4:40 p.m. |
OK |
GNU C++17 (64) |
TESTS |
40 |
639 |
25907200 |
|
|
171149359 |
zh0ukangyang |
F |
Sept. 6, 2022, 4:47 p.m. |
OK |
GNU C++17 (64) |
TESTS |
40 |
670 |
237465600 |
|
|
171142851 |
mango_lassi |
F |
Sept. 6, 2022, 4:30 p.m. |
OK |
GNU C++17 (64) |
TESTS |
40 |
733 |
41164800 |
|
|
171193167 |
platelet |
F |
Sept. 7, 2022, 4:55 a.m. |
OK |
GNU C++20 (64) |
TESTS |
41 |
139 |
17100800 |
|
|
171192146 |
platelet |
F |
Sept. 7, 2022, 4:38 a.m. |
OK |
GNU C++20 (64) |
TESTS |
41 |
202 |
15462400 |
|
|
171191095 |
platelet |
F |
Sept. 7, 2022, 4:16 a.m. |
OK |
GNU C++20 (64) |
TESTS |
41 |
280 |
16179200 |
|
|
171186218 |
Icecream2001 |
F |
Sept. 7, 2022, 2:35 a.m. |
OK |
GNU C++20 (64) |
TESTS |
41 |
295 |
42291200 |
|
|
171181418 |
nikgaevoy |
F |
Sept. 7, 2022, 12:48 a.m. |
OK |
GNU C++20 (64) |
TESTS |
41 |
312 |
18944000 |
|
|
171190718 |
-is-this-fft- |
F |
Sept. 7, 2022, 4:10 a.m. |
OK |
GNU C++20 (64) |
TESTS |
41 |
327 |
25907200 |
|
|
171150224 |
nikgaevoy |
F |
Sept. 6, 2022, 4:48 p.m. |
OK |
GNU C++20 (64) |
TESTS |
40 |
342 |
18944000 |
|
|
171144702 |
dreamoon_love_AA |
F |
Sept. 6, 2022, 4:35 p.m. |
OK |
GNU C++20 (64) |
TESTS |
40 |
343 |
45260800 |
|
|
171187077 |
smax |
F |
Sept. 7, 2022, 2:55 a.m. |
OK |
GNU C++20 (64) |
TESTS |
41 |
358 |
36659200 |
|
|
171150339 |
Chenyu_Qiu |
F |
Sept. 6, 2022, 4:49 p.m. |
OK |
GNU C++20 (64) |
TESTS |
40 |
374 |
264499200 |
|
|
171177646 |
arvindf232 |
F |
Sept. 6, 2022, 11:06 p.m. |
OK |
Kotlin 1.6 |
TESTS |
41 |
1715 |
23859200 |
|
|
171146622 |
qwerty787788 |
F |
Sept. 6, 2022, 4:40 p.m. |
OK |
Rust 2021 |
TESTS |
40 |
234 |
23449600 |
|
|
171146722 |
sansen |
F |
Sept. 6, 2022, 4:40 p.m. |
OK |
Rust 2021 |
TESTS |
40 |
342 |
20070400 |
|
|
remove filters
Back to search problems