Codeforces Round 621 (Div. 1 + 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
1307 Codeforces Round 621 (Div. 1 + Div. 2) FINISHED False 8100 155226263 Feb. 17, 2020, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13410 ) B Cow and Friend PROGRAMMING geometry greedy math 1300

B"Bessie has way too many friends because she is everyone's favorite cow! Her new friend Rabbit is trying to hop over so they can play! More specifically, he wants to get from (0,0) to (x,0) by making multiple hops. He is only willing to hop from one point to another point on the 2D plane if the Euclidean distance between the endpoints of a hop is one of its n favorite numbers: a_1, a_2, ldots, a_n . What is the minimum number of hops Rabbit needs to get from (0,0) to (x,0) ? Rabbit may land on points with non-integer coordinates. It can be proved that Rabbit can always reach his destination. Recall that the Euclidean distance between points (x_i, y_i) and (x_j, y_j) is sqrt{(x_i-x_j)^2+(y_i-y_j)^2} . For example, if Rabbit has favorite numbers 1 and 3 he could hop from (0,0) to (4,0) in two hops as shown below. Note that there also exists other valid ways to hop to (4,0) in 2 hops (e.g. (0,0) rightarrow (2,- sqrt{5}) rightarrow (4,0) ). In other words, each time Rabbit chooses some number a_i and hops with distance equal to a_i in any direction he wants. The same number can be used multiple times. The input consists of multiple test cases. The first line contains an integer t ( 1 <= t <= 1000 ) -- the number of test cases. Next 2t lines contain test cases -- two lines per test case. The first line of each test case contains two integers n and x ( 1 <= n <= 10^5 , 1 <= x <= 10^9 ) -- the number of favorite numbers and the distance Rabbit wants to travel, respectively. The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ) -- Rabbit's favorite numbers. It is guaranteed that the favorite numbers are distinct. It is guaranteed that the sum of n over all the test cases will not exceed 10^5 . For each test case"...

Tutorials

