Codeforces Round 551 (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
1153 Codeforces Round 551 (Div. 2) FINISHED False 7200 182015663 April 13, 2019, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11577 ) A Serval and Bus PROGRAMMING brute force math 1100

B"It is raining heavily. But this is the first day for Serval, who just became 3 years old, to go to the kindergarten. Unfortunately, he lives far from kindergarten, and his father is too busy to drive him there. The only choice for this poor little boy is to wait for a bus on this rainy day. Under such circumstances, the poor boy will use the first bus he sees no matter where it goes. If several buses come at the same time, he will choose one randomly. Serval will go to the bus station at time t , and there are n bus routes which stop at this station. For the i -th bus route, the first bus arrives at time s_i minutes, and each bus of this route comes d_i minutes later than the previous one. As Serval's best friend, you wonder which bus route will he get on. If several buses arrive at the same time, you can print any of them. The first line contains two space-separated integers n and t ( 1 <= q n <= q 100 , 1 <= q t <= q 10^5 ) -- the number of bus routes and the time Serval goes to the station. Each of the next n lines contains two space-separated integers s_i and d_i ( 1 <= q s_i,d_i <= q 10^5 ) -- the time when the first bus of this route arrives and the interval between two buses of this route. Print one number -- what bus route Serval will use. If there are several possible answers, you can print any of them. In the first example, the first bus of the first route arrives at time 6 , and the first bus of the second route arrives at time 9 , so the first route is the answer. In the second example, a bus of the third route arrives at time 5 , so it is the answer. In the third example, buses of the first route come at times 2 , 4 , 6 , 8 , and so fourth, buses of the second route come at times 2 , 5 , 8 , and so fourth and buses of the third route come at times 2 , 6 , 10 , and so on, so 1 and 2 are both accept"...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
52716249 armoking A April 13, 2019, 5:33 p.m. OK Clang++17 Diagnostics TESTS 105 46 0 1100
63675928 vjudge3 A Oct. 28, 2019, 6:22 p.m. OK Clang++17 Diagnostics TESTS 105 77 0 1100
53305448 wolframotoya A April 26, 2019, 2:37 a.m. OK Clang++17 Diagnostics TESTS 105 93 0 1100
64640879 LLFMLJ A Nov. 10, 2019, 1:06 p.m. OK Clang++17 Diagnostics TESTS 105 140 0 1100
53090334 vjudge3 A April 21, 2019, 10:54 a.m. OK Clang++17 Diagnostics TESTS 105 187 0 1100
52777991 Denor A April 15, 2019, 12:53 p.m. OK Delphi TESTS 105 46 0 1100
52799798 omlgg A April 16, 2019, 1:58 a.m. OK FPC TESTS 105 31 0 1100
52734168 HQT2003 A April 14, 2019, 5:41 a.m. OK FPC TESTS 105 31 0 1100
53312183 hoangphuc.qti A April 26, 2019, 7:39 a.m. OK FPC TESTS 105 31 307200 1100
52918484 LeoPro A April 17, 2019, 4:47 p.m. OK FPC TESTS 105 31 307200 1100
52700558 i9code A April 13, 2019, 2:59 p.m. OK FPC TESTS 105 31 512000 1100
52725943 d4rkn19ht A April 14, 2019, 12:19 a.m. OK FPC TESTS 105 31 1024000 1100
52700263 bao-gpmn A April 13, 2019, 2:58 p.m. OK FPC TESTS 105 31 1024000 1100
58225702 romanporsh A Aug. 3, 2019, 2:22 p.m. OK FPC TESTS 105 46 0 1100
54221915 katyaabram A May 16, 2019, 3:56 a.m. OK FPC TESTS 105 46 204800 1100
53425119 samau07012005 A April 27, 2019, 1:14 p.m. OK FPC TESTS 105 202 3993600 1100
63677446 vjudge5 A Oct. 28, 2019, 6:47 p.m. OK GNU C11 TESTS 105 31 0 1100
63692203 vjudge5 A Oct. 29, 2019, 3:23 a.m. OK GNU C11 TESTS 105 31 0 1100
65334351 DevJewel A Nov. 19, 2019, 8:11 a.m. OK GNU C11 TESTS 105 31 0 1100
67314462 vjudge4 A Dec. 21, 2019, 5:14 a.m. OK GNU C11 TESTS 105 31 0 1100
68768273 vjudge2 A Jan. 14, 2020, 10:48 a.m. OK GNU C11 TESTS 105 31 0 1100
68768548 liq A Jan. 14, 2020, 10:55 a.m. OK GNU C11 TESTS 105 31 0 1100
68834440 vjudge4 A Jan. 15, 2020, 2 a.m. OK GNU C11 TESTS 105 31 0 1100
68834576 vjudge3 A Jan. 15, 2020, 2:06 a.m. OK GNU C11 TESTS 105 31 0 1100
68840668 vjudge3 A Jan. 15, 2020, 5:40 a.m. OK GNU C11 TESTS 105 31 0 1100
61028959 MDCHARW A Sept. 21, 2019, 5 p.m. OK GNU C11 TESTS 105 31 0 1100
67588361 Retarded_Ape A Dec. 25, 2019, 9:08 a.m. OK GNU C++11 TESTS 105 31 0 1100
67619611 Mahinur A Dec. 25, 2019, 6:10 p.m. OK GNU C++11 TESTS 105 31 0 1100
68593181 aayush_bohra10 A Jan. 11, 2020, 1:16 p.m. OK GNU C++11 TESTS 105 31 0 1100
68618352 vjudge2 A Jan. 11, 2020, 6:24 p.m. OK GNU C++11 TESTS 105 31 0 1100
68711499 luogu_bot1 A Jan. 13, 2020, 1:07 p.m. OK GNU C++11 TESTS 105 31 0 1100
68712294 luogu_bot5 A Jan. 13, 2020, 1:21 p.m. OK GNU C++11 TESTS 105 31 0 1100
68713336 vjudge3 A Jan. 13, 2020, 1:39 p.m. OK GNU C++11 TESTS 105 31 0 1100
68827030 vjudge1 A Jan. 14, 2020, 7:40 p.m. OK GNU C++11 TESTS 105 31 0 1100
68831472 _Kema_ A Jan. 14, 2020, 10:43 p.m. OK GNU C++11 TESTS 105 31 0 1100
69396325 duxinting A Jan. 23, 2020, 6:28 a.m. OK GNU C++11 TESTS 105 31 0 1100
52790449 qsmcgogo A April 15, 2019, 5:02 p.m. OK GNU C++14 TESTS 105 15 0 1100
54885571 pythox A May 31, 2019, 5:04 p.m. OK GNU C++14 TESTS 105 30 0 1100
66148842 vjudge5 A Dec. 1, 2019, 5:56 p.m. OK GNU C++14 TESTS 105 30 0 1100
63662669 shubhChamp A Oct. 28, 2019, 2:19 p.m. OK GNU C++14 TESTS 105 30 0 1100
56388937 sagar_shukla A July 1, 2019, 11:44 a.m. OK GNU C++14 TESTS 105 30 0 1100
55868038 purvilmehta06 A June 21, 2019, 1:12 p.m. OK GNU C++14 TESTS 105 30 0 1100
55070619 arman_ferdous A June 4, 2019, 6:08 a.m. OK GNU C++14 TESTS 105 30 0 1100
54237080 Bignubie A May 16, 2019, 11:17 a.m. OK GNU C++14 TESTS 105 30 0 1100
54167442 SUDAL A May 15, 2019, 9:20 a.m. OK GNU C++14 TESTS 105 30 0 1100
53791387 rika0384 A May 5, 2019, 1:01 p.m. OK GNU C++14 TESTS 105 30 0 1100
54753591 mank_09 A May 28, 2019, 1:58 p.m. OK GNU C++17 TESTS 105 30 0 1100
54868938 kokolen A May 31, 2019, 8:01 a.m. OK GNU C++17 TESTS 105 30 0 1100
54890507 _ifg A May 31, 2019, 7:59 p.m. OK GNU C++17 TESTS 105 30 0 1100
54907434 Avatar21 A June 1, 2019, 9:29 a.m. OK GNU C++17 TESTS 105 30 0 1100
55594281 san9407 A June 15, 2019, 2:08 p.m. OK GNU C++17 TESTS 105 30 0 1100
56155150 infinitepro A June 27, 2019, 9:51 a.m. OK GNU C++17 TESTS 105 30 0 1100
58169821 wtf A Aug. 2, 2019, 10:47 a.m. OK GNU C++17 TESTS 105 30 0 1100
58172359 piyushkhandelwal1009 A Aug. 2, 2019, 11:51 a.m. OK GNU C++17 TESTS 105 30 0 1100
59818832 harsh_daryani A Aug. 31, 2019, 4:28 p.m. OK GNU C++17 TESTS 105 30 0 1100
64488717 SMani24 A Nov. 7, 2019, 6:56 p.m. OK GNU C++17 TESTS 105 30 0 1100
53112007 jessgreb01 A April 22, 2019, 4:17 a.m. OK Go TESTS 105 31 0 1100
52773730 2008061626 A April 15, 2019, 10:45 a.m. OK Go TESTS 105 46 0 1100
53300295 Laurens A April 25, 2019, 8:10 p.m. OK Haskell TESTS 105 46 102400 1100
53667658 karaketir16 A May 2, 2019, 11:27 a.m. OK Haskell TESTS 105 124 102400 1100
68708645 StEpAn_123 A Jan. 13, 2020, 12:13 p.m. OK Java 11 TESTS 105 187 0 1100
67848687 lightseba A Dec. 29, 2019, 12:19 a.m. OK Java 11 TESTS 105 202 0 1100
63685629 emslmar A Oct. 28, 2019, 10:23 p.m. OK Java 11 TESTS 105 202 0 1100
56167542 foreverlearner A June 27, 2019, 2:56 p.m. OK Java 8 TESTS 105 109 0 1100
54790094 vjudge5 A May 29, 2019, 6:40 a.m. OK Java 8 TESTS 105 109 0 1100
54637097 vjudge4 A May 25, 2019, 5:37 p.m. OK Java 8 TESTS 105 109 0 1100
54567587 ankurdua15 A May 24, 2019, 5:21 p.m. OK Java 8 TESTS 105 109 0 1100
53739450 arya5691 A May 4, 2019, 12:55 p.m. OK Java 8 TESTS 105 109 0 1100
53001352 serafimkoo A April 19, 2019, 7:16 a.m. OK Java 8 TESTS 105 109 0 1100
52991372 candy154 A April 18, 2019, 10:33 p.m. OK Java 8 TESTS 105 109 0 1100
52952812 marcose18 A April 18, 2019, 12:35 p.m. OK Java 8 TESTS 105 109 0 1100
52930452 theAbstract A April 18, 2019, 1:24 a.m. OK Java 8 TESTS 105 109 0 1100
52779157 inseder A April 15, 2019, 1:23 p.m. OK Java 8 TESTS 105 109 0 1100
52704405 yoga1290 A April 13, 2019, 3:17 p.m. OK JavaScript TESTS 105 31 0 1100
52809899 shedelok A April 16, 2019, 7:54 a.m. OK JavaScript TESTS 105 31 307200 1100
61045872 Spheniscine A Sept. 22, 2019, 4:23 a.m. OK Kotlin TESTS 105 124 0 1100
61045683 Spheniscine A Sept. 22, 2019, 4:15 a.m. OK Kotlin TESTS 105 124 0 1100
60382712 Spheniscine A Sept. 11, 2019, 10:01 a.m. OK Kotlin TESTS 105 124 0 1100
53654742 I.A.K.O.V A May 2, 2019, 3:51 a.m. OK Kotlin TESTS 105 124 0 1100
53654671 I.A.K.O.V A May 2, 2019, 3:49 a.m. OK Kotlin TESTS 105 124 0 1100
53654634 I.A.K.O.V A May 2, 2019, 3:47 a.m. OK Kotlin TESTS 105 124 0 1100
53654561 I.A.K.O.V A May 2, 2019, 3:44 a.m. OK Kotlin TESTS 105 140 0 1100
52790955 Lishy2010 A April 15, 2019, 5:21 p.m. OK Kotlin TESTS 105 140 0 1100
52777299 kav128 A April 15, 2019, 12:37 p.m. OK Kotlin TESTS 105 140 102400 1100
52706100 calmarj A April 13, 2019, 3:25 p.m. OK Kotlin TESTS 105 155 0 1100
53535109 ivanidze.kirov A April 30, 2019, 1:21 a.m. OK Mono C# TESTS 105 46 0 1100
63675415 vjudge1 A Oct. 28, 2019, 6:13 p.m. OK Mono C# TESTS 105 46 0 1100
52776996 sergmel A April 15, 2019, 12:29 p.m. OK Mono C# TESTS 105 46 0 1100
52772265 lewasupaman SaurumanS LapsleyJuno A April 15, 2019, 9:42 a.m. OK Mono C# TESTS 105 46 0 1100
52779892 TRR A April 15, 2019, 1:45 p.m. OK Mono C# TESTS 105 61 0 1100
53269494 1337team A April 25, 2019, 5:07 a.m. OK Mono C# TESTS 105 61 0 1100
52753655 Askander A April 14, 2019, 3:28 p.m. OK Mono C# TESTS 105 62 0 1100
52770853 omikad A April 15, 2019, 8:42 a.m. OK Mono C# TESTS 105 62 0 1100
54585413 og.kostya A May 25, 2019, 6:41 a.m. OK Mono C# TESTS 105 62 0 1100
58916776 ansergeyg A Aug. 16, 2019, 3:19 p.m. OK Mono C# TESTS 105 62 0 1100
68769923 vjudge5 A Jan. 14, 2020, 11:28 a.m. OK MS C++ TESTS 105 31 0 1100
68771580 vjudge5 A Jan. 14, 2020, 12:03 p.m. OK MS C++ TESTS 105 31 0 1100
68694207 vjudge3 A Jan. 13, 2020, 7:20 a.m. OK MS C++ TESTS 105 31 0 1100
65479865 vjudge3 A Nov. 21, 2019, 11:20 a.m. OK MS C++ TESTS 105 31 0 1100
64122178 TianSunXing A Nov. 3, 2019, 2:13 a.m. OK MS C++ TESTS 105 31 0 1100
63923700 TianJianXing A Oct. 31, 2019, 12:27 p.m. OK MS C++ TESTS 105 31 0 1100
68780135 vjudge1 A Jan. 14, 2020, 2:40 p.m. OK MS C++ TESTS 105 31 0 1100
69396354 vjudge3 A Jan. 23, 2020, 6:29 a.m. OK MS C++ TESTS 105 31 0 1100
68832787 vjudge5 A Jan. 15, 2020, 12:19 a.m. OK MS C++ TESTS 105 31 0 1100
68840562 vjudge3 A Jan. 15, 2020, 5:38 a.m. OK MS C++ TESTS 105 31 0 1100
55644207 holder94 A June 16, 2019, 11:38 a.m. OK MS C++ 2017 TESTS 105 31 0 1100
54281741 Mad112233 A May 17, 2019, 1:45 p.m. OK MS C++ 2017 TESTS 105 31 0 1100
54833662 Throder A May 30, 2019, 10 a.m. OK MS C++ 2017 TESTS 105 31 0 1100
54907617 quangv393 A June 1, 2019, 9:34 a.m. OK MS C++ 2017 TESTS 105 31 0 1100
57726939 vjudge4 A July 25, 2019, 7:26 a.m. OK MS C++ 2017 TESTS 105 31 0 1100
58248078 ZSTU-2018329621261 A Aug. 4, 2019, 6:29 a.m. OK MS C++ 2017 TESTS 105 31 0 1100
58966375 GK_Ebbaka A Aug. 17, 2019, 5:59 p.m. OK MS C++ 2017 TESTS 105 31 0 1100
61800444 Boryan07 A Oct. 3, 2019, 6:46 p.m. OK MS C++ 2017 TESTS 105 31 0 1100
63035651 xfd1048577 A Oct. 20, 2019, 8:37 p.m. OK MS C++ 2017 TESTS 105 31 0 1100
63693170 vjudge4 A Oct. 29, 2019, 3:59 a.m. OK MS C++ 2017 TESTS 105 31 0 1100
53441245 kidkkr A April 28, 2019, 12:35 a.m. OK Node.js TESTS 105 156 409600 1100
52934866 TinyColonel A April 18, 2019, 5:45 a.m. OK PascalABC.NET TESTS 105 202 0 1100
54247682 alex671 A May 16, 2019, 3:36 p.m. OK PascalABC.NET TESTS 105 249 0 1100
53334059 Houy3 A April 26, 2019, 3:03 p.m. OK PascalABC.NET TESTS 105 312 204800 1100
53812342 nokdoot A May 6, 2019, 7:48 a.m. OK Perl TESTS 105 46 204800 1100
53812999 nokdoot_test A May 6, 2019, 8:18 a.m. OK Perl TESTS 105 46 204800 1100
53812528 nokdoot A May 6, 2019, 7:56 a.m. OK Perl TESTS 105 436 204800 1100
57850488 mayakin A July 27, 2019, 12:56 p.m. OK PHP TESTS 105 46 512000 1100
53540110 lostamok A April 30, 2019, 6:08 a.m. OK PHP TESTS 105 701 0 1100
57473376 wolffd A July 21, 2019, 7:35 p.m. OK PyPy 2 TESTS 105 124 0 1100
54264703 supersangjin A May 17, 2019, 5:05 a.m. OK PyPy 2 TESTS 105 124 0 1100
52719499 smunjal96 A April 13, 2019, 6:59 p.m. OK PyPy 2 TESTS 105 124 0 1100
52723472 Quirinius A April 13, 2019, 9:32 p.m. OK PyPy 2 TESTS 105 124 102400 1100
52724114 potatomat0 A April 13, 2019, 10:08 p.m. OK PyPy 2 TESTS 105 124 102400 1100
52761541 phantomhive A April 14, 2019, 9:14 p.m. OK PyPy 2 TESTS 105 139 0 1100
56960502 jolt.tks A July 13, 2019, 6:24 a.m. OK PyPy 2 TESTS 105 139 0 1100
52755203 raj1307 A April 14, 2019, 4:24 p.m. OK PyPy 2 TESTS 105 140 0 1100
52715775 supachai_pay A April 13, 2019, 5:27 p.m. OK PyPy 2 TESTS 105 140 1433600 1100
54264288 allonsy_kim A May 17, 2019, 4:45 a.m. OK PyPy 2 TESTS 105 155 0 1100
54665904 Aidos A May 26, 2019, 1:21 p.m. OK PyPy 3 TESTS 105 124 0 1100
52753809 Hokage777 A April 14, 2019, 3:34 p.m. OK PyPy 3 TESTS 105 124 0 1100
54899492 darkkcyan A June 1, 2019, 5:43 a.m. OK PyPy 3 TESTS 105 139 0 1100
52726231 nobe0716 A April 14, 2019, 12:40 a.m. OK PyPy 3 TESTS 105 139 0 1100
56173515 ParsaBahrami A June 27, 2019, 5:51 p.m. OK PyPy 3 TESTS 105 140 0 1100
59940768 shiaurv A Sept. 3, 2019, 11:22 a.m. OK PyPy 3 TESTS 105 140 0 1100
59641744 Novel A Aug. 29, 2019, 2:20 a.m. OK PyPy 3 TESTS 105 140 0 1100
53685319 vjudge2 A May 2, 2019, 11:58 p.m. OK PyPy 3 TESTS 105 140 0 1100
52998481 glucose A April 19, 2019, 5:43 a.m. OK PyPy 3 TESTS 105 140 0 1100
52847413 hrustim25 A April 16, 2019, 3:26 p.m. OK PyPy 3 TESTS 105 140 0 1100
52731392 nealzane A April 14, 2019, 4:09 a.m. OK Python 2 TESTS 105 171 0 1100
52721714 ikari A April 13, 2019, 8:15 p.m. OK Python 2 TESTS 105 171 0 1100
52717503 daniel.carlos A April 13, 2019, 6:01 p.m. OK Python 2 TESTS 105 171 0 1100
52766433 franckmy A April 15, 2019, 4:15 a.m. OK Python 2 TESTS 105 186 0 1100
52886526 Saurabh66 A April 17, 2019, 5:39 a.m. OK Python 2 TESTS 105 187 0 1100
52743688 tbhuu A April 14, 2019, 10:30 a.m. OK Python 2 TESTS 105 187 0 1100
52703819 jrobsonjr A April 13, 2019, 3:14 p.m. OK Python 2 TESTS 105 202 0 1100
52717824 Helli.code A April 13, 2019, 6:11 p.m. OK Python 2 TESTS 105 202 0 1100
52704892 Anubhav-J A April 13, 2019, 3:19 p.m. OK Python 2 TESTS 105 218 0 1100
53012853 gatsko A April 19, 2019, 12:53 p.m. OK Python 2 TESTS 105 265 5324800 1100
52957538 sqrthxz A April 18, 2019, 2:19 p.m. OK Python 3 TESTS 105 108 0 1100
55584113 tchr A June 15, 2019, 8:28 a.m. OK Python 3 TESTS 105 109 0 1100
55540178 ziddi A June 13, 2019, 7:08 p.m. OK Python 3 TESTS 105 109 0 1100
55428372 tanu38 A June 11, 2019, 10:06 a.m. OK Python 3 TESTS 105 109 0 1100
55178281 jokkebk A June 5, 2019, 7:50 p.m. OK Python 3 TESTS 105 109 0 1100
53739970 andrey.starodubtsev A May 4, 2019, 1:14 p.m. OK Python 3 TESTS 105 109 0 1100
53685412 vjudge5 A May 3, 2019, 12:06 a.m. OK Python 3 TESTS 105 109 0 1100
54591245 skyrahul98 A May 25, 2019, 8:45 a.m. OK Python 3 TESTS 105 109 0 1100
63676069 vjudge4 A Oct. 28, 2019, 6:25 p.m. OK Python 3 TESTS 105 109 0 1100
62440262 _IchBin_ A Oct. 12, 2019, 7:06 p.m. OK Python 3 TESTS 105 109 0 1100
52745571 MiniCube A April 14, 2019, 11:28 a.m. OK Ruby TESTS 105 108 0 1100
62206434 BalabanovoGrief A Oct. 9, 2019, 1:21 p.m. OK Rust TESTS 105 31 0 1100
52716335 Dx18 A April 13, 2019, 5:35 p.m. OK Rust TESTS 105 31 0 1100
52750266 kobae964 A April 14, 2019, 1:40 p.m. OK Rust TESTS 105 31 307200 1100
52754652 aravk33 A April 14, 2019, 4:03 p.m. OK Rust TESTS 105 46 0 1100
62560866 yakamoto A Oct. 14, 2019, 11:55 a.m. OK Scala TESTS 105 420 0 1100
52701897 nafeezabrar A April 13, 2019, 3:05 p.m. OK Scala TESTS 105 499 0 1100

remove filters

Back to search problems