Codeforces Round 504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final)

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
1023 Codeforces Round 504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) FINISHED False 8100 203009124 Aug. 17, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2062 ) E Down or Right PROGRAMMING constructive algorithms interactive matrices 2100

B'This is an interactive problem. Bob lives in a square grid of size n x n , with rows numbered 1 through n from top to bottom, and columns numbered 1 through n from left to right. Every cell is either allowed or blocked, but you don 't know the exact description of the grid. You are given only an integer n . Bob can move through allowed cells but only in some limited directions. When Bob is in an allowed cell in the grid, he can move down or right to an adjacent cell, if it is allowed. You can ask at most 4 cdot n queries of form "? r_1 c_1 r_2 c_2 " ( 1 <= r_1 <= r_2 <= n , 1 <= c_1 <= c_2 <= n ). The answer will be "YES" if Bob can get from a cell (r_1, c_1) to a cell (r_2, c_2) , and "NO" otherwise. In particular, if one of the two cells (or both) is a blocked cell then the answer is "NO" for sure. Since Bob doesn 't like short trips, you can only ask queries with the manhattan distance between the two cells at least n - 1 , i.e. the following condition must be satisfied: (r_2 - r_1) + (c_2 - c_1) ge n - 1 . It 's guaranteed that Bob can get from the top-left corner (1, 1) to the bottom-right corner (n, n) and your task is to find a way to do it. You should print the answer in form "! S" where S is a string of length 2 cdot n - 2 consisting of characters 'D ' and 'R ', denoting moves down and right respectively. The down move increases the first coordinate by 1 , the right move increases the second coordinate by 1 . If there are multiple solutions, any of them will be accepted. You should terminate immediately after printing the solution. The only line of the input contains an integer n ( 2 <= n <= 500 ) -- the size of the grid. When you are ready to print the answer, print a single line containing "! S" where where S is a string of length 2 cdot n - 2 consisting of characters 'D ' and 'R ', denot'...

Tutorials