Codeforces Round #621 (Div. 1 + Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
71396458 ftiasch B Feb. 18, 2020, 5:59 p.m. OK D TESTS 34 46 4198400 1300
71305730 PAG B Feb. 17, 2020, 4:16 p.m. OK FPC TESTS 34 46 819200 1300
71464613 dmarx B Feb. 19, 2020, 10:27 p.m. OK GNU C11 TESTS 34 31 0 1300
71641538 alpha_zero_01 B Feb. 23, 2020, 3:55 a.m. OK GNU C11 TESTS 34 31 819200 1300
71398612 UshanGhosh B Feb. 18, 2020, 6:39 p.m. OK GNU C11 TESTS 34 46 0 1300
71438314 _dark_knight_ B Feb. 19, 2020, 1:05 p.m. OK GNU C11 TESTS 34 46 0 1300
71314644 IIIIndex B Feb. 17, 2020, 4:43 p.m. OK GNU C11 TESTS 34 46 0 1300
71339218 rainboy B Feb. 17, 2020, 8:02 p.m. OK GNU C11 TESTS 34 46 0 1300
71354818 sohag9065 B Feb. 18, 2020, 5:34 a.m. OK GNU C11 TESTS 34 46 0 1300
71391481 anonyman637 B Feb. 18, 2020, 4:32 p.m. OK GNU C11 TESTS 34 46 0 1300
71307298 _Rebellion B Feb. 17, 2020, 4:20 p.m. OK GNU C11 TESTS 34 46 0 1300
71338563 kaiboy B Feb. 17, 2020, 7:50 p.m. OK GNU C11 TESTS 34 46 0 1300
71478459 ProgSlacking B Feb. 20, 2020, 7:22 a.m. OK GNU C++11 TESTS 34 30 409600 1300
71478461 ProgSlacking B Feb. 20, 2020, 7:22 a.m. OK GNU C++11 TESTS 34 30 409600 1300
71370500 imzzy B Feb. 18, 2020, 10:48 a.m. OK GNU C++11 TESTS 34 31 0 1300
71411218 vjudge3 B Feb. 19, 2020, 3:08 a.m. OK GNU C++11 TESTS 34 31 0 1300
71383613 Dodgemin B Feb. 18, 2020, 2:17 p.m. OK GNU C++11 TESTS 34 31 0 1300
71374995 _sherlok B Feb. 18, 2020, 12:12 p.m. OK GNU C++11 TESTS 34 31 0 1300
71372823 Big_black_jujube B Feb. 18, 2020, 11:35 a.m. OK GNU C++11 TESTS 34 31 0 1300
71363359 goodmorning200 B Feb. 18, 2020, 8:25 a.m. OK GNU C++11 TESTS 34 31 0 1300
71362240 DWAE86 B Feb. 18, 2020, 8:02 a.m. OK GNU C++11 TESTS 34 31 0 1300
71356727 Itst B Feb. 18, 2020, 6:15 a.m. OK GNU C++11 TESTS 34 31 0 1300
71533650 Scut82 B Feb. 21, 2020, 7:13 a.m. OK GNU C++14 TESTS 34 46 0 1300
71538039 dev_rastogi B Feb. 21, 2020, 8:37 a.m. OK GNU C++14 TESTS 34 46 0 1300
71553660 aj4941 B Feb. 21, 2020, 1:46 p.m. OK GNU C++14 TESTS 34 46 0 1300
71640187 feeder B Feb. 23, 2020, 2:45 a.m. OK GNU C++14 TESTS 34 46 0 1300
71603673 Elok B Feb. 22, 2020, 10 a.m. OK GNU C++14 TESTS 34 46 0 1300
71580129 monkey8 B Feb. 22, 2020, 12:40 a.m. OK GNU C++14 TESTS 34 46 0 1300
71579566 prospace B Feb. 22, 2020, 12:01 a.m. OK GNU C++14 TESTS 34 46 0 1300
71574957 Artful-Dodger B Feb. 21, 2020, 8:42 p.m. OK GNU C++14 TESTS 34 46 0 1300
71574627 lmn0x4F B Feb. 21, 2020, 8:33 p.m. OK GNU C++14 TESTS 34 46 0 1300
71564761 carre B Feb. 21, 2020, 4:58 p.m. OK GNU C++14 TESTS 34 46 0 1300
71445123 MRJ35 B Feb. 19, 2020, 2:57 p.m. OK GNU C++17 TESTS 34 31 0 1300
71417809 Do_Re_Mi B Feb. 19, 2020, 6:19 a.m. OK GNU C++17 TESTS 34 31 0 1300
71349517 wxbxcxuxnxy B Feb. 18, 2020, 2:56 a.m. OK GNU C++17 TESTS 34 31 0 1300
71426327 HatsuneMikuo B Feb. 19, 2020, 9:21 a.m. OK GNU C++17 TESTS 34 31 2150400 1300
71604956 vamsi3 B Feb. 22, 2020, 10:24 a.m. OK GNU C++17 TESTS 34 46 0 1300
71613234 paulthewineguy B Feb. 22, 2020, 1:10 p.m. OK GNU C++17 TESTS 34 46 0 1300
71613722 plusplus7_wolf B Feb. 22, 2020, 1:20 p.m. OK GNU C++17 TESTS 34 46 0 1300
71614887 _kaizoku_ B Feb. 22, 2020, 1:42 p.m. OK GNU C++17 TESTS 34 46 0 1300
71621369 monjurul0007 B Feb. 22, 2020, 3:54 p.m. OK GNU C++17 TESTS 34 46 0 1300
71596354 LightInShadow B Feb. 22, 2020, 8:01 a.m. OK GNU C++17 TESTS 34 46 0 1300
71446401 toterpinguin B Feb. 19, 2020, 3:20 p.m. OK Go TESTS 34 46 8908800 1300
71608937 snow_bear_328 B Feb. 22, 2020, 11:41 a.m. OK Go TESTS 34 61 4505600 1300
71354460 wzazzy B Feb. 18, 2020, 5:25 a.m. OK Go TESTS 34 62 409600 1300
71315764 ontake B Feb. 17, 2020, 4:48 p.m. OK Go TESTS 34 124 0 1300
71343797 sarthak.0702 B Feb. 17, 2020, 10:16 p.m. OK Java 11 TESTS 34 187 0 1300
71342156 sarthakmanna B Feb. 17, 2020, 9:16 p.m. OK Java 11 TESTS 34 187 102400 1300
71528204 abhi123valani B Feb. 21, 2020, 5:11 a.m. OK Java 11 TESTS 34 202 0 1300
71406111 exopeng B Feb. 18, 2020, 10:24 p.m. OK Java 11 TESTS 34 202 0 1300
71306339 p_unit B Feb. 17, 2020, 4:18 p.m. OK Java 11 TESTS 34 202 0 1300
71549821 soumitri12 B Feb. 21, 2020, 12:39 p.m. OK Java 11 TESTS 34 217 0 1300
71313039 1NVAL1D B Feb. 17, 2020, 4:38 p.m. OK Java 11 TESTS 34 217 0 1300
71506400 yamen.haddad B Feb. 20, 2020, 4:31 p.m. OK Java 11 TESTS 34 217 2252800 1300
71490176 Anonymous B Feb. 20, 2020, 11:45 a.m. OK Java 11 TESTS 34 217 4096000 1300
71551830 soumitri12 B Feb. 21, 2020, 1:15 p.m. OK Java 11 TESTS 34 218 0 1300
71458912 prem_cse B Feb. 19, 2020, 7:25 p.m. OK Java 8 TESTS 34 124 0 1300
71395853 shashwat07 B Feb. 18, 2020, 5:48 p.m. OK Java 8 TESTS 34 124 0 1300
71383525 Bhavya_Arora B Feb. 18, 2020, 2:15 p.m. OK Java 8 TESTS 34 124 0 1300
71351189 bluesky111 B Feb. 18, 2020, 3:56 a.m. OK Java 8 TESTS 34 124 0 1300
71345896 AnandOza B Feb. 18, 2020, 12:08 a.m. OK Java 8 TESTS 34 124 0 1300
71342906 rahsutamrev B Feb. 17, 2020, 9:41 p.m. OK Java 8 TESTS 34 124 0 1300
71306347 In_The_Name_Of_Love B Feb. 17, 2020, 4:18 p.m. OK Java 8 TESTS 34 124 0 1300
71545401 nalin_1000101 B Feb. 21, 2020, 11:11 a.m. OK Java 8 TESTS 34 139 0 1300
71361366 khulegu B Feb. 18, 2020, 7:45 a.m. OK Java 8 TESTS 34 139 0 1300
71304446 Jonathan1234 B Feb. 17, 2020, 4:12 p.m. OK Java 8 TESTS 34 139 0 1300
71312618 watarimaycry2 B Feb. 17, 2020, 4:37 p.m. OK JavaScript TESTS 34 62 14438400 1300
71381252 Spheniscine B Feb. 18, 2020, 1:41 p.m. OK Kotlin TESTS 34 156 0 1300
71370395 T49E2 B Feb. 18, 2020, 10:46 a.m. OK Kotlin TESTS 34 249 5939200 1300
71460332 Black_Fregat B Feb. 19, 2020, 7:59 p.m. OK Kotlin TESTS 34 280 5734400 1300
71336484 kaminoikari B Feb. 17, 2020, 7:17 p.m. OK Mono C# TESTS 34 93 10444800 1300
71367219 TRR B Feb. 18, 2020, 9:40 a.m. OK Mono C# TESTS 34 93 10444800 1300
71447697 Ruban_Denic B Feb. 19, 2020, 3:44 p.m. OK Mono C# TESTS 34 93 10444800 1300
71323380 V.Gladin B Feb. 17, 2020, 5:17 p.m. OK Mono C# TESTS 34 109 14438400 1300
71341528 thetansquared B Feb. 17, 2020, 8:58 p.m. OK Mono C# TESTS 34 109 16486400 1300
71303975 artworks B Feb. 17, 2020, 4:11 p.m. OK Mono C# TESTS 34 124 16281600 1300
71613919 vjudge1 B Feb. 22, 2020, 1:24 p.m. OK MS C++ TESTS 34 46 0 1300
71310240 YangYaya B Feb. 17, 2020, 4:29 p.m. OK MS C++ TESTS 34 46 0 1300
71375565 sdibt1 B Feb. 18, 2020, 12:21 p.m. OK MS C++ TESTS 34 46 409600 1300
71474862 Stanley_Shao B Feb. 20, 2020, 5:57 a.m. OK MS C++ TESTS 34 46 409600 1300
71345813 tarattata1 B Feb. 18, 2020, 12:02 a.m. OK MS C++ TESTS 34 46 409600 1300
71376038 vjudge2 B Feb. 18, 2020, 12:29 p.m. OK MS C++ TESTS 34 108 0 1300
71373147 vjudge3 B Feb. 18, 2020, 11:40 a.m. OK MS C++ TESTS 34 109 0 1300
71322036 mostafa_gamal_564 B Feb. 17, 2020, 5:12 p.m. OK MS C++ TESTS 34 109 0 1300
71377402 vjudge2 B Feb. 18, 2020, 12:48 p.m. OK MS C++ TESTS 34 109 1638400 1300
71309600 MinhNguye B Feb. 17, 2020, 4:27 p.m. OK MS C++ TESTS 34 124 409600 1300
71355026 AleXandrite B Feb. 18, 2020, 5:38 a.m. OK MS C++ 2017 TESTS 34 46 0 1300
71345221 YTICpoch B Feb. 17, 2020, 11:24 p.m. OK MS C++ 2017 TESTS 34 46 409600 1300
71312471 dddttdCF B Feb. 17, 2020, 4:36 p.m. OK MS C++ 2017 TESTS 34 61 0 1300
71352721 Ni123 B Feb. 18, 2020, 4:45 a.m. OK MS C++ 2017 TESTS 34 61 0 1300
71318283 Huahuahuo B Feb. 17, 2020, 4:57 p.m. OK MS C++ 2017 TESTS 34 61 0 1300
71307210 Tuenjuko B Feb. 17, 2020, 4:20 p.m. OK MS C++ 2017 TESTS 34 61 0 1300
71304612 _hyh_ B Feb. 17, 2020, 4:13 p.m. OK MS C++ 2017 TESTS 34 61 0 1300
71485392 kaist_yechan B Feb. 20, 2020, 9:55 a.m. OK MS C++ 2017 TESTS 34 61 409600 1300
71436370 fucking_man B Feb. 19, 2020, 12:34 p.m. OK MS C++ 2017 TESTS 34 62 307200 1300
71316323 foxdream B Feb. 17, 2020, 4:50 p.m. OK MS C++ 2017 TESTS 34 62 409600 1300
71322808 yoralbayev B Feb. 17, 2020, 5:15 p.m. OK PHP TESTS 34 46 10035200 1300
71319194 Bekzaat17 B Feb. 17, 2020, 5 p.m. OK PHP TESTS 34 62 10035200 1300
71322757 erbolat0311 B Feb. 17, 2020, 5:15 p.m. OK PHP TESTS 34 62 14233600 1300
71306376 Mukundan314 B Feb. 17, 2020, 4:18 p.m. OK PyPy 2 TESTS 34 171 7987200 1300
71309530 wa1 B Feb. 17, 2020, 4:27 p.m. OK PyPy 2 TESTS 34 218 7372800 1300
71386481 abhigupta4 B Feb. 18, 2020, 3:02 p.m. OK PyPy 2 TESTS 34 234 7680000 1300
71340376 rkstalker B Feb. 17, 2020, 8:28 p.m. OK PyPy 2 TESTS 34 249 10240000 1300
71303603 shehebe B Feb. 17, 2020, 4:10 p.m. OK PyPy 2 TESTS 34 249 12697600 1300
71416373 GTrigger B Feb. 19, 2020, 5:47 a.m. OK PyPy 2 TESTS 34 342 8089600 1300
71375711 hritik3878 B Feb. 18, 2020, 12:23 p.m. OK PyPy 2 TESTS 34 420 8089600 1300
71421961 23sergey03 B Feb. 19, 2020, 7:53 a.m. OK PyPy 3 TESTS 34 217 10547200 1300
71506820 bhavik07 B Feb. 20, 2020, 4:40 p.m. OK PyPy 3 TESTS 34 233 10444800 1300
71352168 rajatgedam B Feb. 18, 2020, 4:29 a.m. OK PyPy 3 TESTS 34 233 10649600 1300
71349432 thekushalghosh B Feb. 18, 2020, 2:53 a.m. OK PyPy 3 TESTS 34 233 10649600 1300
71336191 thekushalghosh B Feb. 17, 2020, 7:13 p.m. OK PyPy 3 TESTS 34 233 10649600 1300
71334340 bharath B Feb. 17, 2020, 6:53 p.m. OK PyPy 3 TESTS 34 233 10649600 1300
71370088 KirKhal B Feb. 18, 2020, 10:39 a.m. OK PyPy 3 TESTS 34 233 10752000 1300
71335416 neweekoff B Feb. 17, 2020, 7:03 p.m. OK PyPy 3 TESTS 34 233 10752000 1300
71352577 marcus.aure B Feb. 18, 2020, 4:41 a.m. OK PyPy 3 TESTS 34 233 11161600 1300
71317715 Jos B Feb. 17, 2020, 4:54 p.m. OK PyPy 3 TESTS 34 234 11878400 1300
71416349 GTrigger B Feb. 19, 2020, 5:46 a.m. OK Python 2 TESTS 34 248 5632000 1300
71547844 paruby B Feb. 21, 2020, 12:01 p.m. OK Python 2 TESTS 34 249 6553600 1300
71382369 soumyasarkar1998 B Feb. 18, 2020, 1:58 p.m. OK Python 2 TESTS 34 280 5632000 1300
71455855 KhozmoS B Feb. 19, 2020, 6:15 p.m. OK Python 2 TESTS 34 280 9113600 1300
71320446 ComptineDunAutreEte B Feb. 17, 2020, 5:05 p.m. OK Python 2 TESTS 34 311 5632000 1300
71475120 JustasLe B Feb. 20, 2020, 6:04 a.m. OK Python 3 TESTS 34 124 8806400 1300
71609490 n1ko B Feb. 22, 2020, 11:51 a.m. OK Python 3 TESTS 34 139 8806400 1300
71446464 h20191030154 B Feb. 19, 2020, 3:21 p.m. OK Python 3 TESTS 34 139 8806400 1300
71353521 jeenie145 B Feb. 18, 2020, 5:05 a.m. OK Python 3 TESTS 34 139 8806400 1300
71303277 BlackBear B Feb. 17, 2020, 4:09 p.m. OK Python 3 TESTS 34 139 8806400 1300
71351900 rowingpy B Feb. 18, 2020, 4:20 a.m. OK Python 3 TESTS 34 140 8499200 1300
71605733 Brahma_Thigathathigan B Feb. 22, 2020, 10:39 a.m. OK Python 3 TESTS 34 140 8704000 1300
71426626 FallingStar B Feb. 19, 2020, 9:26 a.m. OK Python 3 TESTS 34 140 8704000 1300
71402221 LintuStorm B Feb. 18, 2020, 8:03 p.m. OK Python 3 TESTS 34 140 8704000 1300
71387170 _cerealkiller B Feb. 18, 2020, 3:13 p.m. OK Python 3 TESTS 34 140 8704000 1300
71447175 toterpinguin B Feb. 19, 2020, 3:34 p.m. OK Rust TESTS 34 46 3072000 1300
71542760 Lvl999Noob B Feb. 21, 2020, 10:11 a.m. OK Rust TESTS 34 46 3174400 1300
71317023 jerry73204 B Feb. 17, 2020, 4:52 p.m. OK Rust TESTS 34 46 3891200 1300
71311475 BadDuck B Feb. 17, 2020, 4:33 p.m. OK Scala TESTS 34 529 0 1300

remove filters

Back to search problems