Codeforces Round 605 (Div. 3)

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
1272 Codeforces Round 605 (Div. 3) FINISHED False 7200 161195111 Dec. 12, 2019, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14049 ) B Snow Walking Robot PROGRAMMING constructive algorithms greedy implementation 1200

B'Recently you have bought a snow walking robot and brought it home. Suppose your home is a cell (0, 0) on an infinite grid. You also have the sequence of instructions of this robot. It is written as the string s consisting of characters 'L ', 'R ', 'U ' and 'D '. If the robot is in the cell (x, y) right now, he can move to one of the adjacent cells (depending on the current instruction). You 've noticed the warning on the last page of the manual: if the robot visits some cell (except (0, 0) ) twice then it breaks. So the sequence of instructions is valid if the robot starts in the cell (0, 0) , performs the given instructions, visits no cell other than (0, 0) two or more times and ends the path in the cell (0, 0) . Also cell (0, 0) should be visited at most two times: at the beginning and at the end (if the path is empty then it is visited only once). For example, the following sequences of instructions are considered valid: "UD", "RL", "UUURULLDDDDLDDRRUU", and the following are considered invalid: "U" (the endpoint is not (0, 0) ) and "UUDD" (the cell (0, 1) is visited twice). The initial sequence of instructions, however, might be not valid. You don 't want your robot to break so you decided to reprogram it in the following way: you will remove some (possibly, all or none) instructions from the initial sequence of instructions, then rearrange the remaining instructions as you wish and turn on your robot to move. Your task is to remove as few instructions from the initial sequence as possible and rearrange the remaining ones so that the sequence is valid. Report the valid sequence of the maximum length you can obtain. Note that you can choose any order of remaining instructions (you don 't need to minimize the number of swaps or any other similar metric). You have to answer q independent test cases. The first line of the input contains one integer q ( 1 <= q <= 2 cdot 10^4 ) -- the numb'...

Tutorials

