Codeforces Round 594 (Div. 1)

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
1239 Codeforces Round 594 (Div. 1) FINISHED False 7200 165617663 Oct. 20, 2019, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1582 ) C Queue in the Train PROGRAMMING data structures greedy implementation 2300

B"There are n seats in the train's car and there is exactly one passenger occupying every seat. The seats are numbered from 1 to n from left to right. The trip is long, so each passenger will become hungry at some moment of time and will go to take boiled water for his noodles. The person at seat i ( 1 <= q i <= q n ) will decide to go for boiled water at minute t_i . Tank with a boiled water is located to the left of the 1 -st seat. In case too many passengers will go for boiled water simultaneously, they will form a queue, since there can be only one passenger using the tank at each particular moment of time. Each passenger uses the tank for exactly p minutes. We assume that the time it takes passengers to go from their seat to the tank is negligibly small. Nobody likes to stand in a queue. So when the passenger occupying the i -th seat wants to go for a boiled water, he will first take a look on all seats from 1 to i - 1 . In case at least one of those seats is empty, he assumes that those people are standing in a queue right now, so he would be better seating for the time being. However, at the very first moment he observes that all seats with numbers smaller than i are busy, he will go to the tank. There is an unspoken rule, that in case at some moment several people can go to the tank, than only the leftmost of them (that is, seating on the seat with smallest number) will go to the tank, while all others will wait for the next moment. Your goal is to find for each passenger, when he will receive the boiled water for his noodles. The first line contains integers n and p ( 1 <= q n <= q 100 ,000 , 1 <= q p <= q 10^9 ) -- the number of people and the amount of time one person uses the tank. The second line contains n integers t_1, t_2, ... , t_n ( 0 <= q t_i <= q 10^9 ) -- the moments when the corresponding passenger will go for the boiled water. P"...

Tutorials

