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 |
---|---|---|---|---|---|---|
1844 | Codeforces Round 884 (Div. 1 + Div. 2) | FINISHED | False | 10800 | 42737099 | July 11, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1899 ) | E | Great Grids | PROGRAMMING | constructive algorithms dfs and similar ds graphs math |
B'An n x m grid of characters is called great if it satisfies these three conditions: Let (x,y) denote the cell in the x -th row from the top and y -th column from the left. You want to construct a great grid that satisfies k constraints. Each constraint consists of two cells, (x_{i,1},y_{i,1}) and (x_{i,2},y_{i,2}) , that share exactly one corner. You want your great grid to have the same letter in cells (x_{i,1},y_{i,1}) and (x_{i,2},y_{i,2}) . Determine whether there exists a great grid satisfying all the constraints. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^3 ). The description of the test cases follows. The first line of each test case contains three integers, n , m , and k ( 2 <= n,m <= 2 cdot 10^3 , 1 <= k <= 4 cdot 10^3 ). Each of the next k lines contains four integers, x_{i,1} , y_{i,1} , x_{i,2} , and y_{i,2} ( 1 <= x_{i,1} < x_{i,2} <= n , 1 <= y_{i,1},y_{i,2} <= m ). It is guaranteed that either (x_{i,2},y_{i,2}) = (x_{i,1}+1,y_{i,1}+1) or (x_{i,2},y_{i,2}) = (x_{i,1}+1,y_{i,1}-1) . The pairs of cells are pairwise distinct, i.e. for all 1 <= i < j <= k , it is not true that x_{i,1} = x_{j,1} , y_{i,1} = y_{j,1} , x_{i,2} = x_{j,2} , and y_{i,2} = y_{j,2} . It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^3 . It is guaranteed that the sum of m over all test cases does not exceed 2 cdot 10^3 . It is guaranteed that the sum of k over all test cases does not exceed 4 cdot 10^3 . For each test case, output "YES" if a great grid satisfying all the constraints exists and "NO" otherwise. You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses. In the fi'... |
Codeforces Round #884 (Div. 1 + Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
213404691 | KumaTachiRen | E | July 11, 2023, 6:05 p.m. | OK | C# 8 | TESTS | 42 | 155 | 4198400 | ||
213431025 | rainboy | E | July 11, 2023, 11:42 p.m. | OK | GNU C11 | TESTS | 42 | 15 | 0 | ||
213441917 | Reborn | E | July 12, 2023, 2:19 a.m. | OK | GNU C++14 | TESTS | 42 | 15 | 102400 | ||
213409840 | omeganot | E | July 11, 2023, 6:37 p.m. | OK | GNU C++14 | TESTS | 42 | 15 | 102400 | ||
213406293 | hy2004 | E | July 11, 2023, 6:13 p.m. | OK | GNU C++14 | TESTS | 42 | 15 | 102400 | ||
213454770 | smallC233 | E | July 12, 2023, 5:27 a.m. | OK | GNU C++14 | TESTS | 42 | 15 | 102400 | ||
213447886 | Quartz_y | E | July 12, 2023, 3:35 a.m. | OK | GNU C++14 | TESTS | 42 | 15 | 102400 | ||
213394002 | KanzouYamashiro | E | July 11, 2023, 5:07 p.m. | OK | GNU C++14 | TESTS | 42 | 15 | 204800 | ||
213452093 | 123abda | E | July 12, 2023, 4:44 a.m. | OK | GNU C++14 | TESTS | 42 | 15 | 512000 | ||
213398747 | kkpos0206 | E | July 11, 2023, 5:23 p.m. | OK | GNU C++14 | TESTS | 42 | 30 | 16486400 | ||
213436558 | CLOCKS_PER_SEC | E | July 12, 2023, 1:13 a.m. | OK | GNU C++14 | TESTS | 42 | 31 | 102400 | ||
213443380 | Galetx | E | July 12, 2023, 2:36 a.m. | OK | GNU C++14 | TESTS | 42 | 31 | 102400 | ||
213451754 | Ice_teapoy | E | July 12, 2023, 4:39 a.m. | OK | GNU C++17 | TESTS | 42 | 15 | 0 | ||
213412425 | wqweto | E | July 11, 2023, 7 p.m. | OK | GNU C++17 | TESTS | 42 | 15 | 102400 | ||
213441783 | 1.618 | E | July 12, 2023, 2:18 a.m. | OK | GNU C++17 | TESTS | 42 | 15 | 102400 | ||
213412942 | luicosas | E | July 11, 2023, 7:05 p.m. | OK | GNU C++17 | TESTS | 42 | 15 | 204800 | ||
213401708 | lelbaba | E | July 11, 2023, 5:33 p.m. | OK | GNU C++17 | TESTS | 42 | 15 | 204800 | ||
213428311 | Nson | E | July 11, 2023, 10:41 p.m. | OK | GNU C++17 | TESTS | 42 | 15 | 204800 | ||
213400758 | 1.618 | E | July 11, 2023, 5:30 p.m. | OK | GNU C++17 | TESTS | 42 | 15 | 307200 | ||
213411456 | a757403 | E | July 11, 2023, 6:51 p.m. | OK | GNU C++17 | TESTS | 42 | 15 | 409600 | ||
213396411 | serotonin | E | July 11, 2023, 5:16 p.m. | OK | GNU C++17 | TESTS | 42 | 15 | 409600 | ||
213416137 | farhan95104 | E | July 11, 2023, 7:40 p.m. | OK | GNU C++17 | TESTS | 42 | 15 | 409600 | ||
213455847 | 1250713087 | E | July 12, 2023, 5:44 a.m. | OK | GNU C++17 (64) | TESTS | 42 | 0 | 409600 | ||
213418389 | neal | E | July 11, 2023, 8:07 p.m. | OK | GNU C++17 (64) | TESTS | 42 | 15 | 0 | ||
213434732 | lunchbox | E | July 12, 2023, 12:49 a.m. | OK | GNU C++17 (64) | TESTS | 42 | 15 | 102400 | ||
213446601 | DoNotMoZheng | E | July 12, 2023, 3:17 a.m. | OK | GNU C++17 (64) | TESTS | 42 | 15 | 204800 | ||
213439109 | zhensuan | E | July 12, 2023, 1:45 a.m. | OK | GNU C++17 (64) | TESTS | 42 | 15 | 204800 | ||
213407311 | Bucketsmith | E | July 11, 2023, 6:19 p.m. | OK | GNU C++17 (64) | TESTS | 42 | 15 | 409600 | ||
213444351 | MIKEFENG | E | July 12, 2023, 2:46 a.m. | OK | GNU C++17 (64) | TESTS | 42 | 15 | 409600 | ||
213406617 | Honey_Badger | E | July 11, 2023, 6:15 p.m. | OK | GNU C++17 (64) | TESTS | 42 | 15 | 819200 | ||
213420715 | stan23456 | E | July 11, 2023, 8:34 p.m. | OK | GNU C++17 (64) | TESTS | 42 | 15 | 819200 | ||
213454130 | Alex_Wei | E | July 12, 2023, 5:16 a.m. | OK | GNU C++17 (64) | TESTS | 42 | 15 | 1638400 | ||
213438858 | aufannn | E | July 12, 2023, 1:42 a.m. | OK | GNU C++20 (64) | TESTS | 42 | 0 | 102400 | ||
213394208 | Retired_Isaunoya | E | July 11, 2023, 5:08 p.m. | OK | GNU C++20 (64) | TESTS | 42 | 15 | 0 | ||
213457134 | DesperadoX | E | July 12, 2023, 6:03 a.m. | OK | GNU C++20 (64) | TESTS | 42 | 15 | 0 | ||
213453628 | yanhy | E | July 12, 2023, 5:09 a.m. | OK | GNU C++20 (64) | TESTS | 42 | 15 | 102400 | ||
213447825 | phoenix0423 | E | July 12, 2023, 3:34 a.m. | OK | GNU C++20 (64) | TESTS | 42 | 15 | 102400 | ||
213445627 | blx | E | July 12, 2023, 3:02 a.m. | OK | GNU C++20 (64) | TESTS | 42 | 15 | 102400 | ||
213427849 | skye_ | E | July 11, 2023, 10:31 p.m. | OK | GNU C++20 (64) | TESTS | 42 | 15 | 102400 | ||
213418628 | Arnab_11 | E | July 11, 2023, 8:09 p.m. | OK | GNU C++20 (64) | TESTS | 42 | 15 | 102400 | ||
213418439 | achvanov | E | July 11, 2023, 8:07 p.m. | OK | GNU C++20 (64) | TESTS | 42 | 15 | 102400 | ||
213453995 | Nero | E | July 12, 2023, 5:14 a.m. | OK | GNU C++20 (64) | TESTS | 42 | 15 | 102400 | ||
213428493 | Vikas_Ahlawat | E | July 11, 2023, 10:45 p.m. | OK | Java 11 | TESTS | 42 | 327 | 22630400 | ||
213412063 | Dukkha | E | July 11, 2023, 6:57 p.m. | OK | Java 17 | TESTS | 42 | 280 | 1024000 | ||
213445975 | cc4414 | E | July 12, 2023, 3:08 a.m. | OK | Java 8 | TESTS | 42 | 124 | 17100800 | ||
213395724 | RMA-NB | E | July 11, 2023, 5:13 p.m. | OK | Java 8 | TESTS | 42 | 155 | 17100800 | ||
213412299 | nanu123 | E | July 11, 2023, 6:58 p.m. | OK | MS C++ 2017 | TESTS | 42 | 31 | 204800 | ||
213395858 | xuhao95 | E | July 11, 2023, 5:14 p.m. | OK | PyPy 3 | TESTS | 42 | 327 | 72806400 | ||
213443223 | SoleProprietor | E | July 12, 2023, 2:34 a.m. | OK | PyPy 3-64 | TESTS | 42 | 92 | 4608000 | ||
213409677 | sr_hossain | E | July 11, 2023, 6:36 p.m. | OK | PyPy 3-64 | TESTS | 42 | 109 | 5324800 | ||
213455292 | Little_Sheep_Yawn | E | July 12, 2023, 5:35 a.m. | OK | PyPy 3-64 | TESTS | 42 | 217 | 13619200 | ||
213400995 | sshs22002 | E | July 11, 2023, 5:31 p.m. | OK | PyPy 3-64 | TESTS | 42 | 233 | 42598400 | ||
213415632 | Stortoise | E | July 11, 2023, 7:34 p.m. | OK | Python 3 | TESTS | 42 | 62 | 1331200 | ||
213449324 | cpchenpi | E | July 12, 2023, 3:56 a.m. | OK | Rust 2021 | TESTS | 42 | 15 | 204800 |
Back to search problems