Codeforces Round 869 (Div. 1)

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
1817 Codeforces Round 869 (Div. 1) FINISHED False 8100 54401063 April 29, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 833 ) D Toy Machine PROGRAMMING constructive algorithms games implementation

B'There is a toy machine with toys arranged in two rows of n cells each ( n is odd). Initially, n-2 toys are placed in the non-corner cells of the top row. The bottom row is initially empty, and its leftmost, rightmost, and central cells are blocked. There are 4 buttons to control the toy machine: left, right, up, and down marked by the letters L, R, U, and D correspondingly. When pressing L, R, U, or D, all the toys will be moved simultaneously in the corresponding direction and will only stop if they push into another toy, the wall or a blocked cell. Your goal is to move the k -th toy into the leftmost cell of the top row. The toys are numbered from 1 to n-2 from left to right. Given n and k , find a solution that uses at most 1 ,000 ,000 button presses. To test out the toy machine, a web page is available that lets you play the game in real time. The first and only line contains two integers, n and k ( 5 <= n <= 100 ,000 , n is odd, 1 <= k <= n-2 ) -- the number of cells in a row, and the index of the toy that has to be moved to the leftmost cell of the top row. On a single line, output a description of the button presses as a string of at most 1 ,000 ,000 characters. The string should only contain the characters L, R, U, and D. The i -th character in the string is the i -th button that is pressed. After all the button presses are performed, the k -th toy should be in the leftmost cell of the top row. If there are multiple solutions, print any. The number of button presses does not have to be minimized. In the first example, there will be 5-2 = 3 toys. The first toy needs to end up in the leftmost cell of the top row. The moves RDL will achieve this, see the picture for a better understanding. Another possible solution would be to do one button press L. '...

Tutorials