Editorial of Codeforces Round #594 (on the problems of Moscow Team Olympiad)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
63065661 luogu_bot2 C Oct. 21, 2019, 10:45 a.m. OK GNU C++11 TESTS 42 61 5427200 2300
63081840 HiOkami C Oct. 21, 2019, 3:21 p.m. OK GNU C++11 TESTS 42 62 2662400 2300
63076079 BeNoble C Oct. 21, 2019, 1:44 p.m. OK GNU C++11 TESTS 42 62 2764800 2300
64717552 Depth_First_Search C Nov. 11, 2019, 11:56 p.m. OK GNU C++11 TESTS 42 62 3788800 2300
63101127 ZYyboT C Oct. 22, 2019, 12:39 a.m. OK GNU C++11 TESTS 42 62 5529600 2300
62988525 disposrestfuIIy C Oct. 20, 2019, 9:33 a.m. OK GNU C++11 TESTS 42 62 8192000 2300
68039710 geneanlyz C Jan. 1, 2020, 1:44 p.m. OK GNU C++11 TESTS 42 77 2662400 2300
64180903 luojinyao C Nov. 4, 2019, 12:29 a.m. OK GNU C++11 TESTS 42 77 3072000 2300
63364477 BFLSTiger C Oct. 25, 2019, 6:58 a.m. OK GNU C++11 TESTS 42 77 3072000 2300
63623985 aahh C Oct. 28, 2019, 2:03 a.m. OK GNU C++11 TESTS 42 77 5734400 2300
63195543 hellomath C Oct. 22, 2019, 6:28 p.m. OK GNU C++14 TESTS 42 78 2662400 2300
66488387 liouzhou_101 C Dec. 8, 2019, 7:30 a.m. OK GNU C++14 TESTS 42 93 2969600 2300
63003639 oridya_fan C Oct. 20, 2019, 10:43 a.m. OK GNU C++14 TESTS 42 93 2969600 2300
63092877 860579 C Oct. 21, 2019, 7:13 p.m. OK GNU C++14 TESTS 42 93 3072000 2300
63013149 jell C Oct. 20, 2019, 12:12 p.m. OK GNU C++14 TESTS 42 93 3072000 2300
62993885 KaykAykaY C Oct. 20, 2019, 9:55 a.m. OK GNU C++14 TESTS 42 93 3481600 2300
63903592 gs15120 C Oct. 31, 2019, 5:46 a.m. OK GNU C++14 TESTS 42 93 3891200 2300
63248845 qpzm C Oct. 23, 2019, 3:24 p.m. OK GNU C++14 TESTS 42 93 4300800 2300
63555249 daniel14311531 C Oct. 27, 2019, 12:42 p.m. OK GNU C++14 TESTS 42 93 6451200 2300
63064076 dev_cpp C Oct. 21, 2019, 10:04 a.m. OK GNU C++14 TESTS 42 93 6758400 2300
64720105 Ronnie007 C Nov. 12, 2019, 2:48 a.m. OK GNU C++17 TESTS 42 92 3379200 2300
66622137 codekode C Dec. 11, 2019, 7:26 a.m. OK GNU C++17 TESTS 42 93 2662400 2300
63052357 gina0605 C Oct. 21, 2019, 3:37 a.m. OK GNU C++17 TESTS 42 93 3072000 2300
65152639 penguin1017 C Nov. 16, 2019, 8:09 a.m. OK GNU C++17 TESTS 42 93 3174400 2300
63493482 zzyhuajuan C Oct. 26, 2019, 2:56 p.m. OK GNU C++17 TESTS 42 93 3379200 2300
68486773 segmentfault C Jan. 10, 2020, 10:04 a.m. OK GNU C++17 TESTS 42 93 3481600 2300
63441841 HelloCodeforce C Oct. 26, 2019, 11:12 a.m. OK GNU C++17 TESTS 42 93 3481600 2300
63303882 jyf111 C Oct. 24, 2019, 3:02 p.m. OK GNU C++17 TESTS 42 93 3584000 2300
63002351 klimmek55 C Oct. 20, 2019, 10:37 a.m. OK GNU C++17 TESTS 42 93 3788800 2300
64050172 jschr C Nov. 1, 2019, 9:10 p.m. OK GNU C++17 TESTS 42 93 3993600 2300
64327043 Ahmad C Nov. 5, 2019, 5:43 p.m. OK Java 8 TESTS 42 265 7475200 2300
63025664 fetetriste C Oct. 20, 2019, 4:10 p.m. OK Java 8 TESTS 42 280 5529600 2300
63025486 fetetriste C Oct. 20, 2019, 4:07 p.m. OK Java 8 TESTS 42 280 5529600 2300
62999323 ilyakor C Oct. 20, 2019, 10:22 a.m. OK Java 8 TESTS 42 295 6144000 2300
63003139 dalt C Oct. 20, 2019, 10:41 a.m. OK Java 8 TESTS 42 327 7168000 2300
62999844 Nutella3000 C Oct. 20, 2019, 10:24 a.m. OK Java 8 TESTS 42 342 6860800 2300
63092154 aminul C Oct. 21, 2019, 6:54 p.m. OK Java 8 TESTS 42 405 2867200 2300
62994756 SergeyMelnikov C Oct. 20, 2019, 9:59 a.m. OK Java 8 TESTS 42 436 12083200 2300
64302428 yudedako C Nov. 5, 2019, 10:30 a.m. OK Kotlin TESTS 42 405 8192000 2300
62991428 knightL C Oct. 20, 2019, 9:44 a.m. OK Kotlin TESTS 42 467 13004800 2300
65082614 vjudge5 C Nov. 15, 2019, 5:03 p.m. OK MS C++ TESTS 42 109 7168000 2300
63251429 Fakerone C Oct. 23, 2019, 4:12 p.m. OK MS C++ 2017 TESTS 42 124 6451200 2300
63247434 Fakerone C Oct. 23, 2019, 3:03 p.m. OK MS C++ 2017 TESTS 42 140 7270400 2300
63778999 dbelov C Oct. 30, 2019, 10:28 a.m. OK MS C++ 2017 TESTS 42 218 7884800 2300
63006220 zjuwyz C Oct. 20, 2019, 10:55 a.m. OK MS C++ 2017 TESTS 42 296 12697600 2300
62996923 Kirundel C Oct. 20, 2019, 10:10 a.m. OK MS C++ 2017 TESTS 42 390 13107200 2300
63010626 kabeer27 C Oct. 20, 2019, 11:41 a.m. OK PyPy 2 TESTS 42 592 18534400 2300
63129613 MVP C Oct. 22, 2019, 1:48 p.m. OK PyPy 2 TESTS 42 873 22835200 2300
63129359 MVP C Oct. 22, 2019, 1:43 p.m. OK PyPy 2 TESTS 42 919 21094400 2300
63128081 MVP C Oct. 22, 2019, 1:24 p.m. OK PyPy 2 TESTS 42 920 20070400 2300
63129565 MVP C Oct. 22, 2019, 1:47 p.m. OK PyPy 2 TESTS 42 982 21708800 2300
63129679 MVP C Oct. 22, 2019, 1:49 p.m. OK Python 2 TESTS 42 904 13004800 2300
65765268 sansen C Nov. 26, 2019, 5:38 p.m. OK Rust TESTS 42 78 9830400 2300
63125479 yakamoto C Oct. 22, 2019, 12:41 p.m. OK Scala TESTS 42 904 13824000 2300

remove filters

Back to search problems