Educational Codeforces Round 53 (Rated for 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
1073 Educational Codeforces Round 53 (Rated for Div. 2) FINISHED False 7200 191345099 Oct. 25, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4809 ) C Vasya and Robot PROGRAMMING binary search two pointers 1800

B"Vasya has got a robot which is situated on an infinite Cartesian plane, initially in the cell (0, 0) . Robot can perform the following four kinds of operations: Vasya also has got a sequence of n operations. Vasya wants to modify this sequence so after performing it the robot will end up in (x, y) . Vasya wants to change the sequence so the length of changed subsegment is minimum possible. This length can be calculated as follows: maxID - minID + 1 , where maxID is the maximum index of a changed operation, and minID is the minimum index of a changed operation. For example, if Vasya changes RRRRRRR to RLRRLRL, then the operations with indices 2 , 5 and 7 are changed, so the length of changed subsegment is 7 - 2 + 1 = 6 . Another example: if Vasya changes DDDD to DDRD, then the length of changed subsegment is 1 . If there are no changes, then the length of changed subsegment is 0 . Changing an operation means replacing it with some operation (possibly the same); Vasya can't insert new operations into the sequence or remove them. Help Vasya! Tell him the minimum length of subsegment that he needs to change so that the robot will go from (0, 0) to (x, y) , or tell him that it's impossible. The first line contains one integer number n~(1 <= n <= 2 cdot 10^5) -- the number of operations. The second line contains the sequence of operations -- a string of n characters. Each character is either U, D, L or R. The third line contains two integers x, y~(-10^9 <= x, y <= 10^9) -- the coordinates of the cell where the robot should end its path. Print one integer -- the minimum possible length of subsegment that can be changed so the resulting sequence of operations moves the robot from (0, 0) to (x, y) . If this change is impossible, print -1 . In the first example the sequence can be changed to LULUU. So the length of the changed subsegment is 3 -"...

Tutorials

