Codeforces Round 614 (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
1293 Codeforces Round 614 (Div. 2) FINISHED False 7200 152382299 Jan. 19, 2020, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 15478 ) A ConneR and the A.R.C. Markland-N PROGRAMMING binary search brute force implementation 1100

B'A.R.C. Markland-N is a tall building with n floors numbered from 1 to n . Between each two adjacent floors in the building, there is a staircase connecting them. It 's lunchtime for our sensei Colin "ConneR" Neumann Jr, and he 's planning for a location to enjoy his meal. ConneR 's office is at floor s of the building. On each floor (including floor s , of course), there is a restaurant offering meals. However, due to renovations being in progress, k of the restaurants are currently closed, and as a result, ConneR can 't enjoy his lunch there. CooneR wants to reach a restaurant as quickly as possible to save time. What is the minimum number of staircases he needs to walk to reach a closest currently open restaurant. Please answer him quickly, and you might earn his praise and even enjoy the lunch with him in the elegant Neumanns ' way! The first line contains one integer t ( 1 <= t <= 1000 ) -- the number of test cases in the test. Then the descriptions of t test cases follow. The first line of a test case contains three integers n , s and k ( 2 <= n <= 10^9 , 1 <= s <= n , 1 <= k <= min(n-1, 1000) ) -- respectively the number of floors of A.R.C. Markland-N, the floor where ConneR is in, and the number of closed restaurants. The second line of a test case contains k distinct integers a_1, a_2, ldots, a_k ( 1 <= a_i <= n ) -- the floor numbers of the currently closed restaurants. It is guaranteed that the sum of k over all test cases does not exceed 1000 . For each test case print a single integer -- the minimum number of staircases required for ConneR to walk from the floor s to a floor with an open restaurant. In the first example test case, the nearest floor with an open restaurant would be the floor 4 . In the second example test case, the floor with ConneR 's office still has an open restaurant, so Sensei won 't have to go'...

Tutorials

