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 |
---|---|---|---|---|---|---|
1974 | Codeforces Round 946 (Div. 3) | FINISHED | False | 8100 | 15607498 | May 20, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3579 ) | F | Cutting Game | PROGRAMMING | binary search brute force data structures implementation sortings two pointers | 1900 |
B"Alice and Bob were playing a game again. They have a grid of size a x b ( 1 <= a, b <= 10^9 ), on which there are n chips, with at most one chip in each cell. The cell at the intersection of the x -th row and the y -th column has coordinates (x, y) . Alice made the first move, and the players took turns. On each move, a player could cut several (but not all) rows or columns from the beginning or end of the remaining grid and earn a point for each chip that was on the cut part of the grid. Each move can be described by the character 'U', 'D', 'L', or 'R' and an integer k : Based on the initial state of the grid and the players' moves, determine the number of points earned by Alice and Bob, respectively. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains four integers a , b , n , and m ( 2 <= a, b <= 10^9 , 1 <= n, m <= 2 cdot 10^5 ) -- the dimensions of the grid, the number of chips, and the number of moves. Each of the next n lines contain two integers x_i and y_i ( 1 <= x_i <= a , 1 <= y_i <= b ) -- the coordinates of the chips. All pairs of coordinates are distinct. Each of the next m lines contain a character c_j and an integer k_j -- the description of the j -th move. It is guaranteed that k is less than the number of rows/columns in the current grid. In other words, a player cannot cut the entire remaining grid on their move. It is guaranteed that the sum of the values of n across all test cases in the test does not exceed 2 cdot 10^5 . It is guaranteed that the sum of the values of m across all test cases in the test does not exceed 2 cdot 10^5 . For each test case, output two integers -- the number of points earned by Alice and Bob, respectively. Below is the game from the first example: "... |
Codeforces Round #946 (Div. 3) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
263212201 | mban259 | F | May 30, 2024, 8:25 a.m. | OK | C# 10 | TESTS | 16 | 1374 | 29900800 | 1900 | |
263073567 | Uncertainly | F | May 29, 2024, 12:44 a.m. | OK | C++14 (GCC 6-32) | TESTS | 16 | 187 | 4300800 | 1900 | |
262673077 | JKL891402 | F | May 26, 2024, 8:22 a.m. | OK | C++14 (GCC 6-32) | TESTS | 16 | 202 | 1638400 | 1900 | |
263146732 | chengning | F | May 29, 2024, 1:18 p.m. | OK | C++14 (GCC 6-32) | TESTS | 16 | 202 | 1843200 | 1900 | |
263113647 | ayuisaki | F | May 29, 2024, 8:48 a.m. | OK | C++14 (GCC 6-32) | TESTS | 16 | 202 | 4812800 | 1900 | |
263113701 | ayuisaki | F | May 29, 2024, 8:48 a.m. | OK | C++14 (GCC 6-32) | TESTS | 16 | 218 | 4812800 | 1900 | |
263146796 | chengning | F | May 29, 2024, 1:18 p.m. | OK | C++14 (GCC 6-32) | TESTS | 16 | 233 | 1843200 | 1900 | |
262762538 | rozan_nich | F | May 26, 2024, 3:44 p.m. | OK | C++14 (GCC 6-32) | TESTS | 16 | 233 | 5939200 | 1900 | |
262655859 | Sneh16 | F | May 26, 2024, 6:05 a.m. | OK | C++14 (GCC 6-32) | TESTS | 16 | 233 | 10035200 | 1900 | |
263093314 | superDev007 | F | May 29, 2024, 6:09 a.m. | OK | C++14 (GCC 6-32) | TESTS | 16 | 264 | 4812800 | 1900 | |
263659339 | Hakarishirenai | F | June 1, 2024, 4:50 p.m. | OK | C++14 (GCC 6-32) | TESTS | 16 | 281 | 21708800 | 1900 | |
262993070 | AAli963 | F | May 28, 2024, 10:10 a.m. | OK | C++17 (GCC 7-32) | TESTS | 16 | 93 | 5017600 | 1900 | |
263372493 | zerocloud01 | F | May 30, 2024, 5:59 p.m. | OK | C++17 (GCC 7-32) | TESTS | 16 | 187 | 1126400 | 1900 | |
262977029 | Iruri | F | May 28, 2024, 7:52 a.m. | OK | C++17 (GCC 7-32) | TESTS | 16 | 187 | 2457600 | 1900 | |
263222883 | Ngeces | F | May 30, 2024, 10:35 a.m. | OK | C++17 (GCC 7-32) | TESTS | 16 | 202 | 0 | 1900 | |
262980959 | NotTete | F | May 28, 2024, 8:25 a.m. | OK | C++17 (GCC 7-32) | TESTS | 16 | 202 | 0 | 1900 | |
262818943 | Starbow_Break | F | May 27, 2024, 3:38 a.m. | OK | C++17 (GCC 7-32) | TESTS | 16 | 202 | 0 | 1900 | |
263667926 | Ludissey | F | June 1, 2024, 6:08 p.m. | OK | C++17 (GCC 7-32) | TESTS | 16 | 202 | 5017600 | 1900 | |
262781709 | im.priyansh | F | May 26, 2024, 5:04 p.m. | OK | C++17 (GCC 7-32) | TESTS | 16 | 202 | 14028800 | 1900 | |
262892650 | Eftekhar_Nahim | F | May 27, 2024, 2:10 p.m. | OK | C++17 (GCC 7-32) | TESTS | 16 | 217 | 0 | 1900 | |
262992732 | AAli963 | F | May 28, 2024, 10:07 a.m. | OK | C++17 (GCC 7-32) | TESTS | 16 | 217 | 4812800 | 1900 | |
263195162 | LETTERA | F | May 30, 2024, 2:51 a.m. | OK | C++20 (GCC 13-64) | TESTS | 16 | 156 | 1228800 | 1900 | |
262971641 | Yshanqian | F | May 28, 2024, 7:05 a.m. | OK | C++20 (GCC 13-64) | TESTS | 16 | 156 | 48128000 | 1900 | |
263188990 | hazzlek | F | May 29, 2024, 10:29 p.m. | OK | C++20 (GCC 13-64) | TESTS | 16 | 171 | 921600 | 1900 | |
263396740 | Empty_Dust | F | May 31, 2024, 1:18 a.m. | OK | C++20 (GCC 13-64) | TESTS | 16 | 171 | 1126400 | 1900 | |
262818482 | gagandeep.singh | F | May 27, 2024, 3:30 a.m. | OK | C++20 (GCC 13-64) | TESTS | 16 | 171 | 2764800 | 1900 | |
262704654 | star_xiangmy | F | May 26, 2024, 12:40 p.m. | OK | C++20 (GCC 13-64) | TESTS | 16 | 171 | 3072000 | 1900 | |
262809878 | shendeliliang | F | May 27, 2024, 12:22 a.m. | OK | C++20 (GCC 13-64) | TESTS | 16 | 171 | 3276800 | 1900 | |
262688489 | hmmmmm | F | May 26, 2024, 10:26 a.m. | OK | C++20 (GCC 13-64) | TESTS | 16 | 171 | 4198400 | 1900 | |
263085835 | Amary_llis | F | May 29, 2024, 4:36 a.m. | OK | C++20 (GCC 13-64) | TESTS | 16 | 171 | 4812800 | 1900 | |
263527349 | qlf9 | F | May 31, 2024, 4:38 p.m. | OK | C++20 (GCC 13-64) | TESTS | 16 | 171 | 5529600 | 1900 | |
263219830 | MikhailKapitov | F | May 30, 2024, 10:06 a.m. | OK | Go | TESTS | 16 | 640 | 27238400 | 1900 | |
263261793 | oneafter | F | May 30, 2024, 2:16 p.m. | OK | Java 21 | TESTS | 16 | 937 | 39219200 | 1900 | |
262515089 | daksh_02 | F | May 25, 2024, 1:34 p.m. | OK | Java 21 | TESTS | 16 | 1655 | 56422400 | 1900 | |
263091495 | jjjfr | F | May 29, 2024, 5:48 a.m. | OK | Java 21 | TESTS | 16 | 1671 | 53248000 | 1900 | |
262615556 | codeWithDarshan | F | May 25, 2024, 6:11 p.m. | OK | Java 21 | TESTS | 16 | 1718 | 53452800 | 1900 | |
262685831 | kasiru_69 | F | May 26, 2024, 10:04 a.m. | OK | Java 8 | TESTS | 16 | 812 | 33894400 | 1900 | |
262868328 | LoginovskiyE | F | May 27, 2024, 11:02 a.m. | OK | PyPy 3-64 | TESTS | 16 | 578 | 45670400 | 1900 | |
262924685 | googlweknoall | F | May 27, 2024, 6:53 p.m. | OK | PyPy 3-64 | TESTS | 16 | 1139 | 76697600 | 1900 | |
262517487 | HelloNCD | F | May 25, 2024, 1:57 p.m. | OK | PyPy 3-64 | TESTS | 16 | 1749 | 160051200 | 1900 | |
263359591 | 2024_how_to_practice | F | May 30, 2024, 4:34 p.m. | OK | PyPy 3-64 | TESTS | 16 | 1827 | 67788800 | 1900 | |
262839413 | jvatsal0709 | F | May 27, 2024, 7:01 a.m. | OK | PyPy 3-64 | TESTS | 16 | 1874 | 47308800 | 1900 | |
263086349 | WarriorOfLiberation | F | May 29, 2024, 4:44 a.m. | OK | PyPy 3-64 | TESTS | 16 | 1890 | 45670400 | 1900 | |
263577674 | Yifanz | F | June 1, 2024, 5:23 a.m. | OK | PyPy 3-64 | TESTS | 16 | 1906 | 47001600 | 1900 | |
263577548 | techie-arpit | F | June 1, 2024, 5:21 a.m. | OK | PyPy 3-64 | TESTS | 16 | 1906 | 47001600 | 1900 | |
262839803 | Taymyr | F | May 27, 2024, 7:04 a.m. | OK | PyPy 3-64 | TESTS | 16 | 1937 | 58880000 | 1900 | |
262656870 | maiicy | F | May 26, 2024, 6:14 a.m. | OK | PyPy 3-64 | TESTS | 16 | 1968 | 47001600 | 1900 | |
263577513 | techie-arpit | F | June 1, 2024, 5:21 a.m. | OK | Python 3 | TESTS | 16 | 1218 | 64819200 | 1900 | |
263094311 | veera_teja_007 | F | May 29, 2024, 6:18 a.m. | OK | Python 3 | TESTS | 16 | 1281 | 64921600 | 1900 | |
262509369 | qyc333 | F | May 25, 2024, 12:31 p.m. | OK | Python 3 | TESTS | 16 | 1343 | 64819200 | 1900 | |
262806165 | awesomep | F | May 26, 2024, 10:28 p.m. | OK | Python 3 | TESTS | 16 | 1405 | 64921600 | 1900 | |
262711969 | lqtrung1998 | F | May 26, 2024, 1:45 p.m. | OK | Python 3 | TESTS | 16 | 1421 | 80384000 | 1900 | |
263535210 | salem_mo | F | May 31, 2024, 5:48 p.m. | OK | Python 3 | TESTS | 16 | 2515 | 51814400 | 1900 | |
263681930 | DarkSky_0xFF | F | June 1, 2024, 9:23 p.m. | OK | Rust 2021 | TESTS | 16 | 77 | 10035200 | 1900 | |
263083452 | BetterThanNobita | F | May 29, 2024, 3:58 a.m. | OK | Rust 2021 | TESTS | 16 | 109 | 9728000 | 1900 |
Back to search problems