Codeforces Round 726 (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
1537 Codeforces Round 726 (Div. 2) FINISHED False 7200 113239463 June 18, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 31359 ) B Bad Boy PROGRAMMING constructive algorithms greedy math

B"Riley is a very bad boy, but at the same time, he is a yo-yo master. So, he decided to use his yo-yo skills to annoy his friend Anton. Anton's room can be represented as a grid with n rows and m columns. Let (i, j) denote the cell in row i and column j . Anton is currently standing at position (i, j) in his room. To annoy Anton, Riley decided to throw exactly two yo-yos in cells of the room (they can be in the same cell). Because Anton doesn't like yo-yos thrown on the floor, he has to pick up both of them and return back to the initial position. The distance travelled by Anton is the shortest path that goes through the positions of both yo-yos and returns back to (i, j) by travelling only to adjacent by side cells. That is, if he is in cell (x, y) then he can travel to the cells (x + 1, y) , (x - 1, y) , (x, y + 1) and (x, y - 1) in one step (if a cell with those coordinates exists). Riley is wondering where he should throw these two yo-yos so that the distance travelled by Anton is maximized. But because he is very busy, he asked you to tell him. The first line contains a single integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. Then t test cases follow. The only line of each test case contains four integers n , m , i , j ( 1 <= q n, m <= q 10^9 , 1 <= i <= n , 1 <= j <= m ) -- the dimensions of the room, and the cell at which Anton is currently standing. For each test case, print four integers x_1 , y_1 , x_2 , y_2 ( 1 <= q x_1, x_2 <= q n , 1 <= y_1, y_2 <= m ) -- the coordinates of where the two yo-yos should be thrown. They will be thrown at coordinates (x_1,y_1) and (x_2,y_2) . If there are multiple answers, you may print any. Here is a visualization of the first test case. "...

Tutorials

