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 |
---|---|---|---|---|---|---|
1644 | Educational Codeforces Round 123 (Rated for Div. 2) | FINISHED | False | 7200 | 86282699 | Feb. 22, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3123 ) | E | Expand the Path | PROGRAMMING | brute force combinatorics implementation math |
B"Consider a grid of size n x n . The rows are numbered top to bottom from 1 to n , the columns are numbered left to right from 1 to n . The robot is positioned in a cell (1, 1) . It can perform two types of moves: The robot is not allowed to move outside the grid. You are given a sequence of moves s -- the initial path of the robot. This path doesn't lead the robot outside the grid. You are allowed to perform an arbitrary number of modifications to it (possibly, zero). With one modification, you can duplicate one move in the sequence. That is, replace a single occurrence of D with DD or a single occurrence of R with RR. Count the number of cells such that there exists at least one sequence of modifications that the robot visits this cell on the modified path and doesn't move outside the grid. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of testcases. The first line of each testcase contains the single integer n ( 2 <= n <= 10^8 ) -- the number of rows and columns in the grid. The second line of each testcase contains a non-empty string s , consisting only of characters D and R, -- the initial path of the robot. This path doesn't lead the robot outside the grid. The total length of strings s over all testcases doesn't exceed 2 cdot 10^5 . For each testcase, print a single integer -- the number of cells such that there exists at least one sequence of modifications that the robot visits this cell on the modified path and doesn't move outside the grid. In the first testcase, it's enough to consider the following modified paths: Thus, the cells that are visited on at least one modified path are: (1, 1) , (1, 2) , (1, 3) , (1, 4) , (2, 2) , (2, 3) , (2, 4) , (3, 2) , (3, 3) , (3, 4) , (4, 2) , (4, 3) and (4, 4) . In the second testcase, there is no way to modify the sequence"... |
100227 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
147343563 | AngryLeaf | E | Feb. 22, 2022, 4:23 p.m. | OK | GNU C11 | TESTS | 12 | 61 | 204800 | ||
147361371 | rainboy | E | Feb. 22, 2022, 6:26 p.m. | OK | GNU C11 | TESTS | 12 | 77 | 204800 | ||
147384308 | minsiqi | E | Feb. 23, 2022, 3:16 a.m. | OK | GNU C++14 | TESTS | 12 | 15 | 204800 | ||
147384049 | Indigosky | E | Feb. 23, 2022, 3:10 a.m. | OK | GNU C++14 | TESTS | 12 | 15 | 204800 | ||
147383962 | Goldenglow | E | Feb. 23, 2022, 3:08 a.m. | OK | GNU C++14 | TESTS | 12 | 15 | 204800 | ||
147383082 | shangcheng | E | Feb. 23, 2022, 2:49 a.m. | OK | GNU C++14 | TESTS | 12 | 15 | 204800 | ||
147378430 | zzt_ | E | Feb. 23, 2022, 12:29 a.m. | OK | GNU C++14 | TESTS | 12 | 15 | 204800 | ||
147367058 | JunBinLiang | E | Feb. 22, 2022, 7:43 p.m. | OK | GNU C++14 | TESTS | 12 | 15 | 204800 | ||
147358068 | Deaga | E | Feb. 22, 2022, 5:49 p.m. | OK | GNU C++14 | TESTS | 12 | 15 | 204800 | ||
147350284 | AmamiyaYuuko | E | Feb. 22, 2022, 4:43 p.m. | OK | GNU C++14 | TESTS | 12 | 15 | 204800 | ||
147393002 | luogu_bot1 | E | Feb. 23, 2022, 5:45 a.m. | OK | GNU C++14 | TESTS | 12 | 15 | 204800 | ||
147390911 | luogu_bot3 | E | Feb. 23, 2022, 5:16 a.m. | OK | GNU C++14 | TESTS | 12 | 15 | 204800 | ||
147383953 | Celmin | E | Feb. 23, 2022, 3:08 a.m. | OK | GNU C++17 | TESTS | 12 | 15 | 204800 | ||
147383038 | bojverdict1 | E | Feb. 23, 2022, 2:48 a.m. | OK | GNU C++17 | TESTS | 12 | 15 | 204800 | ||
147382192 | xiece666 | E | Feb. 23, 2022, 2:27 a.m. | OK | GNU C++17 | TESTS | 12 | 15 | 204800 | ||
147363440 | HellolllWorld | E | Feb. 22, 2022, 6:52 p.m. | OK | GNU C++17 | TESTS | 12 | 15 | 204800 | ||
147358181 | beast_sennpai | E | Feb. 22, 2022, 5:50 p.m. | OK | GNU C++17 | TESTS | 12 | 15 | 204800 | ||
147355032 | chan_yi | E | Feb. 22, 2022, 5:19 p.m. | OK | GNU C++17 | TESTS | 12 | 15 | 204800 | ||
147352402 | Winlere | E | Feb. 22, 2022, 4:58 p.m. | OK | GNU C++17 | TESTS | 12 | 15 | 204800 | ||
147350968 | farhanshahoriar | E | Feb. 22, 2022, 4:47 p.m. | OK | GNU C++17 | TESTS | 12 | 15 | 204800 | ||
147350912 | lzc2001 | E | Feb. 22, 2022, 4:47 p.m. | OK | GNU C++17 | TESTS | 12 | 15 | 204800 | ||
147384091 | Zeroffer | E | Feb. 23, 2022, 3:11 a.m. | OK | GNU C++17 | TESTS | 12 | 15 | 204800 | ||
147360428 | hackerbhaiya | E | Feb. 22, 2022, 6:15 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 0 | 512000 | ||
147341195 | YL-9 | E | Feb. 22, 2022, 4:17 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 204800 | ||
147389817 | HYLTianMeng | E | Feb. 23, 2022, 5:02 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 204800 | ||
147390529 | krenX | E | Feb. 23, 2022, 5:12 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 512000 | ||
147390091 | pavankalyanpallapolu | E | Feb. 23, 2022, 5:06 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 512000 | ||
147389904 | isheoran | E | Feb. 23, 2022, 5:04 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 512000 | ||
147385897 | LAB | E | Feb. 23, 2022, 3:53 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 512000 | ||
147384838 | AGG | E | Feb. 23, 2022, 3:28 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 512000 | ||
147382811 | froggyzhang | E | Feb. 23, 2022, 2:43 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 512000 | ||
147392620 | gqf123 | E | Feb. 23, 2022, 5:40 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 512000 | ||
147391271 | jiangly | E | Feb. 23, 2022, 5:22 a.m. | OK | GNU C++20 (64) | TESTS | 12 | 0 | 512000 | ||
147370983 | codificador10 | E | Feb. 22, 2022, 8:50 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 0 | 512000 | ||
147386806 | foreverlasting | E | Feb. 23, 2022, 4:11 a.m. | OK | GNU C++20 (64) | TESTS | 12 | 15 | 204800 | ||
147376873 | Alan233 | E | Feb. 22, 2022, 11:32 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 15 | 204800 | ||
147360844 | mcj201314 | E | Feb. 22, 2022, 6:20 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 15 | 204800 | ||
147360841 | Garliczz | E | Feb. 22, 2022, 6:20 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 15 | 204800 | ||
147348747 | zn_com | E | Feb. 22, 2022, 4:34 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 15 | 204800 | ||
147388656 | hanhanlala | E | Feb. 23, 2022, 4:44 a.m. | OK | GNU C++20 (64) | TESTS | 12 | 15 | 204800 | ||
147389281 | RuanWilliam | E | Feb. 23, 2022, 4:54 a.m. | OK | GNU C++20 (64) | TESTS | 12 | 15 | 512000 | ||
147390210 | spongebobsquareroot | E | Feb. 23, 2022, 5:08 a.m. | OK | GNU C++20 (64) | TESTS | 12 | 15 | 512000 | ||
147371680 | meooow | E | Feb. 22, 2022, 9:04 p.m. | OK | Haskell | TESTS | 12 | 77 | 13721600 | ||
147342043 | fpeterfalvi | E | Feb. 22, 2022, 4:19 p.m. | OK | Java 11 | TESTS | 12 | 171 | 0 | ||
147357499 | kamranm | E | Feb. 22, 2022, 5:43 p.m. | OK | Java 11 | TESTS | 12 | 187 | 0 | ||
147341204 | saptarshi1729 | E | Feb. 22, 2022, 4:17 p.m. | OK | Java 11 | TESTS | 12 | 187 | 19046400 | ||
147391925 | __Serendipity | E | Feb. 23, 2022, 5:31 a.m. | OK | Java 11 | TESTS | 12 | 233 | 15462400 | ||
147362308 | pras7946 | E | Feb. 22, 2022, 6:37 p.m. | OK | Java 11 | TESTS | 12 | 249 | 0 | ||
147376944 | YahiaSherif | E | Feb. 22, 2022, 11:35 p.m. | OK | Java 8 | TESTS | 12 | 93 | 0 | ||
147360976 | sky9313 | E | Feb. 22, 2022, 6:21 p.m. | OK | Java 8 | TESTS | 12 | 108 | 0 | ||
147344560 | AdhmMohamed | E | Feb. 22, 2022, 4:25 p.m. | OK | Java 8 | TESTS | 12 | 124 | 0 | ||
147345943 | Aabhas99 | E | Feb. 22, 2022, 4:29 p.m. | OK | Java 8 | TESTS | 12 | 155 | 0 | ||
147346293 | cc4414 | E | Feb. 22, 2022, 4:29 p.m. | OK | Java 8 | TESTS | 12 | 234 | 0 | ||
147351455 | arvindf232 | E | Feb. 22, 2022, 4:51 p.m. | OK | Kotlin 1.4 | TESTS | 12 | 265 | 0 | ||
147385546 | hcp | E | Feb. 23, 2022, 3:45 a.m. | OK | MS C++ 2017 | TESTS | 12 | 15 | 204800 | ||
147386188 | Killer_No.47 | E | Feb. 23, 2022, 3:59 a.m. | OK | MS C++ 2017 | TESTS | 12 | 31 | 204800 | ||
147345568 | nikita1998 | E | Feb. 22, 2022, 4:28 p.m. | OK | MS C++ 2017 | TESTS | 12 | 31 | 5222400 | ||
147351807 | orloffm | E | Feb. 22, 2022, 4:53 p.m. | OK | .NET Core C# | TESTS | 12 | 92 | 2969600 | ||
147350627 | hxu10 | E | Feb. 22, 2022, 4:45 p.m. | OK | PyPy 3 | TESTS | 12 | 155 | 4505600 | ||
147364906 | oadey89 | E | Feb. 22, 2022, 7:13 p.m. | OK | PyPy 3 | TESTS | 12 | 170 | 6758400 | ||
147363063 | jimm89 | E | Feb. 22, 2022, 6:47 p.m. | OK | PyPy 3 | TESTS | 12 | 171 | 6860800 | ||
147353377 | MistaAsh | E | Feb. 22, 2022, 5:05 p.m. | OK | PyPy 3 | TESTS | 12 | 171 | 8601600 | ||
147361539 | jimm89 | E | Feb. 22, 2022, 6:28 p.m. | OK | PyPy 3 | TESTS | 12 | 187 | 7168000 | ||
147346025 | roee | E | Feb. 22, 2022, 4:29 p.m. | OK | PyPy 3 | TESTS | 12 | 187 | 7270400 | ||
147355594 | anishde85 | E | Feb. 22, 2022, 5:25 p.m. | OK | PyPy 3 | TESTS | 12 | 374 | 13516800 | ||
147382656 | peterwuyihong | E | Feb. 23, 2022, 2:38 a.m. | OK | PyPy 3 | TESTS | 12 | 452 | 9318400 | ||
147369522 | whatshisbucket | E | Feb. 22, 2022, 8:24 p.m. | OK | PyPy 3 | TESTS | 12 | 514 | 11980800 | ||
147362665 | s_ninja | E | Feb. 22, 2022, 6:42 p.m. | OK | PyPy 3-64 | TESTS | 12 | 93 | 4915200 | ||
147381868 | SalatL | E | Feb. 23, 2022, 2:18 a.m. | OK | PyPy 3-64 | TESTS | 12 | 139 | 9932800 | ||
147365230 | oadey89 | E | Feb. 22, 2022, 7:17 p.m. | OK | PyPy 3-64 | TESTS | 12 | 140 | 10854400 | ||
147347040 | swoon | E | Feb. 22, 2022, 4:31 p.m. | OK | PyPy 3-64 | TESTS | 12 | 140 | 14438400 | ||
147343532 | vilhelmthorsson | E | Feb. 22, 2022, 4:23 p.m. | OK | PyPy 3-64 | TESTS | 12 | 155 | 9523200 | ||
147341971 | jaglike_makkar | E | Feb. 22, 2022, 4:19 p.m. | OK | PyPy 3-64 | TESTS | 12 | 186 | 13414400 | ||
147382470 | FlakeLCR | E | Feb. 23, 2022, 2:33 a.m. | OK | PyPy 3-64 | TESTS | 12 | 311 | 10752000 | ||
147382918 | FlakeLCR | E | Feb. 23, 2022, 2:45 a.m. | OK | PyPy 3-64 | TESTS | 12 | 327 | 10444800 | ||
147357560 | ankan2526 | E | Feb. 22, 2022, 5:44 p.m. | OK | PyPy 3-64 | TESTS | 12 | 436 | 18841600 | ||
147349151 | huikang | E | Feb. 22, 2022, 4:37 p.m. | OK | PyPy 3-64 | TESTS | 12 | 748 | 25702400 | ||
147363971 | OLOGY | E | Feb. 22, 2022, 7 p.m. | OK | Python 2 | TESTS | 12 | 124 | 1331200 | ||
147369197 | OLOGY | E | Feb. 22, 2022, 8:18 p.m. | OK | Python 2 | TESTS | 12 | 249 | 1331200 | ||
147377238 | belkka | E | Feb. 22, 2022, 11:45 p.m. | OK | Python 3 | TESTS | 12 | 62 | 307200 | ||
147353961 | jobsDone | E | Feb. 22, 2022, 5:10 p.m. | OK | Python 3 | TESTS | 12 | 62 | 409600 | ||
147380884 | Ushiiin | E | Feb. 23, 2022, 1:50 a.m. | OK | Python 3 | TESTS | 12 | 202 | 1945600 | ||
147381066 | clause | E | Feb. 23, 2022, 1:56 a.m. | OK | Rust 2021 | TESTS | 12 | 124 | 512000 |
Back to search problems