Codeforces Round 504 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
41910269 despair E Aug. 20, 2018, 5:18 p.m. OK D TESTS 78 46 0 2100
41728668 fluffyowl E Aug. 17, 2018, 8:19 p.m. OK D TESTS 78 46 4198400 2100
41791807 rr_ E Aug. 18, 2018, 4:27 p.m. OK D TESTS 78 46 4198400 2100
65904268 hos.lyric E Nov. 28, 2019, 10:11 a.m. OK D TESTS 78 62 0 2100
41810010 kkxhh E Aug. 19, 2018, 2:16 a.m. OK GNU C++ TESTS 78 31 0 2100
41737685 frank3215 E Aug. 18, 2018, 3:28 a.m. OK GNU C++ TESTS 78 31 0 2100
41902891 imalyd E Aug. 20, 2018, 1:07 p.m. OK GNU C++ TESTS 78 31 0 2100
41717540 JinOuwen E Aug. 17, 2018, 4:23 p.m. OK GNU C++ TESTS 78 31 102400 2100
41794829 Fulisike E Aug. 18, 2018, 4:40 p.m. OK GNU C++ TESTS 78 31 204800 2100
41881205 luogu_bot1 E Aug. 20, 2018, 1:38 a.m. OK GNU C++ TESTS 78 31 307200 2100
41881177 hoki_plus E Aug. 20, 2018, 1:37 a.m. OK GNU C++ TESTS 78 31 307200 2100
41759633 nitrogens E Aug. 18, 2018, 1:54 p.m. OK GNU C++ TESTS 78 31 614400 2100
41719210 BBX_de_npy E Aug. 17, 2018, 4:30 p.m. OK GNU C++ TESTS 78 31 1228800 2100
42327545 daifucong E Sept. 1, 2018, 7:11 a.m. OK GNU C++ TESTS 78 46 0 2100
42790374 RainWing E Sept. 12, 2018, 8:01 a.m. OK GNU C11 TESTS 78 46 0 2100
69935182 vjudge5 E Feb. 1, 2020, 3:18 a.m. OK GNU C++11 TESTS 78 31 0 2100
60309878 MoRanSky E Sept. 9, 2019, 3:22 p.m. OK GNU C++11 TESTS 78 31 0 2100
54506777 WOSHIGEPACHONG2 E May 23, 2019, 4:33 a.m. OK GNU C++11 TESTS 78 31 0 2100
53940282 SoiMae E May 10, 2019, 2:25 a.m. OK GNU C++11 TESTS 78 31 0 2100
53940280 SoiMae E May 10, 2019, 2:25 a.m. OK GNU C++11 TESTS 78 31 0 2100
53815996 zsben E May 6, 2019, 10:27 a.m. OK GNU C++11 TESTS 78 31 0 2100
46891161 1592063346 E Dec. 11, 2018, 6:10 a.m. OK GNU C++11 TESTS 78 31 0 2100
46887273 CrazyTeaMajor E Dec. 11, 2018, 2:22 a.m. OK GNU C++11 TESTS 78 31 0 2100
46887045 fwat E Dec. 11, 2018, 2:02 a.m. OK GNU C++11 TESTS 78 31 0 2100
69948117 luogu_bot5 E Feb. 1, 2020, 8:10 a.m. OK GNU C++11 TESTS 78 31 0 2100
42744410 codekode E Sept. 10, 2018, 6:11 p.m. OK GNU C++14 TESTS 78 31 0 2100
42540683 Zookkk E Sept. 6, 2018, 5:43 a.m. OK GNU C++14 TESTS 78 31 0 2100
42346099 wilson.ho E Sept. 1, 2018, 9:29 p.m. OK GNU C++14 TESTS 78 31 0 2100
42145664 Mr.ugly E Aug. 27, 2018, 8:40 a.m. OK GNU C++14 TESTS 78 31 0 2100
42121632 iddilov E Aug. 26, 2018, 12:48 p.m. OK GNU C++14 TESTS 78 31 0 2100
42105632 baghalipolo E Aug. 26, 2018, midnight OK GNU C++14 TESTS 78 31 0 2100
42012409 tsyr8924503 E Aug. 24, 2018, 2:29 a.m. OK GNU C++14 TESTS 78 31 0 2100
41981410 hcs1994 E Aug. 23, 2018, 1:59 a.m. OK GNU C++14 TESTS 78 31 0 2100
41946766 lebeg E Aug. 21, 2018, 7:21 p.m. OK GNU C++14 TESTS 78 31 0 2100
54800225 RNS_CUS E May 29, 2019, 11:36 a.m. OK GNU C++14 TESTS 78 31 0 2100
44177042 endereye E Oct. 12, 2018, 9:22 a.m. OK GNU C++17 TESTS 78 31 0 2100
69195169 NMFF0B0H E Jan. 20, 2020, 2:42 p.m. OK GNU C++17 TESTS 78 31 0 2100
68294451 wwdd E Jan. 6, 2020, 1:11 a.m. OK GNU C++17 TESTS 78 31 0 2100
46700507 mosta7il E Dec. 7, 2018, 1:32 a.m. OK GNU C++17 TESTS 78 31 0 2100
46532240 UminchuR E Dec. 3, 2018, 6:32 a.m. OK GNU C++17 TESTS 78 31 0 2100
41965580 Chameleon2460 E Aug. 22, 2018, 12:07 p.m. OK GNU C++17 TESTS 78 31 0 2100
41947083 Osama_Alkhodairy E Aug. 21, 2018, 7:40 p.m. OK GNU C++17 TESTS 78 31 0 2100
41902629 PopescuMihai E Aug. 20, 2018, 12:59 p.m. OK GNU C++17 TESTS 78 31 0 2100
41893675 gleb-kov E Aug. 20, 2018, 8:21 a.m. OK GNU C++17 TESTS 78 31 0 2100
41780632 vamaddur E Aug. 18, 2018, 3:45 p.m. OK GNU C++17 TESTS 78 31 0 2100
41728336 guptautkarsh028 E Aug. 17, 2018, 8:07 p.m. OK Java 8 TESTS 78 171 0 2100
41731395 mmaxio E Aug. 17, 2018, 10:26 p.m. OK Java 8 TESTS 78 171 0 2100
41728183 Harpae E Aug. 17, 2018, 8:03 p.m. OK Java 8 TESTS 78 186 0 2100
41726868 AQT E Aug. 17, 2018, 7:25 p.m. OK Java 8 TESTS 78 186 0 2100
41718162 AkshajK E Aug. 17, 2018, 4:25 p.m. OK Java 8 TESTS 78 186 0 2100
41819045 AJ47 E Aug. 19, 2018, 8:20 a.m. OK Java 8 TESTS 78 187 0 2100
41887459 lansergecs E Aug. 20, 2018, 4:55 a.m. OK Java 8 TESTS 78 187 0 2100
41734360 tanzaku E Aug. 18, 2018, 1:26 a.m. OK Java 8 TESTS 78 187 0 2100
41729809 Suzukaze E Aug. 17, 2018, 9 p.m. OK Java 8 TESTS 78 187 0 2100
41727989 PrakharJain E Aug. 17, 2018, 7:56 p.m. OK Java 8 TESTS 78 187 0 2100
41720563 Slamur E Aug. 17, 2018, 4:37 p.m. OK Kotlin TESTS 78 233 819200 2100
41715566 final_child E Aug. 17, 2018, 4:13 p.m. OK Kotlin TESTS 78 264 0 2100
41714691 GustavK E Aug. 17, 2018, 4:09 p.m. OK Mono C# TESTS 78 77 307200 2100
41721885 schoenus E Aug. 17, 2018, 4:43 p.m. OK Mono C# TESTS 78 108 69120000 2100
41715034 FelixMP E Aug. 17, 2018, 4:11 p.m. OK MS C++ TESTS 78 46 0 2100
41716731 lxn E Aug. 17, 2018, 4:19 p.m. OK MS C++ TESTS 78 46 1024000 2100
49500932 PavelChadnov E Feb. 5, 2019, 3:07 p.m. OK MS C++ 2017 TESTS 78 61 0 2100
42432160 tanmay28 E Sept. 3, 2018, 3:21 p.m. OK PyPy 3 TESTS 78 217 0 2100
41803614 xennygrimmato E Aug. 18, 2018, 8:08 p.m. OK PyPy 3 TESTS 78 249 204800 2100
41733468 WNG E Aug. 18, 2018, 12:46 a.m. OK Python 2 TESTS 78 186 0 2100
45947720 EoinDavey E Nov. 19, 2018, 2:47 a.m. OK Python 2 TESTS 78 187 0 2100
41733369 WNG E Aug. 18, 2018, 12:41 a.m. OK Python 2 TESTS 78 202 0 2100
41924771 Savit_Gupta E Aug. 21, 2018, 6:53 a.m. OK Python 3 TESTS 78 140 0 2100
41714268 NoDesire E Aug. 17, 2018, 4:07 p.m. OK Python 3 TESTS 78 140 307200 2100
41752370 Emillio E Aug. 18, 2018, 10:16 a.m. OK Python 3 TESTS 78 155 0 2100
42314436 Rockey E Aug. 31, 2018, 4:22 p.m. OK Python 3 TESTS 78 155 102400 2100
68434674 SoSooding E Jan. 9, 2020, 8:28 a.m. OK Python 3 TESTS 78 155 307200 2100
42432201 tanmay28 E Sept. 3, 2018, 3:22 p.m. OK Python 3 TESTS 78 155 307200 2100
42157717 Rotolord E Aug. 27, 2018, 3:53 p.m. OK Python 3 TESTS 78 202 307200 2100
41814710 Kaa E Aug. 19, 2018, 5:54 a.m. OK Python 3 TESTS 78 233 1024000 2100
62642756 sansen E Oct. 15, 2019, 6:37 p.m. OK Rust TESTS 78 77 0 2100
42809621 yakamoto E Sept. 12, 2018, 7:07 p.m. OK Scala TESTS 78 592 0 2100

remove filters

Back to search problems