Codeforces Round 858 (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
1806 Codeforces Round 858 (Div. 2) FINISHED False 8100 58125262 March 18, 2023, 12:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 26720 ) A Walking Master PROGRAMMING geometry greedy math

B'YunQian is standing on an infinite plane with the Cartesian coordinate system on it. In one move, she can move to the diagonally adjacent point on the top right or the adjacent point on the left. That is, if she is standing on point (x,y) , she can either move to point (x+1,y+1) or point (x-1,y) . YunQian initially stands at point (a,b) and wants to move to point (c,d) . Find the minimum number of moves she needs to make or declare that it is impossible. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of test cases follows. The first line and only line of each test case contain four integers a , b , c , d ( -10^8 <= a,b,c,d <= 10^8 ). For each test case, if it is possible to move from point (a,b) to point (c,d) , output the minimum number of moves. Otherwise, output -1 . In the first test case, one possible way using 4 moves is (-1,0) to (0,1) to (-1,1) to (0,2) to (-1,2) . It can be proven that it is impossible to move from point (-1,0) to point (-1,2) in less than 4 moves. '...

Tutorials

Codeforces Round #858 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
198033504 Nutmeg21 A March 19, 2023, 2:06 a.m. OK C# 10 TESTS 5 93 3379200
198026758 bluemegane A March 18, 2023, 10:55 p.m. OK C# 8 TESTS 3 109 3174400
197980653 joshivarad A March 18, 2023, 3:11 p.m. OK Clang++17 Diagnostics TESTS 3 234 0
197985232 2912773259 A March 18, 2023, 3:39 p.m. OK Clang++17 Diagnostics TESTS 3 280 0
197986688 TJ_ovo A March 18, 2023, 3:49 p.m. OK Clang++20 Diagnostics TESTS 3 30 0
198017416 borekus A March 18, 2023, 8:15 p.m. OK Clang++20 Diagnostics TESTS 3 217 0
197985606 sreehithanamana A March 18, 2023, 3:42 p.m. OK Clang++20 Diagnostics TESTS 3 233 0
198003819 zobaer_shakib A March 18, 2023, 6:02 p.m. OK Clang++20 Diagnostics TESTS 3 249 0
198018388 samiulislamdurjoy A March 18, 2023, 8:28 p.m. OK Clang++20 Diagnostics TESTS 3 264 0
198046616 ItsAJHarsh A March 19, 2023, 5:47 a.m. OK Clang++20 Diagnostics TESTS 5 280 0
197990323 samiulislamdurjoy A March 18, 2023, 4:16 p.m. OK Clang++20 Diagnostics TESTS 3 280 0
198031045 FST_Forces A March 19, 2023, 1:05 a.m. OK FPC TESTS 5 46 0
197998381 Elalawy A March 18, 2023, 5:19 p.m. OK GNU C11 TESTS 3 15 0
198006398 bhargav_ganesh A March 18, 2023, 6:24 p.m. OK GNU C11 TESTS 3 46 0
197984571 jarifulovi A March 18, 2023, 3:35 p.m. OK GNU C11 TESTS 3 46 0
197987586 vedic86 A March 18, 2023, 3:56 p.m. OK GNU C11 TESTS 3 46 0
198005423 jack.murphy.mydays A March 18, 2023, 6:16 p.m. OK GNU C11 TESTS 3 46 0
198006233 naruto____ A March 18, 2023, 6:22 p.m. OK GNU C11 TESTS 3 46 0
197973550 MaticMate A March 18, 2023, 2:19 p.m. OK GNU C11 TESTS 3 46 0
198009569 Mashruf99 A March 18, 2023, 6:53 p.m. OK GNU C11 TESTS 3 46 0
198014339 sasukeuzumaki A March 18, 2023, 7:42 p.m. OK GNU C11 TESTS 3 46 0
198039275 Williampku A March 19, 2023, 4:06 a.m. OK GNU C11 TESTS 5 46 0
197999419 devit121 A March 18, 2023, 5:27 p.m. OK GNU C++14 TESTS 3 0 0
198016704 amirhoseinfar1385 A March 18, 2023, 8:07 p.m. OK GNU C++14 TESTS 3 0 0
198007007 zsxuan A March 18, 2023, 6:29 p.m. OK GNU C++14 TESTS 3 0 0
198039742 penghangbo A March 19, 2023, 4:15 a.m. OK GNU C++14 TESTS 5 15 0
198040097 wust-zzl A March 19, 2023, 4:22 a.m. OK GNU C++14 TESTS 5 15 0
198040134 minhnhatmn16 A March 19, 2023, 4:22 a.m. OK GNU C++14 TESTS 5 15 0
198041035 ShUO-_-- A March 19, 2023, 4:37 a.m. OK GNU C++14 TESTS 5 15 0
198045318 mayiran A March 19, 2023, 5:34 a.m. OK GNU C++14 TESTS 5 15 0
198045391 WangxunCF A March 19, 2023, 5:34 a.m. OK GNU C++14 TESTS 5 15 0
198046777 yxq090624 A March 19, 2023, 5:49 a.m. OK GNU C++14 TESTS 5 15 0
198027993 Mostafa__Fouad A March 18, 2023, 11:30 p.m. OK GNU C++17 TESTS 3 0 0
197977936 Mosabber_Hossain A March 18, 2023, 2:56 p.m. OK GNU C++17 TESTS 3 0 0
197983016 Nahid_Faraji A March 18, 2023, 3:25 p.m. OK GNU C++17 TESTS 3 0 0
197991300 _notAcoder_ A March 18, 2023, 4:24 p.m. OK GNU C++17 TESTS 3 0 0
198047048 kannan_16 A March 19, 2023, 5:51 a.m. OK GNU C++17 TESTS 5 15 0
198046481 Chankya_kautilya A March 19, 2023, 5:46 a.m. OK GNU C++17 TESTS 5 15 0
198045776 Webbly A March 19, 2023, 5:39 a.m. OK GNU C++17 TESTS 5 15 0
198045033 Badhon_1 A March 19, 2023, 5:31 a.m. OK GNU C++17 TESTS 5 15 0
198044490 redwood__ A March 19, 2023, 5:25 a.m. OK GNU C++17 TESTS 5 15 0
198044427 HeWei0622 A March 19, 2023, 5:24 a.m. OK GNU C++17 TESTS 5 15 0
198000621 scotchtape13 A March 18, 2023, 5:36 p.m. OK GNU C++17 (64) TESTS 3 15 0
198047924 Njaso A March 19, 2023, 5:59 a.m. OK GNU C++17 (64) TESTS 5 15 0
198041135 ankancool A March 19, 2023, 4:39 a.m. OK GNU C++17 (64) TESTS 5 15 0
198035576 hlrf1571513243 A March 19, 2023, 2:50 a.m. OK GNU C++17 (64) TESTS 5 15 0
198032155 black_trees A March 19, 2023, 1:33 a.m. OK GNU C++17 (64) TESTS 5 15 0
198031768 _JSYX_ A March 19, 2023, 1:23 a.m. OK GNU C++17 (64) TESTS 5 15 0
198028158 3304701766 A March 18, 2023, 11:35 p.m. OK GNU C++17 (64) TESTS 3 15 0
198021722 aeksin A March 18, 2023, 9:16 p.m. OK GNU C++17 (64) TESTS 3 15 0
198006120 israil445 A March 18, 2023, 6:21 p.m. OK GNU C++17 (64) TESTS 3 15 0
198005581 sb_decoder A March 18, 2023, 6:17 p.m. OK GNU C++17 (64) TESTS 3 15 0
197995804 Sushant_Gadyal_019 A March 18, 2023, 4:59 p.m. OK GNU C++20 (64) TESTS 3 0 0
197996340 KhanhTP165 A March 18, 2023, 5:03 p.m. OK GNU C++20 (64) TESTS 3 0 0
197999042 Mah1r A March 18, 2023, 5:24 p.m. OK GNU C++20 (64) TESTS 3 0 0
198009188 scibaker7 A March 18, 2023, 6:49 p.m. OK GNU C++20 (64) TESTS 3 0 0
198010143 piyushyadu A March 18, 2023, 6:58 p.m. OK GNU C++20 (64) TESTS 3 0 0
198028206 Raghad78 A March 18, 2023, 11:36 p.m. OK GNU C++20 (64) TESTS 3 0 0
198030612 TONEY A March 19, 2023, 12:51 a.m. OK GNU C++20 (64) TESTS 5 0 0
198031796 bobo34 A March 19, 2023, 1:24 a.m. OK GNU C++20 (64) TESTS 5 0 0
198040333 Rainandbow A March 19, 2023, 4:26 a.m. OK GNU C++20 (64) TESTS 5 0 0
198044066 ELBerr A March 19, 2023, 5:19 a.m. OK GNU C++20 (64) TESTS 5 0 0
197977406 oblivionking62 A March 18, 2023, 2:54 p.m. OK Java 11 TESTS 3 171 409600
197983725 furating A March 18, 2023, 3:29 p.m. OK Java 11 TESTS 3 186 512000
197976040 Ayyylmao A March 18, 2023, 2:49 p.m. OK Java 11 TESTS 3 217 1536000
198046116 jumand909 A March 19, 2023, 5:42 a.m. OK Java 11 TESTS 5 264 614400
198043766 erasmas A March 19, 2023, 5:16 a.m. OK Java 11 TESTS 5 264 1126400
198027286 jsheng555 A March 18, 2023, 11:10 p.m. OK Java 11 TESTS 3 327 1228800
198006139 vedhsivaji2002 A March 18, 2023, 6:21 p.m. OK Java 11 TESTS 3 327 1228800
197977800 MaSaRwI_19 A March 18, 2023, 2:56 p.m. OK Java 11 TESTS 3 327 1228800
197976831 orangefly A March 18, 2023, 2:51 p.m. OK Java 11 TESTS 3 342 1126400
198007378 LucunJi A March 18, 2023, 6:32 p.m. OK Java 17 TESTS 3 139 1638400
198005370 Extradict A March 18, 2023, 6:15 p.m. OK Java 17 TESTS 3 155 1126400
198005671 swatishivam23 A March 18, 2023, 6:18 p.m. OK Java 17 TESTS 3 155 1331200
197989278 xyz_000 A March 18, 2023, 4:09 p.m. OK Java 17 TESTS 3 202 1228800
197979963 mcrash12 A March 18, 2023, 3:07 p.m. OK Java 17 TESTS 3 218 1126400
197990123 manish47 A March 18, 2023, 4:15 p.m. OK Java 17 TESTS 3 218 2150400
197972295 uwizeyesandri A March 18, 2023, 2:17 p.m. OK Java 17 TESTS 3 280 1228800
198001891 vm2124 A March 18, 2023, 5:46 p.m. OK Java 17 TESTS 3 280 2252800
197972832 diveshmahajan A March 18, 2023, 2:18 p.m. OK Java 17 TESTS 3 296 1331200
198044058 sanath.r A March 19, 2023, 5:19 a.m. OK Java 17 TESTS 5 296 1945600
197982351 ankit_0207 A March 18, 2023, 3:21 p.m. OK Java 8 TESTS 3 109 0
197995550 raj_shahh A March 18, 2023, 4:57 p.m. OK Java 8 TESTS 3 124 39833600
197988967 Mohamed_Ahmed A March 18, 2023, 4:06 p.m. OK Java 8 TESTS 3 139 0
197983054 Koka A March 18, 2023, 3:25 p.m. OK Java 8 TESTS 3 140 0
198045387 q2045891621. A March 19, 2023, 5:34 a.m. OK Java 8 TESTS 5 155 0
198005966 ashdeepsingh1997 A March 18, 2023, 6:20 p.m. OK Java 8 TESTS 3 155 0
197995246 elgamel A March 18, 2023, 4:54 p.m. OK Java 8 TESTS 3 155 0
197982661 KHUSHI_SINGH_23 A March 18, 2023, 3:23 p.m. OK Java 8 TESTS 3 155 0
198001938 abhi1_27_9 A March 18, 2023, 5:47 p.m. OK Java 8 TESTS 3 233 0
197988298 solver2021 A March 18, 2023, 4:01 p.m. OK Java 8 TESTS 3 233 0
197990495 Bland_nothing A March 18, 2023, 4:18 p.m. OK MS C++ 2017 TESTS 3 31 0
197988121 yuzizhou A March 18, 2023, 4 p.m. OK MS C++ 2017 TESTS 3 31 0
197991275 yuzizhou A March 18, 2023, 4:24 p.m. OK MS C++ 2017 TESTS 3 46 0
197990974 yuzizhou A March 18, 2023, 4:21 p.m. OK MS C++ 2017 TESTS 3 61 0
197990291 yuzizhou A March 18, 2023, 4:16 p.m. OK MS C++ 2017 TESTS 3 62 0
197989747 Bland_nothing A March 18, 2023, 4:12 p.m. OK MS C++ 2017 TESTS 3 62 0
198022626 chirag155 A March 18, 2023, 9:31 p.m. OK MS C++ 2017 TESTS 3 77 0
198015930 daksharora A March 18, 2023, 7:58 p.m. OK MS C++ 2017 TESTS 3 77 0
198015319 daksharora A March 18, 2023, 7:52 p.m. OK MS C++ 2017 TESTS 3 77 0
198014580 D1mas A March 18, 2023, 7:44 p.m. OK MS C++ 2017 TESTS 3 77 0
197987142 light_ab A March 18, 2023, 3:53 p.m. OK PyPy 3 TESTS 3 155 6860800
198043913 ealeksandrov A March 19, 2023, 5:17 a.m. OK PyPy 3 TESTS 5 249 8499200
197998016 JohnX4321 A March 18, 2023, 5:16 p.m. OK PyPy 3 TESTS 3 280 7168000
198002495 AnuragRoy485 A March 18, 2023, 5:52 p.m. OK PyPy 3 TESTS 3 295 7168000
198027047 cerebi A March 18, 2023, 11:03 p.m. OK PyPy 3 TESTS 3 296 7168000
197977690 jvatsal0709 A March 18, 2023, 2:55 p.m. OK PyPy 3 TESTS 3 296 7168000
198034575 gujik A March 19, 2023, 2:29 a.m. OK PyPy 3 TESTS 5 296 7372800
197984356 Red_eye_ A March 18, 2023, 3:33 p.m. OK PyPy 3 TESTS 3 296 7372800
197971826 klucse2000030199 A March 18, 2023, 2:16 p.m. OK PyPy 3 TESTS 3 311 7065600
198022756 bpdolson A March 18, 2023, 9:34 p.m. OK PyPy 3 TESTS 3 311 8704000
198027986 kavorka A March 18, 2023, 11:30 p.m. OK PyPy 3-64 TESTS 3 77 5222400
197977752 smilence A March 18, 2023, 2:56 p.m. OK PyPy 3-64 TESTS 3 93 6963200
198035056 Youarenotgood A March 19, 2023, 2:40 a.m. OK PyPy 3-64 TESTS 5 108 9113600
197978660 gardengnome A March 18, 2023, 3 p.m. OK PyPy 3-64 TESTS 3 109 9318400
197988570 mani_sarthak A March 18, 2023, 4:03 p.m. OK PyPy 3-64 TESTS 3 109 9728000
197985105 manisarthak6914 A March 18, 2023, 3:38 p.m. OK PyPy 3-64 TESTS 3 109 9728000
197983789 ankitesh A March 18, 2023, 3:30 p.m. OK PyPy 3-64 TESTS 3 124 8192000
197994326 Utkarshg001 A March 18, 2023, 4:47 p.m. OK PyPy 3-64 TESTS 3 124 8806400
197976256 christopher083 A March 18, 2023, 2:49 p.m. OK PyPy 3-64 TESTS 3 124 9011200
198032999 RobinFromTheHood A March 19, 2023, 1:55 a.m. OK PyPy 3-64 TESTS 5 124 9113600
197981637 biltharesatyendra A March 18, 2023, 3:17 p.m. OK Python 2 TESTS 3 61 0
197971546 charann06 A March 18, 2023, 2:15 p.m. OK Python 3 TESTS 3 61 0
197976410 eugalt A March 18, 2023, 2:50 p.m. OK Python 3 TESTS 3 77 512000
198009595 krambf A March 18, 2023, 6:53 p.m. OK Python 3 TESTS 3 77 1228800
197992302 borekus A March 18, 2023, 4:32 p.m. OK Python 3 TESTS 3 78 3686400
197994561 sahil45 A March 18, 2023, 4:49 p.m. OK Python 3 TESTS 3 93 0
198043213 reza76 A March 19, 2023, 5:09 a.m. OK Python 3 TESTS 5 108 0
198004192 MubassirSadik A March 18, 2023, 6:06 p.m. OK Python 3 TESTS 3 108 0
197983100 Fahmid.Arman A March 18, 2023, 3:26 p.m. OK Python 3 TESTS 3 108 0
198003865 abdnnur333 A March 18, 2023, 6:03 p.m. OK Python 3 TESTS 3 109 0
198015833 mintesnotM A March 18, 2023, 7:57 p.m. OK Python 3 TESTS 3 109 716800

remove filters

Back to search problems