62742

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
63758736 vjudge5 C Oct. 30, 2019, 1:59 a.m. OK Clang++17 Diagnostics TESTS 121 577 15155200 1800
45262925 playerzhou C Nov. 4, 2018, 3:39 a.m. OK Clang++17 Diagnostics TESTS 121 795 15360000 1800
47503908 fluffyowl C Dec. 25, 2018, 8:18 p.m. OK D TESTS 121 46 4198400 1800
51657318 rr_ C March 21, 2019, 10:41 p.m. OK D TESTS 121 93 11776000 1800
44979665 AHTOH._. C Oct. 28, 2018, 7:58 a.m. OK FPC TESTS 121 31 1638400 1800
45438719 chaorenhaha C Nov. 8, 2018, 9:41 a.m. OK FPC TESTS 121 31 3993600 1800
45474772 hry C Nov. 9, 2018, 11:56 a.m. OK FPC TESTS 121 46 3993600 1800
45474052 luogu_bot3 C Nov. 9, 2018, 11:35 a.m. OK FPC TESTS 121 46 3993600 1800
44899763 hiep.cbla5 C Oct. 26, 2018, 8:32 a.m. OK FPC TESTS 121 77 208998400 1800
52014810 vjudge1 C March 30, 2019, 10:05 a.m. OK GNU C11 TESTS 121 31 1843200 1800
52014868 2018030401093 C March 30, 2019, 10:07 a.m. OK GNU C11 TESTS 121 31 1843200 1800
52014750 2018030401093 C March 30, 2019, 10:04 a.m. OK GNU C11 TESTS 121 31 1843200 1800
49600695 rainboy C Feb. 7, 2019, 5:02 p.m. OK GNU C11 TESTS 121 62 204800 1800
44895921 xianglingao C Oct. 26, 2018, 6:37 a.m. OK GNU C++11 TESTS 121 31 0 1800
57265665 IohcEjnim C July 18, 2019, 7:03 a.m. OK GNU C++11 TESTS 121 31 0 1800
47372628 yaufung C Dec. 22, 2018, 3:11 p.m. OK GNU C++11 TESTS 121 31 0 1800
45373786 AutumnKite C Nov. 6, 2018, 11:20 a.m. OK GNU C++11 TESTS 121 31 0 1800
44874801 yao11617 C Oct. 25, 2018, 4:48 p.m. OK GNU C++11 TESTS 121 31 102400 1800
45442152 kinoud C Nov. 8, 2018, 11:42 a.m. OK GNU C++11 TESTS 121 31 204800 1800
46976010 Twenty_Fifteen C Dec. 13, 2018, 4:36 p.m. OK GNU C++11 TESTS 121 31 204800 1800
63756538 vjudge5 C Oct. 29, 2019, 11:57 p.m. OK GNU C++11 TESTS 121 31 204800 1800
63752875 vjudge1 C Oct. 29, 2019, 9:16 p.m. OK GNU C++11 TESTS 121 31 204800 1800
47245835 tyzc C Dec. 19, 2018, 5:39 a.m. OK GNU C++11 TESTS 121 31 204800 1800
44932364 NeverN C Oct. 27, 2018, 2:48 a.m. OK GNU C++14 TESTS 121 30 3686400 1800
45755270 Shedneryan C Nov. 15, 2018, 5:20 a.m. OK GNU C++14 TESTS 121 31 204800 1800
44980349 Algo_Rhythm C Oct. 28, 2018, 8:19 a.m. OK GNU C++14 TESTS 121 31 204800 1800
44973290 ankeet C Oct. 28, 2018, 3:04 a.m. OK GNU C++14 TESTS 121 31 204800 1800
44910660 Origenes C Oct. 26, 2018, 1:22 p.m. OK GNU C++14 TESTS 121 31 204800 1800
44901533 hank55663 C Oct. 26, 2018, 9:19 a.m. OK GNU C++14 TESTS 121 31 204800 1800
44899715 ZhYic2 C Oct. 26, 2018, 8:30 a.m. OK GNU C++14 TESTS 121 31 204800 1800
44891570 WDJUST C Oct. 26, 2018, 3:36 a.m. OK GNU C++14 TESTS 121 31 204800 1800
55536651 AshveenBansal C June 13, 2019, 4:48 p.m. OK GNU C++14 TESTS 121 31 512000 1800
48014945 sk018 C Jan. 5, 2019, 9:41 p.m. OK GNU C++14 TESTS 121 31 512000 1800
45030955 R_WeaVer C Oct. 29, 2018, 3:51 a.m. OK GNU C++17 TESTS 121 30 819200 1800
50727042 fffeyn C March 3, 2019, 10:11 a.m. OK GNU C++17 TESTS 121 30 1843200 1800
45176024 EDG7Clearlove C Nov. 1, 2018, 2:46 p.m. OK GNU C++17 TESTS 121 30 2048000 1800
45308240 INT3 C Nov. 5, 2018, 12:10 a.m. OK GNU C++17 TESTS 121 31 409600 1800
48656622 Taoist_Yu C Jan. 21, 2019, 3:07 a.m. OK GNU C++17 TESTS 121 31 409600 1800
48678572 kyle201817146 C Jan. 21, 2019, 12:21 p.m. OK GNU C++17 TESTS 121 31 409600 1800
56440455 _PortgasD.Ace_ C July 2, 2019, 4:04 p.m. OK GNU C++17 TESTS 121 31 512000 1800
65721934 me_loves_direction C Nov. 25, 2019, 7:39 p.m. OK GNU C++17 TESTS 121 31 512000 1800
62614797 harshhx17 C Oct. 15, 2019, 11:06 a.m. OK GNU C++17 TESTS 121 31 512000 1800
48656920 vjudge2 C Jan. 21, 2019, 3:20 a.m. OK GNU C++17 TESTS 121 31 512000 1800
44976812 megaspazz C Oct. 28, 2018, 6:06 a.m. OK Go TESTS 121 46 716800 1800
44976886 megaspazz C Oct. 28, 2018, 6:10 a.m. OK Go TESTS 121 46 716800 1800
44973377 megaspazz C Oct. 28, 2018, 3:08 a.m. OK Go TESTS 121 62 5324800 1800
44973365 megaspazz C Oct. 28, 2018, 3:07 a.m. OK Go TESTS 121 77 5324800 1800
45238199 hqhs C Nov. 3, 2018, 10:23 a.m. OK Go TESTS 121 78 0 1800
47384193 davidguandev C Dec. 23, 2018, 2:23 a.m. OK Go TESTS 121 576 716800 1800
45032849 Jeel_Vaishnav C Oct. 29, 2018, 5:39 a.m. OK Java 8 TESTS 121 109 0 1800
44952128 Icerzack C Oct. 27, 2018, 12:36 p.m. OK Java 8 TESTS 121 109 0 1800
44910772 Jay_13 C Oct. 26, 2018, 1:24 p.m. OK Java 8 TESTS 121 109 0 1800
45348336 CrazyFlower C Nov. 6, 2018, 5:39 a.m. OK Java 8 TESTS 121 124 0 1800
61561803 sonusingh.nitaa C Sept. 30, 2019, 3:49 p.m. OK Java 8 TESTS 121 124 0 1800
58545008 JCKG C Aug. 10, 2019, 4:08 p.m. OK Java 8 TESTS 121 124 0 1800
52275281 safaryan C April 3, 2019, 2:31 p.m. OK Java 8 TESTS 121 124 0 1800
49603242 Dukkha C Feb. 7, 2019, 6:09 p.m. OK Java 8 TESTS 121 124 0 1800
44976925 revanthreddy85 C Oct. 28, 2018, 6:12 a.m. OK Java 8 TESTS 121 124 0 1800
44925804 wadissimo C Oct. 26, 2018, 8:03 p.m. OK Java 8 TESTS 121 124 0 1800
45053004 SlavaG C Oct. 29, 2018, 11:34 a.m. OK Kotlin TESTS 121 530 42496000 1800
45054348 SlavaG C Oct. 29, 2018, 12:05 p.m. OK Kotlin TESTS 121 560 10752000 1800
63757987 vjudge5 C Oct. 30, 2019, 1:18 a.m. OK Mono C# TESTS 121 62 2252800 1800
44957066 Coder_D C Oct. 27, 2018, 2:46 p.m. OK Mono C# TESTS 121 62 4300800 1800
45126662 Mem C Oct. 31, 2018, 8:24 a.m. OK Mono C# TESTS 121 62 4300800 1800
44901700 eki C Oct. 26, 2018, 9:23 a.m. OK Mono C# TESTS 121 62 5017600 1800
44902616 omikad C Oct. 26, 2018, 9:49 a.m. OK Mono C# TESTS 121 93 8294400 1800
44892728 24khandsome C Oct. 26, 2018, 4:27 a.m. OK MS C++ TESTS 121 31 204800 1800
52349857 vjudge4 C April 5, 2019, 2:08 p.m. OK MS C++ TESTS 121 31 1638400 1800
57928834 vjudge1 C July 29, 2019, 8:02 a.m. OK MS C++ TESTS 121 31 1843200 1800
56422068 vjudge3 C July 2, 2019, 7:49 a.m. OK MS C++ TESTS 121 31 1843200 1800
56417443 vjudge5 C July 2, 2019, 5:34 a.m. OK MS C++ TESTS 121 31 1843200 1800
63758020 vjudge3 C Oct. 30, 2019, 1:20 a.m. OK MS C++ TESTS 121 31 1843200 1800
63751003 vjudge5 C Oct. 29, 2019, 8:18 p.m. OK MS C++ TESTS 121 31 1843200 1800
68708896 vjudge1 C Jan. 13, 2020, 12:19 p.m. OK MS C++ TESTS 121 31 1843200 1800
68708956 vjudge4 C Jan. 13, 2020, 12:20 p.m. OK MS C++ TESTS 121 31 1843200 1800
68848553 vjudge5 C Jan. 15, 2020, 8:11 a.m. OK MS C++ TESTS 121 31 1843200 1800
49133191 nqbinh17 C Jan. 29, 2019, 6:05 a.m. OK MS C++ 2017 TESTS 121 31 614400 1800
68687386 vjudge2 C Jan. 13, 2020, 4:17 a.m. OK MS C++ 2017 TESTS 121 31 1843200 1800
52307657 Jan_ C April 4, 2019, 1:04 p.m. OK MS C++ 2017 TESTS 121 31 1843200 1800
63756421 vjudge1 C Oct. 29, 2019, 11:51 p.m. OK MS C++ 2017 TESTS 121 31 1843200 1800
64181138 vjudge3 C Nov. 4, 2019, 12:44 a.m. OK MS C++ 2017 TESTS 121 31 2048000 1800
63758589 vjudge4 C Oct. 30, 2019, 1:53 a.m. OK MS C++ 2017 TESTS 121 31 2048000 1800
63759178 vjudge1 C Oct. 30, 2019, 2:22 a.m. OK MS C++ 2017 TESTS 121 31 2048000 1800
68686792 vjudge2 C Jan. 13, 2020, 3:58 a.m. OK MS C++ 2017 TESTS 121 31 5017600 1800
63754562 vjudge5 C Oct. 29, 2019, 10:19 p.m. OK MS C++ 2017 TESTS 121 46 2048000 1800
57988991 vjudge3 C July 30, 2019, 12:29 p.m. OK MS C++ 2017 TESTS 121 46 3379200 1800
58146662 akvalle26 C Aug. 1, 2019, 10:04 p.m. OK Node.js TESTS 121 186 2969600 1800
58146581 akvalle26 C Aug. 1, 2019, 9:58 p.m. OK Node.js TESTS 121 186 3174400 1800
58146693 akvalle26 C Aug. 1, 2019, 10:06 p.m. OK Node.js TESTS 121 187 2867200 1800
58146289 akvalle26 C Aug. 1, 2019, 9:38 p.m. OK Node.js TESTS 121 202 2560000 1800
58146705 akvalle26 C Aug. 1, 2019, 10:08 p.m. OK Node.js TESTS 121 202 2867200 1800
58147367 akvalle26 C Aug. 1, 2019, 11:01 p.m. OK Node.js TESTS 121 202 2969600 1800
58145844 akvalle26 C Aug. 1, 2019, 9:10 p.m. OK Node.js TESTS 121 217 2560000 1800
44871563 YESMAths C Oct. 25, 2018, 4:25 p.m. OK PyPy 2 TESTS 121 249 23142400 1800
46364744 c1729 C Nov. 29, 2018, 12:44 p.m. OK PyPy 2 TESTS 121 311 18534400 1800
44891037 tmsausa C Oct. 26, 2018, 3:18 a.m. OK PyPy 3 TESTS 121 155 12288000 1800
45969607 IrOty1oX5uSp4 C Nov. 19, 2018, 3:14 p.m. OK PyPy 3 TESTS 121 171 9113600 1800
46295356 black_horse2014 C Nov. 28, 2018, 1:30 a.m. OK PyPy 3 TESTS 121 171 11264000 1800
68727589 ivan13082002 C Jan. 13, 2020, 6:30 p.m. OK PyPy 3 TESTS 121 186 5324800 1800
69066161 shittttyyyyyy C Jan. 18, 2020, 6:43 p.m. OK PyPy 3 TESTS 121 186 5529600 1800
44929927 diveshuttam C Oct. 26, 2018, 11:47 p.m. OK PyPy 3 TESTS 121 186 8192000 1800
44878659 zvv C Oct. 25, 2018, 6:05 p.m. OK PyPy 3 TESTS 121 187 8704000 1800
46052159 kaname_madoka123 C Nov. 22, 2018, 8:20 a.m. OK PyPy 3 TESTS 121 218 16179200 1800
44873242 titia C Oct. 25, 2018, 4:33 p.m. OK PyPy 3 TESTS 121 233 15872000 1800
45226972 Firepaw C Nov. 3, 2018, 4:14 a.m. OK PyPy 3 TESTS 121 249 19968000 1800
63764096 vjudge1 C Oct. 30, 2019, 5:27 a.m. OK Python 2 TESTS 121 576 4608000 1800
47019320 whatshisbucket C Dec. 14, 2018, 10:14 p.m. OK Python 3 TESTS 121 748 12492800 1800
44870750 dim8art C Oct. 25, 2018, 4:21 p.m. OK Python 3 TESTS 121 842 1228800 1800
45391986 blucell C Nov. 6, 2018, 10:32 p.m. OK Python 3 TESTS 121 873 15769600 1800
63749634 vjudge1 C Oct. 29, 2019, 7:45 p.m. OK Python 3 TESTS 121 935 1740800 1800
44880540 Gegege337 C Oct. 25, 2018, 6:54 p.m. OK Python 3 TESTS 121 966 1228800 1800
44891021 tmsausa C Oct. 26, 2018, 3:18 a.m. OK Python 3 TESTS 121 966 16384000 1800
45331303 Grevozin C Nov. 5, 2018, 3:22 p.m. OK Rust TESTS 121 46 11264000 1800

remove filters

Back to search problems