Codeforces Round 620 (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
1304 Codeforces Round 620 (Div. 2) FINISHED False 7200 150051299 Feb. 15, 2020, 1:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 25598 ) A Two Rabbits PROGRAMMING math 800

B"Being tired of participating in too many Codeforces rounds, Gildong decided to take some rest in a park. He sat down on a bench, and soon he found two rabbits hopping around. One of the rabbits was taller than the other. He noticed that the two rabbits were hopping towards each other. The positions of the two rabbits can be represented as integer coordinates on a horizontal line. The taller rabbit is currently on position x , and the shorter rabbit is currently on position y ( x lt y ). Every second, each rabbit hops to another position. The taller rabbit hops to the positive direction by a , and the shorter rabbit hops to the negative direction by b . For example, let's say x=0 , y=10 , a=2 , and b=3 . At the 1 -st second, each rabbit will be at position 2 and 7 . At the 2 -nd second, both rabbits will be at position 4 . Gildong is now wondering: Will the two rabbits be at the same position at the same moment? If so, how long will it take? Let's find a moment in time (in seconds) after which the rabbits will be at the same point. Each test contains one or more test cases. The first line contains the number of test cases t ( 1 <= t <= 1000 ). Each test case contains exactly one line. The line consists of four integers x , y , a , b ( 0 <= x lt y <= 10^9 , 1 <= a,b <= 10^9 ) -- the current position of the taller rabbit, the current position of the shorter rabbit, the hopping distance of the taller rabbit, and the hopping distance of the shorter rabbit, respectively. For each test case, print the single integer: number of seconds the two rabbits will take to be at the same position. If the two rabbits will never be at the same position simultaneously, print -1 . The first case is explained in the description. In the second case, each rabbit will be at position 3 and 7 respectively at the 1 -st second. But in the 2$$"...

Tutorials