Codeforces Round #605 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
68818380 antunmagdic B Jan. 14, 2020, 4:47 p.m. OK Clang++17 Diagnostics TESTS 4 327 14745600 1200
66806807 MBHuman B Dec. 13, 2019, 9:53 p.m. OK Clang++17 Diagnostics TESTS 4 701 16896000 1200
66879863 arc_turus B Dec. 14, 2019, 4:10 p.m. OK GNU C11 TESTS 4 93 1945600 1200
66731444 racerS B Dec. 12, 2019, 5:39 p.m. OK GNU C11 TESTS 4 280 204800 1200
66823096 XLeVi_AcKeRmAnX B Dec. 14, 2019, 8:03 a.m. OK GNU C11 TESTS 4 295 102400 1200
68438075 TARIQ B Jan. 9, 2020, 9:47 a.m. OK GNU C11 TESTS 4 295 102400 1200
69478223 return_z B Jan. 24, 2020, 4:52 p.m. OK GNU C11 TESTS 4 295 102400 1200
66885927 satya_chaitanya B Dec. 14, 2019, 6:15 p.m. OK GNU C11 TESTS 4 296 102400 1200
67075968 Ar_9020_th B Dec. 17, 2019, 2:28 p.m. OK GNU C11 TESTS 4 296 102400 1200
67582502 DyniD B Dec. 25, 2019, 6:48 a.m. OK GNU C11 TESTS 4 296 102400 1200
68972720 zzqwtc B Jan. 17, 2020, 7:38 a.m. OK GNU C11 TESTS 4 296 102400 1200
67051037 Andrew613 B Dec. 17, 2019, 4:03 a.m. OK GNU C11 TESTS 4 296 102400 1200
68158575 Charon_wth B Jan. 4, 2020, 9:55 a.m. OK GNU C++11 TESTS 4 15 0 1200
66855193 vjudge4 B Dec. 14, 2019, 12:12 p.m. OK GNU C++11 TESTS 4 15 102400 1200
69550937 xxqiam B Jan. 26, 2020, 6:25 a.m. OK GNU C++11 TESTS 4 15 102400 1200
67498925 KaiserYang B Dec. 24, 2019, 2:39 a.m. OK GNU C++11 TESTS 4 15 102400 1200
67201535 asdzxc B Dec. 19, 2019, 11:04 a.m. OK GNU C++11 TESTS 4 15 102400 1200
67133925 ddss B Dec. 18, 2019, 2:37 a.m. OK GNU C++11 TESTS 4 15 102400 1200
67073988 JoaoFelix7 B Dec. 17, 2019, 1:47 p.m. OK GNU C++11 TESTS 4 15 102400 1200
66754387 1815925115 B Dec. 13, 2019, 5:48 a.m. OK GNU C++11 TESTS 4 15 102400 1200
66746396 vjudge4 B Dec. 13, 2019, 2:45 a.m. OK GNU C++11 TESTS 4 15 102400 1200
66719388 liushengfeng_2023 B Dec. 12, 2019, 3:24 p.m. OK GNU C++11 TESTS 4 15 102400 1200
66723495 Hridoy23 B Dec. 12, 2019, 3:38 p.m. OK GNU C++14 TESTS 4 15 102400 1200
69674885 Q_W_Q B Jan. 28, 2020, 2 p.m. OK GNU C++14 TESTS 4 15 102400 1200
67602213 dh_love_fzw B Dec. 25, 2019, 12:20 p.m. OK GNU C++14 TESTS 4 15 102400 1200
67058294 NoTeamName B Dec. 17, 2019, 7:57 a.m. OK GNU C++14 TESTS 4 15 102400 1200
66843021 urchin-c B Dec. 14, 2019, 11:32 a.m. OK GNU C++14 TESTS 4 15 102400 1200
66807565 kaq B Dec. 13, 2019, 10:35 p.m. OK GNU C++14 TESTS 4 15 102400 1200
66760556 dawn_lmf B Dec. 13, 2019, 6:47 a.m. OK GNU C++14 TESTS 4 15 102400 1200
66760371 c337134154 B Dec. 13, 2019, 6:43 a.m. OK GNU C++14 TESTS 4 15 102400 1200
66773535 catsareliquid B Dec. 13, 2019, 8:59 a.m. OK GNU C++14 TESTS 4 15 204800 1200
66779102 lizzzzzzzzzz B Dec. 13, 2019, 11:18 a.m. OK GNU C++14 TESTS 4 15 204800 1200
67190962 iamkshat01 B Dec. 19, 2019, 7:03 a.m. OK GNU C++17 TESTS 4 0 1024000 1200
66820901 shefin.cse16 B Dec. 14, 2019, 7:23 a.m. OK GNU C++17 TESTS 4 15 102400 1200
67018248 ACCCCCC changez I_can_not_ac_this B Dec. 16, 2019, 12:09 p.m. OK GNU C++17 TESTS 4 15 102400 1200
67142718 julianfernando B Dec. 18, 2019, 7:29 a.m. OK GNU C++17 TESTS 4 15 102400 1200
67309988 wanghanjun233 B Dec. 21, 2019, 1:49 a.m. OK GNU C++17 TESTS 4 15 102400 1200
67458374 Keven B Dec. 23, 2019, 8:03 a.m. OK GNU C++17 TESTS 4 15 102400 1200
68163780 nNguyeNn B Jan. 4, 2020, 12:01 p.m. OK GNU C++17 TESTS 4 15 102400 1200
68865572 Prosperity B Jan. 15, 2020, 1:28 p.m. OK GNU C++17 TESTS 4 15 102400 1200
68995870 z546855972 B Jan. 17, 2020, 5:22 p.m. OK GNU C++17 TESTS 4 15 102400 1200
66811831 marcobarch B Dec. 14, 2019, 3:13 a.m. OK GNU C++17 TESTS 4 15 102400 1200
66769471 slowyfine B Dec. 13, 2019, 7:45 a.m. OK Go TESTS 4 31 0 1200
67047758 sighduck B Dec. 17, 2019, 12:46 a.m. OK Go TESTS 4 31 0 1200
66768006 slowyfine B Dec. 13, 2019, 7:40 a.m. OK Go TESTS 4 342 0 1200
66795828 Laurens B Dec. 13, 2019, 5:02 p.m. OK Haskell TESTS 4 31 0 1200
69650989 vjudge1 B Jan. 28, 2020, 5:11 a.m. OK Haskell TESTS 4 46 1024000 1200
69457884 HU_Geek B Jan. 24, 2020, 9:25 a.m. OK Java 11 TESTS 4 171 0 1200
67069049 ankyy_0103 B Dec. 17, 2019, 12:08 p.m. OK Java 11 TESTS 4 171 0 1200
67317062 kukreja-vlk B Dec. 21, 2019, 6:31 a.m. OK Java 11 TESTS 4 186 0 1200
67128705 jjluczyn B Dec. 17, 2019, 9:40 p.m. OK Java 11 TESTS 4 186 0 1200
66795435 serafimkoo B Dec. 13, 2019, 4:53 p.m. OK Java 11 TESTS 4 186 0 1200
69033752 bsoto B Jan. 18, 2020, 8:38 a.m. OK Java 11 TESTS 4 187 0 1200
69046973 bsoto B Jan. 18, 2020, 11:21 a.m. OK Java 11 TESTS 4 202 0 1200
66991822 Anonymous B Dec. 15, 2019, 8:57 p.m. OK Java 11 TESTS 4 202 0 1200
68086367 doroshenkoeng B Jan. 2, 2020, 4:24 p.m. OK Java 11 TESTS 4 218 0 1200
69682515 bharath281 B Jan. 28, 2020, 4:02 p.m. OK Java 11 TESTS 4 233 0 1200
67606406 LemonPudding B Dec. 25, 2019, 1:45 p.m. OK Java 8 TESTS 4 93 0 1200
67453629 Java B Dec. 23, 2019, 5:47 a.m. OK Java 8 TESTS 4 93 0 1200
66809005 luchy0120 B Dec. 14, 2019, 12:25 a.m. OK Java 8 TESTS 4 108 0 1200
66783691 igor_kz B Dec. 13, 2019, 12:55 p.m. OK Java 8 TESTS 4 108 0 1200
66777197 an09mous B Dec. 13, 2019, 10:33 a.m. OK Java 8 TESTS 4 108 0 1200
66736416 Agnimandur B Dec. 12, 2019, 7:04 p.m. OK Java 8 TESTS 4 108 0 1200
66725109 nithinap B Dec. 12, 2019, 3:54 p.m. OK Java 8 TESTS 4 108 0 1200
68592087 Modi_sarkar B Jan. 11, 2020, 12:57 p.m. OK Java 8 TESTS 4 109 0 1200
69622489 musaab B Jan. 27, 2020, 2:52 p.m. OK Java 8 TESTS 4 109 0 1200
69262465 Sharon B Jan. 21, 2020, 5:29 p.m. OK Java 8 TESTS 4 109 0 1200
69287004 Nobita_Noobie B Jan. 22, 2020, 8:38 a.m. OK JavaScript TESTS 4 171 5324800 1200
66745830 Spheniscine B Dec. 13, 2019, 2:09 a.m. OK Kotlin TESTS 4 108 0 1200
66788864 shenqi16 B Dec. 13, 2019, 2:34 p.m. OK Kotlin TESTS 4 109 0 1200
69666480 david_varela B Jan. 28, 2020, 11:31 a.m. OK Kotlin TESTS 4 170 1228800 1200
66717739 ec24 B Dec. 12, 2019, 3:19 p.m. OK Kotlin TESTS 4 420 0 1200
66719647 AsuraPro B Dec. 12, 2019, 3:25 p.m. OK Kotlin TESTS 4 436 0 1200
67195492 hcmdgh B Dec. 19, 2019, 8:52 a.m. OK Kotlin TESTS 4 467 0 1200
69555342 sakapon B Jan. 26, 2020, 8:34 a.m. OK Mono C# TESTS 4 77 7270400 1200
68932541 TRR B Jan. 16, 2020, 11:45 a.m. OK Mono C# TESTS 4 342 819200 1200
66746271 kolokolo21kolo B Dec. 13, 2019, 2:37 a.m. OK Mono C# TESTS 4 343 3072000 1200
66794094 sevimlikedicik B Dec. 13, 2019, 4:21 p.m. OK Mono C# TESTS 4 732 7168000 1200
67276253 vjudge3 B Dec. 20, 2019, 10:19 a.m. OK MS C++ TESTS 4 30 102400 1200
66744833 vjudge2 B Dec. 13, 2019, 12:58 a.m. OK MS C++ TESTS 4 30 102400 1200
67311159 vjudge4 B Dec. 21, 2019, 2:55 a.m. OK MS C++ TESTS 4 30 102400 1200
69834831 vjudge3 B Jan. 30, 2020, 11:31 a.m. OK MS C++ TESTS 4 30 102400 1200
66903067 vjudge2 B Dec. 15, 2019, 5:14 a.m. OK MS C++ TESTS 4 30 1024000 1200
69896998 vjudge4 B Jan. 31, 2020, 12:01 p.m. OK MS C++ TESTS 4 31 102400 1200
69074932 vjudge3 B Jan. 19, 2020, 2:16 a.m. OK MS C++ TESTS 4 31 102400 1200
68422245 vjudge2 B Jan. 8, 2020, 11:32 p.m. OK MS C++ TESTS 4 31 102400 1200
66780577 excellent123 B Dec. 13, 2019, 11:50 a.m. OK MS C++ TESTS 4 31 307200 1200
69251786 seh631638554 B Jan. 21, 2020, 2:30 p.m. OK MS C++ TESTS 4 46 102400 1200
68972741 vjudge1 B Jan. 17, 2020, 7:38 a.m. OK MS C++ 2017 TESTS 4 30 102400 1200
67020091 iloveori B Dec. 16, 2019, 12:41 p.m. OK MS C++ 2017 TESTS 4 30 204800 1200
66802799 extremum B Dec. 13, 2019, 7:24 p.m. OK MS C++ 2017 TESTS 4 30 204800 1200
66899308 2209984412 B Dec. 15, 2019, 4:26 a.m. OK MS C++ 2017 TESTS 4 31 102400 1200
66899575 2209984412 B Dec. 15, 2019, 4:39 a.m. OK MS C++ 2017 TESTS 4 31 102400 1200
66718640 chrisboy B Dec. 12, 2019, 3:22 p.m. OK MS C++ 2017 TESTS 4 31 102400 1200
68357074 isa67719 B Jan. 7, 2020, 12:33 p.m. OK MS C++ 2017 TESTS 4 31 204800 1200
66769813 Parsa84 B Dec. 13, 2019, 7:54 a.m. OK MS C++ 2017 TESTS 4 31 614400 1200
66795893 cursed B Dec. 13, 2019, 5:03 p.m. OK MS C++ 2017 TESTS 4 46 102400 1200
67602222 ZA139 B Dec. 25, 2019, 12:21 p.m. OK MS C++ 2017 TESTS 4 46 204800 1200
66786848 TitanRoyal B Dec. 13, 2019, 1:57 p.m. OK Node.js TESTS 4 499 21094400 1200
66789955 Tomasz43 B Dec. 13, 2019, 2:56 p.m. OK Node.js TESTS 4 577 21094400 1200
66728917 rsFalse B Dec. 12, 2019, 4:52 p.m. OK Perl TESTS 4 171 10547200 1200
66729196 rsFalse B Dec. 12, 2019, 4:57 p.m. OK Perl TESTS 4 218 10137600 1200
68051289 mayakin B Jan. 1, 2020, 7 p.m. OK PHP TESTS 4 264 0 1200
67566636 wolffd B Dec. 24, 2019, 7:37 p.m. OK PyPy 2 TESTS 4 561 8089600 1200
66792111 McYaraliSisman B Dec. 13, 2019, 3:39 p.m. OK PyPy 2 TESTS 4 623 8192000 1200
67941384 pengyuhe B Dec. 30, 2019, 1:17 a.m. OK PyPy 2 TESTS 4 764 8089600 1200
66736248 11fingers B Dec. 12, 2019, 6:59 p.m. OK PyPy 2 TESTS 4 811 7987200 1200
66747317 aaa_bbb_ccc B Dec. 13, 2019, 3:35 a.m. OK PyPy 2 TESTS 4 842 8192000 1200
69694779 Affe B Jan. 28, 2020, 7:58 p.m. OK PyPy 3 TESTS 4 295 9216000 1200
69264762 densvedberg B Jan. 21, 2020, 6:14 p.m. OK PyPy 3 TESTS 4 295 10956800 1200
68561360 juandrengifo B Jan. 10, 2020, 7:03 p.m. OK PyPy 3 TESTS 4 311 9216000 1200
67438270 sohnryang B Dec. 22, 2019, 6:07 p.m. OK PyPy 3 TESTS 4 311 9932800 1200
66745734 chayapatlbs B Dec. 13, 2019, 2:01 a.m. OK PyPy 3 TESTS 4 311 9932800 1200
66867161 FahimSifnatul B Dec. 14, 2019, 12:58 p.m. OK PyPy 3 TESTS 4 312 9420800 1200
67059946 Mr.Inconsistent B Dec. 17, 2019, 8:38 a.m. OK PyPy 3 TESTS 4 326 9523200 1200
66867955 FahimSifnatul B Dec. 14, 2019, 1 p.m. OK PyPy 3 TESTS 4 326 9625600 1200
68137191 xiema B Jan. 3, 2020, 7:32 p.m. OK PyPy 3 TESTS 4 327 9625600 1200
66763151 Avny B Dec. 13, 2019, 7:17 a.m. OK PyPy 3 TESTS 4 389 9932800 1200
66971259 coder_VI B Dec. 15, 2019, 1:16 p.m. OK Python 2 TESTS 4 187 409600 1200
67210260 elistark B Dec. 19, 2019, 1:47 p.m. OK Python 2 TESTS 4 202 409600 1200
66970662 coder_VI B Dec. 15, 2019, 1:06 p.m. OK Python 2 TESTS 4 218 307200 1200
66730523 nethish B Dec. 12, 2019, 5:21 p.m. OK Python 3 TESTS 4 171 2252800 1200
68769488 vjudge5 B Jan. 14, 2020, 11:18 a.m. OK Python 3 TESTS 4 202 1024000 1200
68008519 raj1307 B Dec. 31, 2019, 2:30 p.m. OK Python 3 TESTS 4 217 1126400 1200
66816540 sangonana B Dec. 14, 2019, 6 a.m. OK Python 3 TESTS 4 218 716800 1200
66746555 fuu2202 B Dec. 13, 2019, 2:54 a.m. OK Python 3 TESTS 4 218 716800 1200
66717429 mstar0122 B Dec. 12, 2019, 3:18 p.m. OK Python 3 TESTS 4 233 716800 1200
66792224 MahletDereje B Dec. 13, 2019, 3:41 p.m. OK Python 3 TESTS 4 233 2662400 1200
67303704 amangupt01 B Dec. 20, 2019, 7:56 p.m. OK Python 3 TESTS 4 249 716800 1200
66791225 Nahusenay B Dec. 13, 2019, 3:21 p.m. OK Python 3 TESTS 4 249 1331200 1200
66741065 spellstaker B Dec. 12, 2019, 8:49 p.m. OK Python 3 TESTS 4 264 1638400 1200
67006716 nemi_zzz B Dec. 16, 2019, 8:15 a.m. OK Ruby TESTS 4 171 512000 1200

remove filters

Back to search problems