Codeforces Round #614 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
69557837 Rajveer_100 A Jan. 26, 2020, 9:31 a.m. OK Clang++17 Diagnostics TESTS 60 61 6348800 1100
69558425 Rajveer_100 A Jan. 26, 2020, 9:43 a.m. OK Clang++17 Diagnostics TESTS 60 61 6348800 1100
69945307 CapNemo A Feb. 1, 2020, 7:25 a.m. OK Clang++17 Diagnostics TESTS 60 62 102400 1100
69945390 vjudge2 A Feb. 1, 2020, 7:26 a.m. OK Clang++17 Diagnostics TESTS 60 77 0 1100
69926503 Josue A Jan. 31, 2020, 8:40 p.m. OK FPC TESTS 60 31 0 1100
69975445 _Ayush A Feb. 1, 2020, 2:51 p.m. OK GNU C11 TESTS 60 31 0 1100
69167986 DanielChang19 A Jan. 20, 2020, 4:54 a.m. OK GNU C11 TESTS 60 31 0 1100
69192661 Dontony A Jan. 20, 2020, 1:58 p.m. OK GNU C11 TESTS 60 31 0 1100
69226784 sumo9 A Jan. 21, 2020, 7:37 a.m. OK GNU C11 TESTS 60 31 0 1100
69264814 tanmaiybattle A Jan. 21, 2020, 6:15 p.m. OK GNU C11 TESTS 60 31 0 1100
69394333 penguin_pii A Jan. 23, 2020, 5:30 a.m. OK GNU C11 TESTS 60 31 0 1100
69554181 Sourav_saha A Jan. 26, 2020, 7:59 a.m. OK GNU C11 TESTS 60 31 0 1100
69633567 malmal A Jan. 27, 2020, 5:53 p.m. OK GNU C11 TESTS 60 31 0 1100
69879701 SUNNY24 A Jan. 31, 2020, 5:51 a.m. OK GNU C11 TESTS 60 31 0 1100
69913446 shim1998 A Jan. 31, 2020, 4:03 p.m. OK GNU C11 TESTS 60 31 0 1100
70617821 alexei_pc A Feb. 9, 2020, 10:32 a.m. OK GNU C++11 TESTS 60 30 0 1100
69128013 juseice A Jan. 19, 2020, 2:36 p.m. OK GNU C++11 TESTS 60 30 0 1100
70788591 Beginner_DON A Feb. 11, 2020, 1:05 p.m. OK GNU C++11 TESTS 60 31 0 1100
71094453 Sneakoscope A Feb. 15, 2020, 4:04 a.m. OK GNU C++11 TESTS 60 31 0 1100
71088977 GustavK A Feb. 14, 2020, 11:29 p.m. OK GNU C++11 TESTS 60 31 0 1100
71075591 ankitjakhar448 A Feb. 14, 2020, 5:12 p.m. OK GNU C++11 TESTS 60 31 0 1100
71044132 jiangyouping A Feb. 14, 2020, 7:53 a.m. OK GNU C++11 TESTS 60 31 0 1100
70925913 Cas_Rosso A Feb. 13, 2020, 2:30 a.m. OK GNU C++11 TESTS 60 31 0 1100
70825597 Taday A Feb. 12, 2020, 6:15 a.m. OK GNU C++11 TESTS 60 31 0 1100
70814672 alejandro0011 A Feb. 11, 2020, 10:24 p.m. OK GNU C++11 TESTS 60 31 0 1100
69149108 ashu12_chi A Jan. 19, 2020, 5:10 p.m. OK GNU C++14 TESTS 60 15 0 1100
69174624 twoplustwofive A Jan. 20, 2020, 7:36 a.m. OK GNU C++14 TESTS 60 15 0 1100
69156675 Danzev A Jan. 19, 2020, 7:52 p.m. OK GNU C++14 TESTS 60 15 102400 1100
69163308 HassanYousef A Jan. 20, 2020, 1:58 a.m. OK GNU C++14 TESTS 60 15 102400 1100
69159498 c_tycoon A Jan. 19, 2020, 9:51 p.m. OK GNU C++14 TESTS 60 15 102400 1100
69655464 qhung312 A Jan. 28, 2020, 7:14 a.m. OK GNU C++14 TESTS 60 15 204800 1100
70005044 sky666 A Feb. 2, 2020, 4:22 a.m. OK GNU C++14 TESTS 60 30 0 1100
69730926 godswo A Jan. 29, 2020, 1:30 p.m. OK GNU C++14 TESTS 60 30 0 1100
70113587 vjudge5 A Feb. 3, 2020, 6:25 a.m. OK GNU C++14 TESTS 60 30 0 1100
70107166 zucc31801313 A Feb. 3, 2020, 3:48 a.m. OK GNU C++14 TESTS 60 30 0 1100
69279582 wxc0914 A Jan. 22, 2020, 5:08 a.m. OK GNU C++17 TESTS 60 15 0 1100
69209014 Fortin A Jan. 20, 2020, 7:07 p.m. OK GNU C++17 TESTS 60 15 102400 1100
69159609 dev_singh A Jan. 19, 2020, 9:58 p.m. OK GNU C++17 TESTS 60 15 204800 1100
69859570 Vrikodara A Jan. 30, 2020, 6:05 p.m. OK GNU C++17 TESTS 60 15 204800 1100
69271457 Ebiarat A Jan. 21, 2020, 9:25 p.m. OK GNU C++17 TESTS 60 15 307200 1100
69228893 solaimanhs30 A Jan. 21, 2020, 8:36 a.m. OK GNU C++17 TESTS 60 30 0 1100
69184178 walkher8 A Jan. 20, 2020, 11:20 a.m. OK GNU C++17 TESTS 60 30 0 1100
69257912 smilingface A Jan. 21, 2020, 4:11 p.m. OK GNU C++17 TESTS 60 30 0 1100
69186555 funny_behradm A Jan. 20, 2020, 12:08 p.m. OK GNU C++17 TESTS 60 30 0 1100
69211228 ryan0jensen A Jan. 20, 2020, 8:11 p.m. OK GNU C++17 TESTS 60 30 0 1100
69644428 moh.amr A Jan. 27, 2020, 11:34 p.m. OK Go TESTS 60 31 0 1100
70106180 zhuaiballl A Feb. 3, 2020, 3:19 a.m. OK Go TESTS 60 31 0 1100
69514249 bittu18 A Jan. 25, 2020, 11:28 a.m. OK Go TESTS 60 31 0 1100
69385485 fc-lib-xyz A Jan. 22, 2020, 10:01 p.m. OK Go TESTS 60 31 0 1100
69714619 Temurbek A Jan. 29, 2020, 8:32 a.m. OK Go TESTS 60 46 0 1100
69644126 moh.amr A Jan. 27, 2020, 11:15 p.m. OK Go TESTS 60 46 0 1100
69129083 jaimatadiletsrock A Jan. 19, 2020, 2:39 p.m. OK Go TESTS 60 46 0 1100
69136516 kat0rik A Jan. 19, 2020, 3:04 p.m. OK Go TESTS 60 93 0 1100
69183117 pandrei A Jan. 20, 2020, 10:59 a.m. OK Haskell TESTS 60 62 102400 1100
69293076 insane_28 A Jan. 22, 2020, 11:07 a.m. OK Java 11 TESTS 60 171 0 1100
69198014 thisSideAnonymous A Jan. 20, 2020, 3:32 p.m. OK Java 11 TESTS 60 171 0 1100
69862908 abhi123valani A Jan. 30, 2020, 7:11 p.m. OK Java 11 TESTS 60 187 0 1100
69285241 cribabby A Jan. 22, 2020, 7:53 a.m. OK Java 11 TESTS 60 187 0 1100
69266545 Hadi_Elnemr A Jan. 21, 2020, 6:49 p.m. OK Java 11 TESTS 60 187 0 1100
69195160 Shetewi A Jan. 20, 2020, 2:42 p.m. OK Java 11 TESTS 60 187 0 1100
69206024 skyfighter A Jan. 20, 2020, 6:02 p.m. OK Java 11 TESTS 60 202 0 1100
69196040 girkarkshitij A Jan. 20, 2020, 2:57 p.m. OK Java 11 TESTS 60 202 0 1100
69140853 RozalinaMirgalimova A Jan. 19, 2020, 3:19 p.m. OK Java 11 TESTS 60 202 0 1100
69127101 YahiaMostafa A Jan. 19, 2020, 2:34 p.m. OK Java 11 TESTS 60 202 0 1100
69204272 Modi_sarkar A Jan. 20, 2020, 5:31 p.m. OK Java 8 TESTS 60 109 0 1100
69188676 KharYusuf A Jan. 20, 2020, 12:49 p.m. OK Java 8 TESTS 60 109 0 1100
69180070 bluesky111 A Jan. 20, 2020, 9:44 a.m. OK Java 8 TESTS 60 109 0 1100
69159747 Taaaaaaa A Jan. 19, 2020, 10:05 p.m. OK Java 8 TESTS 60 109 0 1100
69155659 qlf9 A Jan. 19, 2020, 7:22 p.m. OK Java 8 TESTS 60 109 0 1100
69154553 asafiul A Jan. 19, 2020, 6:53 p.m. OK Java 8 TESTS 60 109 0 1100
69727780 nidhigoel A Jan. 29, 2020, 12:45 p.m. OK Java 8 TESTS 60 124 0 1100
70159807 pc_wallace A Feb. 3, 2020, 2:57 p.m. OK Java 8 TESTS 60 124 0 1100
69901275 _IAm_PM_ A Jan. 31, 2020, 1:05 p.m. OK Java 8 TESTS 60 124 0 1100
69810838 lightttt77 A Jan. 30, 2020, 4:18 a.m. OK Java 8 TESTS 60 124 0 1100
69145286 Rinat_ A Jan. 19, 2020, 3:32 p.m. OK JavaScript TESTS 60 46 1024000 1100
69158379 GTrigger A Jan. 19, 2020, 8:54 p.m. OK JavaScript TESTS 60 46 1843200 1100
69158621 GTrigger A Jan. 19, 2020, 9:05 p.m. OK JavaScript TESTS 60 46 1843200 1100
69256542 SlavaG A Jan. 21, 2020, 3:49 p.m. OK Kotlin TESTS 60 155 204800 1100
69256806 SlavaG A Jan. 21, 2020, 3:53 p.m. OK Kotlin TESTS 60 155 204800 1100
69257115 SlavaG A Jan. 21, 2020, 3:58 p.m. OK Kotlin TESTS 60 155 716800 1100
69165273 Spheniscine A Jan. 20, 2020, 3:18 a.m. OK Kotlin TESTS 60 155 921600 1100
69165224 Spheniscine A Jan. 20, 2020, 3:16 a.m. OK Kotlin TESTS 60 155 921600 1100
69130219 Arkabekuly_Mukhtar A Jan. 19, 2020, 2:43 p.m. OK Kotlin TESTS 60 186 204800 1100
69137671 Roland A Jan. 19, 2020, 3:08 p.m. OK Kotlin TESTS 60 202 204800 1100
69557864 wbars A Jan. 26, 2020, 9:31 a.m. OK Kotlin TESTS 60 202 512000 1100
70587210 m1_k3 A Feb. 8, 2020, 7 p.m. OK Mono C# TESTS 60 62 0 1100
69158484 ansergeyg A Jan. 19, 2020, 8:59 p.m. OK Mono C# TESTS 60 62 204800 1100
69157780 ansergeyg A Jan. 19, 2020, 8:31 p.m. OK Mono C# TESTS 60 62 307200 1100
69658215 lyubenKod A Jan. 28, 2020, 8:21 a.m. OK Mono C# TESTS 60 62 307200 1100
69203985 TRR A Jan. 20, 2020, 5:25 p.m. OK Mono C# TESTS 60 62 307200 1100
69156650 ansergeyg A Jan. 19, 2020, 7:51 p.m. OK Mono C# TESTS 60 62 3891200 1100
70534921 sakapon A Feb. 8, 2020, 2:19 a.m. OK Mono C# TESTS 60 62 4198400 1100
69289306 nadilk A Jan. 22, 2020, 9:33 a.m. OK Mono C# TESTS 60 77 4096000 1100
69282285 supersayain99 A Jan. 22, 2020, 6:32 a.m. OK Mono C# TESTS 60 77 4198400 1100
69190376 nastya1199 A Jan. 20, 2020, 1:19 p.m. OK Mono C# TESTS 60 92 3993600 1100
70487742 vjudge1 A Feb. 7, 2020, 7:59 a.m. OK MS C++ TESTS 60 31 0 1100
70487983 vjudge4 A Feb. 7, 2020, 8:04 a.m. OK MS C++ TESTS 60 31 0 1100
70111890 vjudge2 A Feb. 3, 2020, 5:51 a.m. OK MS C++ TESTS 60 31 0 1100
69942604 vjudge1 A Feb. 1, 2020, 6:37 a.m. OK MS C++ TESTS 60 31 0 1100
69941693 vjudge3 A Feb. 1, 2020, 6:22 a.m. OK MS C++ TESTS 60 31 0 1100
69941341 vjudge4 A Feb. 1, 2020, 6:15 a.m. OK MS C++ TESTS 60 31 0 1100
69936655 DeaL57 A Feb. 1, 2020, 4:12 a.m. OK MS C++ TESTS 60 31 0 1100
69811866 vjudge2 A Jan. 30, 2020, 4:42 a.m. OK MS C++ TESTS 60 31 0 1100
69613609 vjudge1 A Jan. 27, 2020, 12:26 p.m. OK MS C++ TESTS 60 31 0 1100
69613562 DM1 A Jan. 27, 2020, 12:25 p.m. OK MS C++ TESTS 60 31 0 1100
69510317 vjudge2 A Jan. 25, 2020, 10:15 a.m. OK MS C++ 2017 TESTS 60 31 0 1100
70833413 vjudge4 A Feb. 12, 2020, 9:16 a.m. OK MS C++ 2017 TESTS 60 31 0 1100
70299660 bonibon A Feb. 4, 2020, 4:45 p.m. OK MS C++ 2017 TESTS 60 31 0 1100
69732363 obadakhalili A Jan. 29, 2020, 1:49 p.m. OK MS C++ 2017 TESTS 60 31 0 1100
69692946 danilseal A Jan. 28, 2020, 7:16 p.m. OK MS C++ 2017 TESTS 60 31 0 1100
69628952 shio A Jan. 27, 2020, 4:38 p.m. OK MS C++ 2017 TESTS 60 31 0 1100
69553102 JeongWooOh A Jan. 26, 2020, 7:26 a.m. OK MS C++ 2017 TESTS 60 31 0 1100
69455564 jjongwuner A Jan. 24, 2020, 8:28 a.m. OK MS C++ 2017 TESTS 60 31 0 1100
69284209 oceanlin A Jan. 22, 2020, 7:24 a.m. OK MS C++ 2017 TESTS 60 31 0 1100
69251567 tanvir.oj.aiub A Jan. 21, 2020, 2:26 p.m. OK MS C++ 2017 TESTS 60 31 0 1100
69149518 shivam1420 A Jan. 19, 2020, 5:15 p.m. OK Node.js TESTS 60 187 3788800 1100
69587585 j31d0 A Jan. 26, 2020, 8:22 p.m. OK Ocaml TESTS 60 421 512000 1100
69531404 mayakin A Jan. 25, 2020, 5:14 p.m. OK PHP TESTS 60 62 409600 1100
69705494 MVP A Jan. 29, 2020, 4:17 a.m. OK PyPy 2 TESTS 60 202 921600 1100
69557283 Wizmann A Jan. 26, 2020, 9:18 a.m. OK PyPy 2 TESTS 60 202 1331200 1100
69158248 linkRs A Jan. 19, 2020, 8:48 p.m. OK PyPy 3 TESTS 60 155 0 1100
69478217 r_dmv A Jan. 24, 2020, 4:52 p.m. OK PyPy 3 TESTS 60 155 1228800 1100
69165251 gajrajgchouhan A Jan. 20, 2020, 3:17 a.m. OK PyPy 3 TESTS 60 155 2048000 1100
69207191 Affe A Jan. 20, 2020, 6:24 p.m. OK PyPy 3 TESTS 60 155 2150400 1100
69260657 mr.inconsitent A Jan. 21, 2020, 4:57 p.m. OK PyPy 3 TESTS 60 155 2252800 1100
70939181 wattaihei A Feb. 13, 2020, 7:46 a.m. OK PyPy 3 TESTS 60 156 1843200 1100
69250910 toterpinguin A Jan. 21, 2020, 2:14 p.m. OK PyPy 3 TESTS 60 156 1843200 1100
69216900 deathReaper A Jan. 21, 2020, 1:42 a.m. OK PyPy 3 TESTS 60 170 1843200 1100
69263043 meowmeow321 A Jan. 21, 2020, 5:40 p.m. OK PyPy 3 TESTS 60 171 2355200 1100
69477738 arp106 A Jan. 24, 2020, 4:43 p.m. OK PyPy 3 TESTS 60 171 2457600 1100
69200882 vismaya A Jan. 20, 2020, 4:29 p.m. OK Python 2 TESTS 60 187 102400 1100
69897897 purva.taranekar94 A Jan. 31, 2020, 12:15 p.m. OK Python 2 TESTS 60 202 102400 1100
69632167 Yans A Jan. 27, 2020, 5:30 p.m. OK Python 2 TESTS 60 202 102400 1100
69852610 Mike10 A Jan. 30, 2020, 4:05 p.m. OK Python 2 TESTS 60 233 0 1100
70783225 harsh_thakur A Feb. 11, 2020, 11:28 a.m. OK Python 3 TESTS 60 109 307200 1100
70351433 darkshadow07 A Feb. 5, 2020, 11:03 a.m. OK Python 3 TESTS 60 109 307200 1100
70328771 Starkis A Feb. 5, 2020, 5 a.m. OK Python 3 TESTS 60 109 307200 1100
70231495 tflave A Feb. 4, 2020, 12:35 p.m. OK Python 3 TESTS 60 109 307200 1100
70207324 ngoctrh A Feb. 4, 2020, 6:53 a.m. OK Python 3 TESTS 60 109 307200 1100
70159894 _.zoro. A Feb. 3, 2020, 2:58 p.m. OK Python 3 TESTS 60 109 307200 1100
70107773 VKanakalatha A Feb. 3, 2020, 4:05 a.m. OK Python 3 TESTS 60 109 307200 1100
70011280 KayShirasawa A Feb. 2, 2020, 6:54 a.m. OK Python 3 TESTS 60 109 307200 1100
70005790 jackowitzd2 A Feb. 2, 2020, 4:46 a.m. OK Python 3 TESTS 60 109 307200 1100
69876988 vinod_506 A Jan. 31, 2020, 4:36 a.m. OK Python 3 TESTS 60 109 307200 1100
69386523 majali A Jan. 22, 2020, 11:11 p.m. OK Ruby TESTS 60 109 102400 1100
69137488 j31d0 A Jan. 19, 2020, 3:07 p.m. OK Scala TESTS 60 623 0 1100

remove filters

Back to search problems