Codeforces Round #620 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
71489912 h1210678020 A Feb. 20, 2020, 11:39 a.m. OK Clang++17 Diagnostics TESTS 16 46 0 800
71623231 Xishan A Feb. 22, 2020, 4:34 p.m. OK Clang++17 Diagnostics TESTS 16 62 0 800
71602226 JWoong149 A Feb. 22, 2020, 9:36 a.m. OK Clang++17 Diagnostics TESTS 16 62 0 800
71194234 yeshendeyuea A Feb. 16, 2020, 3:47 a.m. OK Clang++17 Diagnostics TESTS 16 62 0 800
71511694 Gurpreet_1 A Feb. 20, 2020, 6:16 p.m. OK Clang++17 Diagnostics TESTS 16 62 0 800
71198465 ftiasch A Feb. 16, 2020, 5:35 a.m. OK D TESTS 16 31 0 800
71207111 patuan A Feb. 16, 2020, 8:04 a.m. OK FPC TESTS 16 31 0 800
71472575 OtherPhantasy A Feb. 20, 2020, 4:49 a.m. OK FPC TESTS 16 31 204800 800
71552920 zsz12251665 A Feb. 21, 2020, 1:34 p.m. OK FPC TESTS 16 31 204800 800
71149231 canhtoanxyz A Feb. 15, 2020, 2:03 p.m. OK FPC TESTS 16 46 307200 800
71403439 hamim360 A Feb. 18, 2020, 8:37 p.m. OK GNU C11 TESTS 16 15 0 800
71280856 vjudge5 A Feb. 17, 2020, 1:43 p.m. OK GNU C11 TESTS 16 15 0 800
71446542 vjudge4 A Feb. 19, 2020, 3:22 p.m. OK GNU C11 TESTS 16 30 0 800
71335300 Abhishek_Hande A Feb. 17, 2020, 7:02 p.m. OK GNU C11 TESTS 16 30 0 800
71207145 JirenUI A Feb. 16, 2020, 8:05 a.m. OK GNU C11 TESTS 16 30 0 800
71154777 Ankit_raj_007 A Feb. 15, 2020, 2:23 p.m. OK GNU C11 TESTS 16 30 0 800
71143905 Next_Coding A Feb. 15, 2020, 1:46 p.m. OK GNU C11 TESTS 16 30 0 800
71141890 hnust_hecunmao A Feb. 15, 2020, 1:41 p.m. OK GNU C11 TESTS 16 30 0 800
71640077 guozhiqiang00 A Feb. 23, 2020, 2:37 a.m. OK GNU C11 TESTS 16 31 0 800
71631128 farhanitrate A Feb. 22, 2020, 7:34 p.m. OK GNU C11 TESTS 16 31 0 800
71380760 chenshi028 A Feb. 18, 2020, 1:35 p.m. OK GNU C++11 TESTS 16 15 0 800
71255198 luogu_bot1 A Feb. 17, 2020, 4:04 a.m. OK GNU C++11 TESTS 16 15 0 800
71222477 TheGodofTVSeries A Feb. 16, 2020, 12:42 p.m. OK GNU C++11 TESTS 16 15 0 800
71202420 wasa855 A Feb. 16, 2020, 6:46 a.m. OK GNU C++11 TESTS 16 15 0 800
71189705 BF666 A Feb. 16, 2020, 12:35 a.m. OK GNU C++11 TESTS 16 15 0 800
71181865 cyclexit A Feb. 15, 2020, 7:51 p.m. OK GNU C++11 TESTS 16 15 0 800
71153498 hnust_sunchen A Feb. 15, 2020, 2:18 p.m. OK GNU C++11 TESTS 16 15 0 800
71142045 linmingying A Feb. 15, 2020, 1:41 p.m. OK GNU C++11 TESTS 16 15 0 800
71604686 ChiNhan A Feb. 22, 2020, 10:19 a.m. OK GNU C++11 TESTS 16 15 0 800
71640210 vjudge1 A Feb. 23, 2020, 2:46 a.m. OK GNU C++11 TESTS 16 15 0 800
71624031 awaracoder A Feb. 22, 2020, 4:50 p.m. OK GNU C++14 TESTS 16 15 0 800
71640527 akhila1 A Feb. 23, 2020, 3:05 a.m. OK GNU C++14 TESTS 16 15 0 800
71470393 kd07 A Feb. 20, 2020, 3:29 a.m. OK GNU C++14 TESTS 16 15 0 800
71511811 alazycoder A Feb. 20, 2020, 6:19 p.m. OK GNU C++14 TESTS 16 15 0 800
71524325 HIKKAN A Feb. 21, 2020, 2:52 a.m. OK GNU C++14 TESTS 16 15 0 800
71525361 abhishekkumar2718 A Feb. 21, 2020, 3:32 a.m. OK GNU C++14 TESTS 16 15 0 800
71526161 vjudge5 A Feb. 21, 2020, 4:04 a.m. OK GNU C++14 TESTS 16 15 0 800
71600277 k_k_hiroki A Feb. 22, 2020, 9:04 a.m. OK GNU C++14 TESTS 16 15 0 800
71468438 pranu1300 A Feb. 20, 2020, 2:02 a.m. OK GNU C++14 TESTS 16 15 0 800
71452735 gd_nmd_vaibhav A Feb. 19, 2020, 5:14 p.m. OK GNU C++14 TESTS 16 15 0 800
71552013 t3018210153 A Feb. 21, 2020, 1:18 p.m. OK GNU C++17 TESTS 16 15 0 800
71635129 cd2903 A Feb. 22, 2020, 9:37 p.m. OK GNU C++17 TESTS 16 15 0 800
71625519 toshif A Feb. 22, 2020, 5:22 p.m. OK GNU C++17 TESTS 16 15 0 800
71550324 HurmousDay A Feb. 21, 2020, 12:49 p.m. OK GNU C++17 TESTS 16 15 0 800
71548827 Kaga A Feb. 21, 2020, 12:21 p.m. OK GNU C++17 TESTS 16 15 0 800
71547842 Noimin A Feb. 21, 2020, 12:01 p.m. OK GNU C++17 TESTS 16 15 0 800
71541006 majid.sepasi A Feb. 21, 2020, 9:35 a.m. OK GNU C++17 TESTS 16 15 0 800
71537161 JainSahb_13 A Feb. 21, 2020, 8:20 a.m. OK GNU C++17 TESTS 16 15 0 800
71534207 Baroudy A Feb. 21, 2020, 7:24 a.m. OK GNU C++17 TESTS 16 15 0 800
71480584 Sorting A Feb. 20, 2020, 8:12 a.m. OK GNU C++17 TESTS 16 15 0 800
71414784 wzazzy A Feb. 19, 2020, 5:06 a.m. OK Go TESTS 16 31 0 800
71398853 fc-lib-xyz A Feb. 18, 2020, 6:44 p.m. OK Go TESTS 16 31 0 800
71384123 toterpinguin A Feb. 18, 2020, 2:24 p.m. OK Go TESTS 16 31 0 800
71183740 amarjeetanand A Feb. 15, 2020, 8:34 p.m. OK Go TESTS 16 31 0 800
71173662 synapse A Feb. 15, 2020, 5:24 p.m. OK Go TESTS 16 31 0 800
71275201 Exbooze A Feb. 17, 2020, 11:52 a.m. OK Go TESTS 16 46 0 800
71191489 pdah A Feb. 16, 2020, 2:04 a.m. OK Go TESTS 16 140 0 800
71608679 bqtrung A Feb. 22, 2020, 11:37 a.m. OK Go TESTS 16 155 0 800
71556269 ExpertNextYear A Feb. 21, 2020, 2:31 p.m. OK Go TESTS 16 155 0 800
71538437 darshanreddy90 A Feb. 21, 2020, 8:45 a.m. OK Go TESTS 16 155 0 800
71285306 Anonymous A Feb. 17, 2020, 3 p.m. OK Java 11 TESTS 16 171 0 800
71529399 pennyIsLove A Feb. 21, 2020, 5:44 a.m. OK Java 11 TESTS 16 186 0 800
71503451 GiantTornado A Feb. 20, 2020, 3:33 p.m. OK Java 11 TESTS 16 186 0 800
71637808 sajith A Feb. 22, 2020, 11:59 p.m. OK Java 11 TESTS 16 187 0 800
71418199 Azakarka A Feb. 19, 2020, 6:29 a.m. OK Java 11 TESTS 16 187 0 800
71614695 bharath281 A Feb. 22, 2020, 1:38 p.m. OK Java 11 TESTS 16 202 0 800
71611927 Hexomiter A Feb. 22, 2020, 12:43 p.m. OK Java 11 TESTS 16 202 0 800
71606299 yamen.haddad A Feb. 22, 2020, 10:50 a.m. OK Java 11 TESTS 16 202 0 800
71345324 enricogi A Feb. 17, 2020, 11:30 p.m. OK Java 11 TESTS 16 202 0 800
71274536 Vatsal53 A Feb. 17, 2020, 11:39 a.m. OK Java 11 TESTS 16 202 0 800
71179541 rahsutamrev A Feb. 15, 2020, 7:03 p.m. OK Java 8 TESTS 16 108 0 800
71542638 jaynils A Feb. 21, 2020, 10:08 a.m. OK Java 8 TESTS 16 109 0 800
71374013 darshan287 A Feb. 18, 2020, 11:55 a.m. OK Java 8 TESTS 16 109 0 800
71267894 shashwat07 A Feb. 17, 2020, 9:19 a.m. OK Java 8 TESTS 16 109 0 800
71250629 bluesky111 A Feb. 17, 2020, 12:39 a.m. OK Java 8 TESTS 16 109 0 800
71209226 johnny16 A Feb. 16, 2020, 8:40 a.m. OK Java 8 TESTS 16 109 0 800
71183395 prem_cse A Feb. 15, 2020, 8:25 p.m. OK Java 8 TESTS 16 109 0 800
71171527 shubhampandey18 A Feb. 15, 2020, 4:58 p.m. OK Java 8 TESTS 16 109 0 800
71565980 jakejase2 A Feb. 21, 2020, 5:19 p.m. OK Java 8 TESTS 16 124 0 800
71564565 OmarRadwan A Feb. 21, 2020, 4:54 p.m. OK Java 8 TESTS 16 124 0 800
71626376 pseudonimoX A Feb. 22, 2020, 5:41 p.m. OK JavaScript TESTS 16 31 1126400 800
71486760 ______nati_bosto______ A Feb. 20, 2020, 10:23 a.m. OK JavaScript TESTS 16 31 1126400 800
71369773 pseudonimoX A Feb. 18, 2020, 10:32 a.m. OK JavaScript TESTS 16 31 1126400 800
71456134 GTrigger A Feb. 19, 2020, 6:21 p.m. OK JavaScript TESTS 16 31 1228800 800
71338673 pseudonimoX A Feb. 17, 2020, 7:51 p.m. OK JavaScript TESTS 16 61 1126400 800
71169943 icebound A Feb. 15, 2020, 4:47 p.m. OK Kotlin TESTS 16 109 0 800
71611658 vjudge2 A Feb. 22, 2020, 12:38 p.m. OK Kotlin TESTS 16 139 0 800
71608232 vjudge3 A Feb. 22, 2020, 11:28 a.m. OK Kotlin TESTS 16 156 0 800
71607312 vjudge5 A Feb. 22, 2020, 11:11 a.m. OK Kotlin TESTS 16 171 0 800
71287125 david_varela A Feb. 17, 2020, 3:35 p.m. OK Kotlin TESTS 16 171 1331200 800
71637869 Leviathan7 A Feb. 23, 2020, 12:03 a.m. OK Kotlin TESTS 16 186 0 800
71144035 viktorx A Feb. 15, 2020, 1:47 p.m. OK Kotlin TESTS 16 186 204800 800
71401471 mark.salyakhov A Feb. 18, 2020, 7:42 p.m. OK Kotlin TESTS 16 187 204800 800
71269516 T49E2 A Feb. 17, 2020, 9:51 a.m. OK Kotlin TESTS 16 187 204800 800
71192527 KanhuKeNanu A Feb. 16, 2020, 2:44 a.m. OK Kotlin TESTS 16 187 204800 800
71224133 T-D-K A Feb. 16, 2020, 1:12 p.m. OK Mono C# TESTS 16 46 0 800
71234831 serega_228 A Feb. 16, 2020, 4:30 p.m. OK Mono C# TESTS 16 61 409600 800
71388641 kaminoikari A Feb. 18, 2020, 3:38 p.m. OK Mono C# TESTS 16 61 512000 800
71310303 m1_k3 A Feb. 17, 2020, 4:29 p.m. OK Mono C# TESTS 16 62 0 800
71158122 Mefoolyhi A Feb. 15, 2020, 2:35 p.m. OK Mono C# TESTS 16 62 409600 800
71187243 SpinDOS A Feb. 15, 2020, 10:26 p.m. OK Mono C# TESTS 16 62 409600 800
71159767 lyubenKod A Feb. 15, 2020, 2:41 p.m. OK Mono C# TESTS 16 62 512000 800
71543918 nrvg A Feb. 21, 2020, 10:38 a.m. OK Mono C# TESTS 16 62 4198400 800
71148492 igormaslov123 A Feb. 15, 2020, 2 p.m. OK Mono C# TESTS 16 77 4096000 800
71514604 Bobcat A Feb. 20, 2020, 7:30 p.m. OK Mono C# TESTS 16 77 4198400 800
71621546 vjudge1 A Feb. 22, 2020, 3:58 p.m. OK MS C++ TESTS 16 30 0 800
71640038 vjudge1 A Feb. 23, 2020, 2:35 a.m. OK MS C++ TESTS 16 30 0 800
71590272 vjudge5 A Feb. 22, 2020, 6:15 a.m. OK MS C++ TESTS 16 30 0 800
71497422 vjudge5 A Feb. 20, 2020, 1:51 p.m. OK MS C++ TESTS 16 30 0 800
71396019 vjudge2 A Feb. 18, 2020, 5:51 p.m. OK MS C++ TESTS 16 30 0 800
71590309 vjudge5 A Feb. 22, 2020, 6:16 a.m. OK MS C++ TESTS 16 31 0 800
71589870 vjudge3 A Feb. 22, 2020, 6:07 a.m. OK MS C++ TESTS 16 31 0 800
71537934 vjudge4 A Feb. 21, 2020, 8:35 a.m. OK MS C++ TESTS 16 31 0 800
71497111 vjudge3 A Feb. 20, 2020, 1:45 p.m. OK MS C++ TESTS 16 31 0 800
71591327 vjudge3 A Feb. 22, 2020, 6:33 a.m. OK MS C++ TESTS 16 31 0 800
71632757 basel342000 A Feb. 22, 2020, 8:19 p.m. OK MS C++ 2017 TESTS 16 30 0 800
71391427 MinthPanda A Feb. 18, 2020, 4:31 p.m. OK MS C++ 2017 TESTS 16 30 307200 800
71481851 qccccc A Feb. 20, 2020, 8:43 a.m. OK MS C++ 2017 TESTS 16 31 0 800
71490959 vjudge5 A Feb. 20, 2020, 12:01 p.m. OK MS C++ 2017 TESTS 16 31 0 800
71496564 Kmistry A Feb. 20, 2020, 1:36 p.m. OK MS C++ 2017 TESTS 16 31 0 800
71505764 mrrid A Feb. 20, 2020, 4:19 p.m. OK MS C++ 2017 TESTS 16 31 0 800
71593363 vjudge4 A Feb. 22, 2020, 7:09 a.m. OK MS C++ 2017 TESTS 16 31 0 800
71333597 _labib A Feb. 17, 2020, 6:40 p.m. OK MS C++ 2017 TESTS 16 31 0 800
71386923 Wolf_Cub A Feb. 18, 2020, 3:08 p.m. OK MS C++ 2017 TESTS 16 31 0 800
71357587 wdj930729 A Feb. 18, 2020, 6:33 a.m. OK MS C++ 2017 TESTS 16 31 0 800
71279573 freshnewname A Feb. 17, 2020, 1:20 p.m. OK Node.js TESTS 16 171 1433600 800
71150557 shivam1420 A Feb. 15, 2020, 2:07 p.m. OK Node.js TESTS 16 186 3891200 800
71279625 freshnewname A Feb. 17, 2020, 1:21 p.m. OK Node.js TESTS 16 186 3891200 800
71145360 freshnewname A Feb. 15, 2020, 1:50 p.m. OK Node.js TESTS 16 187 3584000 800
71634519 mi7hata1 A Feb. 22, 2020, 9:16 p.m. OK Node.js TESTS 16 202 3891200 800
71280772 denchik007orel57 A Feb. 17, 2020, 1:42 p.m. OK PascalABC.NET TESTS 16 374 102400 800
71577442 Binario A Feb. 21, 2020, 10:08 p.m. OK Perl TESTS 16 31 0 800
71178728 mayakin A Feb. 15, 2020, 6:48 p.m. OK PHP TESTS 16 31 409600 800
71431485 raj1307 A Feb. 19, 2020, 11:03 a.m. OK PyPy 2 TESTS 16 218 409600 800
71510788 mgshuter62 A Feb. 20, 2020, 5:58 p.m. OK PyPy 2 TESTS 16 280 409600 800
71194887 xiema A Feb. 16, 2020, 4:09 a.m. OK PyPy 3 TESTS 16 155 102400 800
71184541 TimurABS A Feb. 15, 2020, 8:55 p.m. OK PyPy 3 TESTS 16 155 1638400 800
71214275 thekushalghosh A Feb. 16, 2020, 10:03 a.m. OK PyPy 3 TESTS 16 155 1740800 800
71212933 happynxy A Feb. 16, 2020, 9:40 a.m. OK PyPy 3 TESTS 16 155 1843200 800
71241129 Coki628 A Feb. 16, 2020, 6:43 p.m. OK PyPy 3 TESTS 16 155 1945600 800
71272638 cpicard443 A Feb. 17, 2020, 10:58 a.m. OK PyPy 3 TESTS 16 156 1638400 800
71189644 m.ni A Feb. 16, 2020, 12:31 a.m. OK PyPy 3 TESTS 16 156 1638400 800
71156413 juandrengifo A Feb. 15, 2020, 2:29 p.m. OK PyPy 3 TESTS 16 171 1638400 800
71611181 Affe A Feb. 22, 2020, 12:28 p.m. OK PyPy 3 TESTS 16 171 2150400 800
71253959 izhang05 A Feb. 17, 2020, 3:15 a.m. OK PyPy 3 TESTS 16 171 2150400 800
71265750 ComptineDunAutreEte A Feb. 17, 2020, 8:31 a.m. OK Python 2 TESTS 16 171 0 800
71236420 purva.taranekar94 A Feb. 16, 2020, 5:04 p.m. OK Python 2 TESTS 16 171 0 800
71243554 elistark A Feb. 16, 2020, 7:45 p.m. OK Python 2 TESTS 16 186 0 800
71284773 alex256gordon A Feb. 17, 2020, 2:49 p.m. OK Python 2 TESTS 16 187 0 800
71264268 SoSooding A Feb. 17, 2020, 7:58 a.m. OK Python 2 TESTS 16 187 0 800
71311863 code_marshal A Feb. 17, 2020, 4:34 p.m. OK Python 2 TESTS 16 187 102400 800
71614409 pavansid69 A Feb. 22, 2020, 1:33 p.m. OK Python 3 TESTS 16 108 0 800
71554442 Fantomer A Feb. 21, 2020, 2 p.m. OK Python 3 TESTS 16 108 0 800
71508048 trAIt0r A Feb. 20, 2020, 5:03 p.m. OK Python 3 TESTS 16 108 307200 800
71336764 mustafa7 A Feb. 17, 2020, 7:21 p.m. OK Python 3 TESTS 16 108 307200 800
71630579 parthgen.p A Feb. 22, 2020, 7:20 p.m. OK Python 3 TESTS 16 109 0 800
71628993 _4C3_ A Feb. 22, 2020, 6:40 p.m. OK Python 3 TESTS 16 109 0 800
71622496 iukhu A Feb. 22, 2020, 4:18 p.m. OK Python 3 TESTS 16 109 0 800
71610076 debjit A Feb. 22, 2020, 12:03 p.m. OK Python 3 TESTS 16 109 0 800
71547273 A0-0A A Feb. 21, 2020, 11:51 a.m. OK Python 3 TESTS 16 109 0 800
71511717 _bit_me_hard A Feb. 20, 2020, 6:17 p.m. OK Python 3 TESTS 16 109 0 800
71346225 enricogi A Feb. 18, 2020, 12:30 a.m. OK Ruby TESTS 16 93 102400 800
71166343 kamil_hism A Feb. 15, 2020, 3:04 p.m. OK Ruby TESTS 16 124 102400 800
71244017 myduomilia A Feb. 16, 2020, 7:58 p.m. OK Rust TESTS 16 31 0 800
71356129 sansen A Feb. 18, 2020, 6:03 a.m. OK Rust TESTS 16 31 102400 800
71543618 Lvl999Noob A Feb. 21, 2020, 10:31 a.m. OK Rust TESTS 16 46 0 800
71383739 toterpinguin A Feb. 18, 2020, 2:18 p.m. OK Rust TESTS 16 46 0 800
71243365 myduomilia A Feb. 16, 2020, 7:40 p.m. OK Rust TESTS 16 46 0 800
71187455 clearlycloudy A Feb. 15, 2020, 10:35 p.m. OK Rust TESTS 16 46 102400 800

remove filters

Back to search problems