Codeforces Round #726 (Div.2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
119941691 royo_sea B June 19, 2021, 3:28 a.m. OK FPC TESTS 21 62 0
119944371 akash0312 B June 19, 2021, 4:09 a.m. OK GNU C11 TESTS 21 61 0
119928625 Lunessel B June 18, 2021, 8:57 p.m. OK GNU C11 TESTS 21 62 0
119949005 patil98varad B June 19, 2021, 5:07 a.m. OK GNU C11 TESTS 21 62 0
119921542 pragatisahoo123jnv B June 18, 2021, 7:09 p.m. OK GNU C11 TESTS 21 78 0
119952640 BugLeave B June 19, 2021, 5:44 a.m. OK GNU C11 TESTS 21 78 0
119935556 sumanthbittu B June 19, 2021, 1:27 a.m. OK GNU C11 TESTS 21 93 0
119936894 pritishcf307 B June 19, 2021, 2 a.m. OK GNU C11 TESTS 21 140 0
119954116 BILL666 B June 19, 2021, 5:58 a.m. OK GNU C++11 TESTS 21 30 0
119934237 priority B June 19, 2021, 12:47 a.m. OK GNU C++11 TESTS 21 30 0
119945711 liangruichen B June 19, 2021, 4:28 a.m. OK GNU C++11 TESTS 21 31 0
119943831 mxcyyds B June 19, 2021, 4:01 a.m. OK GNU C++11 TESTS 21 31 0
119936631 explorerxx B June 19, 2021, 1:54 a.m. OK GNU C++11 TESTS 21 31 0
119936178 luogu_bot1 B June 19, 2021, 1:43 a.m. OK GNU C++11 TESTS 21 31 0
119935347 MiG21_5121 B June 19, 2021, 1:22 a.m. OK GNU C++11 TESTS 21 31 0
119949978 Bananana. B June 19, 2021, 5:16 a.m. OK GNU C++11 TESTS 21 31 0
119946748 suyunqiaoKID B June 19, 2021, 4:40 a.m. OK GNU C++11 TESTS 21 31 0
119946452 liangruichen B June 19, 2021, 4:37 a.m. OK GNU C++11 TESTS 21 31 0
119946624 _Tany1404_ B June 19, 2021, 4:39 a.m. OK GNU C++14 TESTS 21 31 0
119943985 synked B June 19, 2021, 4:03 a.m. OK GNU C++14 TESTS 21 31 0
119943628 yayman B June 19, 2021, 3:58 a.m. OK GNU C++14 TESTS 21 31 0
119943472 anshika_19 B June 19, 2021, 3:56 a.m. OK GNU C++14 TESTS 21 31 0
119945444 rakesht B June 19, 2021, 4:24 a.m. OK GNU C++14 TESTS 21 31 0
119948635 abhksh B June 19, 2021, 5:03 a.m. OK GNU C++14 TESTS 21 31 0
119949788 madhavan_raja B June 19, 2021, 5:15 a.m. OK GNU C++14 TESTS 21 31 0
119950038 madhavan_raja B June 19, 2021, 5:17 a.m. OK GNU C++14 TESTS 21 31 0
119948269 thisisis B June 19, 2021, 4:59 a.m. OK GNU C++14 TESTS 21 31 0
119946859 hacxter B June 19, 2021, 4:42 a.m. OK GNU C++14 TESTS 21 31 0
119932977 gustavo_m32 B June 18, 2021, 11:43 p.m. OK GNU C++17 TESTS 21 30 0
119946846 hsekharsahoo B June 19, 2021, 4:42 a.m. OK GNU C++17 TESTS 21 31 0
119953822 singhanoop31 B June 19, 2021, 5:55 a.m. OK GNU C++17 TESTS 21 31 0
119953426 tbzard B June 19, 2021, 5:51 a.m. OK GNU C++17 TESTS 21 31 0
119951349 horizon__ B June 19, 2021, 5:31 a.m. OK GNU C++17 TESTS 21 31 0
119949838 KP1010 B June 19, 2021, 5:15 a.m. OK GNU C++17 TESTS 21 31 0
119949366 pakka_papad B June 19, 2021, 5:10 a.m. OK GNU C++17 TESTS 21 31 0
119947995 PARTHA_SARTHI B June 19, 2021, 4:56 a.m. OK GNU C++17 TESTS 21 31 0
119947376 Greedy_Optimizzer B June 19, 2021, 4:48 a.m. OK GNU C++17 TESTS 21 31 0
119947211 abiramee B June 19, 2021, 4:46 a.m. OK GNU C++17 TESTS 21 31 0
119916742 suryakantpandey B June 18, 2021, 6:28 p.m. OK GNU C++17 (64) TESTS 21 30 0
119949472 ZeroScar B June 19, 2021, 5:11 a.m. OK GNU C++17 (64) TESTS 21 31 0
119945725 Akib_2612 B June 19, 2021, 4:28 a.m. OK GNU C++17 (64) TESTS 21 31 0
119945087 diyora13 B June 19, 2021, 4:19 a.m. OK GNU C++17 (64) TESTS 21 31 0
119949721 th_rahulthorat B June 19, 2021, 5:14 a.m. OK GNU C++17 (64) TESTS 21 31 0
119950773 golden.duck B June 19, 2021, 5:25 a.m. OK GNU C++17 (64) TESTS 21 31 0
119951613 ZBlaster B June 19, 2021, 5:34 a.m. OK GNU C++17 (64) TESTS 21 31 0
119953858 Bob15324 B June 19, 2021, 5:56 a.m. OK GNU C++17 (64) TESTS 21 31 0
119953967 sjleepy B June 19, 2021, 5:57 a.m. OK GNU C++17 (64) TESTS 21 31 0
119949496 Tanvir_1903034 B June 19, 2021, 5:12 a.m. OK GNU C++17 (64) TESTS 21 31 0
119939145 tranquyetthang281 B June 19, 2021, 2:46 a.m. OK Haskell TESTS 21 139 9523200
119939085 tranquyetthang281 B June 19, 2021, 2:45 a.m. OK Haskell TESTS 21 140 9523200
119932485 bluesky111 B June 18, 2021, 11:16 p.m. OK Java 11 TESTS 21 202 0
119919964 mohdasim2808 B June 18, 2021, 6:56 p.m. OK Java 11 TESTS 21 218 0
119947529 algothink B June 19, 2021, 4:50 a.m. OK Java 11 TESTS 21 233 0
119919642 cribabby B June 18, 2021, 6:53 p.m. OK Java 11 TESTS 21 234 0
119931601 Plums B June 18, 2021, 10:28 p.m. OK Java 11 TESTS 21 249 0
119946939 Pradyumn.Agrawal B June 19, 2021, 4:43 a.m. OK Java 11 TESTS 21 249 0
119945077 adarsh_goku B June 19, 2021, 4:19 a.m. OK Java 11 TESTS 21 249 0
119925403 contra_007 B June 18, 2021, 7:58 p.m. OK Java 11 TESTS 21 264 0
119951740 ypa B June 19, 2021, 5:35 a.m. OK Java 11 TESTS 21 264 0
119920247 DedsecKnight B June 18, 2021, 6:59 p.m. OK Java 11 TESTS 21 265 0
119920039 BruteForcee B June 18, 2021, 6:57 p.m. OK Java 8 TESTS 21 124 0
119948953 less_ordinary B June 19, 2021, 5:06 a.m. OK Java 8 TESTS 21 124 0
119946128 harsh_it B June 19, 2021, 4:33 a.m. OK Java 8 TESTS 21 124 0
119931327 Shobhit_Behl B June 18, 2021, 10:16 p.m. OK Java 8 TESTS 21 124 0
119928320 gagan_6730 B June 18, 2021, 8:50 p.m. OK Java 8 TESTS 21 124 0
119923485 kvedula2004 B June 18, 2021, 7:30 p.m. OK Java 8 TESTS 21 139 0
119926673 tishrah_ B June 18, 2021, 8:19 p.m. OK Java 8 TESTS 21 140 0
119944933 abhi_718 B June 19, 2021, 4:17 a.m. OK Java 8 TESTS 21 140 0
119944428 dead.lock B June 19, 2021, 4:10 a.m. OK Java 8 TESTS 21 140 0
119919745 InANutshell B June 18, 2021, 6:54 p.m. OK Java 8 TESTS 21 140 0
119940194 VarunUtsav B June 19, 2021, 3:04 a.m. OK MS C++ TESTS 21 108 0
119950408 subseg1107 B June 19, 2021, 5:21 a.m. OK MS C++ TESTS 21 109 0
119947558 mnrmustafa B June 19, 2021, 4:51 a.m. OK MS C++ 2017 TESTS 21 77 0
119952834 khan_saifkhan_ B June 19, 2021, 5:46 a.m. OK MS C++ 2017 TESTS 21 77 0
119921388 Vitazzz B June 18, 2021, 7:08 p.m. OK MS C++ 2017 TESTS 21 93 0
119933463 _Rimjhim_36 B June 19, 2021, 12:14 a.m. OK MS C++ 2017 TESTS 21 109 0
119937552 Ashish_Pal B June 19, 2021, 2:15 a.m. OK MS C++ 2017 TESTS 21 109 0
119935160 arushijaiswal04 B June 19, 2021, 1:17 a.m. OK MS C++ 2017 TESTS 21 109 0
119930541 gleb.zuev04 B June 18, 2021, 9:50 p.m. OK MS C++ 2017 TESTS 21 109 0
119916162 Rumman93 B June 18, 2021, 6:25 p.m. OK .NET Core C# TESTS 21 187 3072000
119920098 ShashankZobb B June 18, 2021, 6:57 p.m. OK PyPy 2 TESTS 21 155 4198400
119918384 ShashankZobb B June 18, 2021, 6:39 p.m. OK PyPy 2 TESTS 21 202 4300800
119921235 ShashankZobb B June 18, 2021, 7:07 p.m. OK PyPy 2 TESTS 21 311 8089600
119916483 6-_-9 B June 18, 2021, 6:26 p.m. OK PyPy 3 TESTS 21 171 4198400
119923937 rivnam B June 18, 2021, 7:37 p.m. OK PyPy 3 TESTS 21 171 6348800
119943807 ___Neo___ B June 19, 2021, 4:01 a.m. OK PyPy 3 TESTS 21 171 7168000
119936037 h8191 B June 19, 2021, 1:39 a.m. OK PyPy 3 TESTS 21 187 7782400
119933695 jano31415 B June 19, 2021, 12:25 a.m. OK PyPy 3 TESTS 21 202 6041600
119922275 InvalidSyntax B June 18, 2021, 7:16 p.m. OK PyPy 3 TESTS 21 202 7372800
119939366 akshaykhandelwal B June 19, 2021, 2:49 a.m. OK PyPy 3 TESTS 21 202 7782400
119944094 jitendra_joshi3112000 B June 19, 2021, 4:05 a.m. OK PyPy 3 TESTS 21 202 8806400
119934519 songtae B June 19, 2021, 12:57 a.m. OK PyPy 3 TESTS 21 218 6656000
119919802 _aadiupadhyay_ B June 18, 2021, 6:55 p.m. OK PyPy 3 TESTS 21 218 7987200
119946921 rishabh1889 B June 19, 2021, 4:43 a.m. OK Python 3 TESTS 21 93 614400
119944688 Deepak_jose B June 19, 2021, 4:13 a.m. OK Python 3 TESTS 21 124 614400
119920201 ACoder_25 B June 18, 2021, 6:58 p.m. OK Python 3 TESTS 21 124 819200
119939242 akshat11 B June 19, 2021, 2:47 a.m. OK Python 3 TESTS 21 124 1024000
119940447 abcRohit B June 19, 2021, 3:07 a.m. OK Python 3 TESTS 21 140 0
119933273 shekharkarna3 B June 19, 2021, 12:02 a.m. OK Python 3 TESTS 21 155 0
119951160 lonewolf141 B June 19, 2021, 5:29 a.m. OK Python 3 TESTS 21 186 0
119939965 Dinesh_devanaboina B June 19, 2021, 3 a.m. OK Python 3 TESTS 21 186 0
119926916 kunaal_12345 B June 18, 2021, 8:23 p.m. OK Python 3 TESTS 21 186 0
119919741 Aman--Verma B June 18, 2021, 6:54 p.m. OK Python 3 TESTS 21 186 0
119952181 f7f7f7f7f7 B June 19, 2021, 5:40 a.m. OK Rust TESTS 21 30 0
119930449 IvanDyachenko B June 18, 2021, 9:46 p.m. OK Scala TESTS 21 639 0

remove filters

Back to search problems