Codeforces Round #869 (Div.1, Div.2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
203991755 ITworker_Z D April 30, 2023, 1:39 a.m. OK GNU C++14 TESTS 120 15 0
203994197 AlternatingCurrent D April 30, 2023, 2:39 a.m. OK GNU C++14 TESTS 120 30 0
203973516 Google12 D April 29, 2023, 7:21 p.m. OK GNU C++14 TESTS 120 30 0
203955203 Elibay D April 29, 2023, 4:40 p.m. OK GNU C++14 TESTS 118 30 2969600
203991914 ttklwxx D April 30, 2023, 1:42 a.m. OK GNU C++14 TESTS 120 31 0
203991557 KING_OF_TURTLE D April 30, 2023, 1:34 a.m. OK GNU C++14 TESTS 120 31 0
203970341 TwentyOneHundredOrBust D April 29, 2023, 6:46 p.m. OK GNU C++14 TESTS 120 31 0
203956801 bekzhan29 D April 29, 2023, 4:45 p.m. OK GNU C++14 TESTS 118 31 0
203955304 Kalptaru D April 29, 2023, 4:40 p.m. OK GNU C++14 TESTS 118 31 0
203950561 Flamire D April 29, 2023, 4:23 p.m. OK GNU C++14 TESTS 118 31 0
203962562 ifsmirnov D April 29, 2023, 5:36 p.m. OK GNU C++17 TESTS 118 15 512000
203989308 archiver D April 30, 2023, 12:37 a.m. OK GNU C++17 TESTS 120 15 1024000
203949195 peltorator D April 29, 2023, 4:18 p.m. OK GNU C++17 TESTS 118 15 2048000
203956329 KroosTheKeenGlint D April 29, 2023, 4:43 p.m. OK GNU C++17 TESTS 118 30 0
203945418 erekle D April 29, 2023, 4:04 p.m. OK GNU C++17 TESTS 118 30 0
204003847 dipo8 D April 30, 2023, 5:51 a.m. OK GNU C++17 TESTS 120 30 1024000
203945800 Um_nik D April 29, 2023, 4:05 p.m. OK GNU C++17 TESTS 118 30 1331200
203994138 szb D April 30, 2023, 2:38 a.m. OK GNU C++17 TESTS 120 31 0
203993778 baiABC D April 30, 2023, 2:28 a.m. OK GNU C++17 TESTS 120 31 0
203983717 AlexanderL D April 29, 2023, 10:13 p.m. OK GNU C++17 TESTS 120 31 0
204001821 maomao90 D April 30, 2023, 5:19 a.m. OK GNU C++17 (64) TESTS 120 15 0
204003922 jiangzimi2008 D April 30, 2023, 5:52 a.m. OK GNU C++17 (64) TESTS 120 15 1024000
203991375 zhangmj2008 D April 30, 2023, 1:29 a.m. OK GNU C++17 (64) TESTS 120 15 2048000
203962651 eriksuenderhauf D April 29, 2023, 5:37 p.m. OK GNU C++17 (64) TESTS 119 15 2048000
203957020 Xellos D April 29, 2023, 4:46 p.m. OK GNU C++17 (64) TESTS 118 15 2048000
203942738 MAOooOAM D April 29, 2023, 3:55 p.m. OK GNU C++17 (64) TESTS 118 15 2048000
203976512 icecuber D April 29, 2023, 8:01 p.m. OK GNU C++17 (64) TESTS 120 15 2457600
203937236 QAQAutoMaton D April 29, 2023, 3:37 p.m. OK GNU C++17 (64) TESTS 118 15 4198400
204002089 maomao90 D April 30, 2023, 5:24 a.m. OK GNU C++17 (64) TESTS 120 30 0
203985779 stan23456 D April 29, 2023, 11 p.m. OK GNU C++17 (64) TESTS 120 30 0
204001257 WCG D April 30, 2023, 5:08 a.m. OK GNU C++20 (64) TESTS 120 15 0
203973105 Lyamzin_alexandr D April 29, 2023, 7:16 p.m. OK GNU C++20 (64) TESTS 120 15 0
203969318 DeadlyPillow D April 29, 2023, 6:36 p.m. OK GNU C++20 (64) TESTS 120 15 0
203964895 Nightmaresss D April 29, 2023, 5:55 p.m. OK GNU C++20 (64) TESTS 120 15 0
203964629 Nightmaresss D April 29, 2023, 5:53 p.m. OK GNU C++20 (64) TESTS 120 15 0
203962256 bashkort D April 29, 2023, 5:34 p.m. OK GNU C++20 (64) TESTS 118 15 0
203960950 _LeMur_ D April 29, 2023, 5:26 p.m. OK GNU C++20 (64) TESTS 118 15 0
203955544 A_G D April 29, 2023, 4:41 p.m. OK GNU C++20 (64) TESTS 118 15 0
203948036 Brovko D April 29, 2023, 4:14 p.m. OK GNU C++20 (64) TESTS 118 15 0
203946499 998batrr D April 29, 2023, 4:08 p.m. OK GNU C++20 (64) TESTS 118 15 0
203984356 IanISam D April 29, 2023, 10:26 p.m. OK Java 8 TESTS 120 109 0
203944002 SecondThread D April 29, 2023, 3:59 p.m. OK Java 8 TESTS 118 140 38195200
203947090 FastFreeTask D April 29, 2023, 4:10 p.m. OK Kotlin 1.6 TESTS 118 233 0
203949256 misorin D April 29, 2023, 4:18 p.m. OK PyPy 3 TESTS 118 202 8704000
204002833 maomao90 D April 30, 2023, 5:36 a.m. OK PyPy 3-64 TESTS 120 62 1126400
204002998 maomao90 D April 30, 2023, 5:38 a.m. OK PyPy 3-64 TESTS 120 62 1740800
204003096 maomao90 D April 30, 2023, 5:40 a.m. OK PyPy 3-64 TESTS 120 62 2560000
204003064 maomao90 D April 30, 2023, 5:39 a.m. OK PyPy 3-64 TESTS 120 62 2560000
203976370 ivatopuria D April 29, 2023, 7:59 p.m. OK PyPy 3-64 TESTS 120 62 3686400
203976247 ivatopuria D April 29, 2023, 7:57 p.m. OK PyPy 3-64 TESTS 120 62 3686400
203976235 ivatopuria D April 29, 2023, 7:57 p.m. OK PyPy 3-64 TESTS 120 62 3686400
203976182 ivatopuria D April 29, 2023, 7:57 p.m. OK PyPy 3-64 TESTS 120 62 3993600
204002510 maomao90 D April 30, 2023, 5:31 a.m. OK PyPy 3-64 TESTS 120 77 1638400
203934540 conqueror_of_tourist D April 29, 2023, 3:29 p.m. OK PyPy 3-64 TESTS 118 77 2457600

remove filters

Back to search problems