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 |
---|---|---|---|---|---|---|
1627 | Codeforces Round 766 (Div. 2) | FINISHED | False | 7200 | 95009063 | Jan. 15, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 603 ) | F | Not Splitting | PROGRAMMING | geometry graphs implementation shortest paths |
B'There is a k x k grid, where k is even. The square in row r and column c is denoted by (r,c) . Two squares (r_1, c_1) and (r_2, c_2) are considered adjacent if lvert r_1 - r_2 rvert + lvert c_1 - c_2 rvert = 1 . An array of adjacent pairs of squares is called strong if it is possible to cut the grid along grid lines into two connected, congruent pieces so that each pair is part of the same piece. Two pieces are congruent if one can be matched with the other by translation, rotation, and reflection, or a combination of these. You are given an array a of n pairs of adjacent squares. Find the size of the largest strong subsequence of a . An array p is a subsequence of an array q if p can be obtained from q by deletion of several (possibly, zero or all) elements. The input consists of multiple test cases. The first line contains an integer t ( 1 <= q t <= q 100 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains two space-separated integers n and k ( 1 <= q n <= q 10^5 ; 2 <= q k <= q 500 , k is even) -- the length of a and the size of the grid, respectively. Then n lines follow. The i -th of these lines contains four space-separated integers r_{i,1} , c_{i,1} , r_{i,2} , and c_{i,2} ( 1 <= q r_{i,1}, c_{i,1}, r_{i,2}, c_{i,2} <= q k ) -- the i -th element of a , represented by the row and column of the first square (r_{i,1}, c_{i,1}) and the row and column of the second square (r_{i,2}, c_{i,2}) . These squares are adjacent. It is guaranteed that the sum of n over all test cases does not exceed 10^5 , and the sum of k over all test cases does not exceed 500 . For each test case, output a single integer -- the size of the largest strong subsequence of a . In the first test '... |
Codeforces Round #766 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
142884426 | KrK | F | Jan. 15, 2022, 5:16 p.m. | OK | GNU C++14 | TESTS | 42 | 78 | 3891200 | ||
142910293 | CharlesWuQiushi | F | Jan. 16, 2022, 3:48 a.m. | OK | GNU C++14 | TESTS | 42 | 93 | 7577600 | ||
142908455 | 1443356159 | F | Jan. 16, 2022, 3:01 a.m. | OK | GNU C++14 | TESTS | 42 | 109 | 33996800 | ||
142908235 | vjudge5 | F | Jan. 16, 2022, 2:54 a.m. | OK | GNU C++14 | TESTS | 42 | 139 | 7577600 | ||
142896827 | VegTea | F | Jan. 15, 2022, 7:58 p.m. | OK | GNU C++14 | TESTS | 42 | 140 | 5427200 | ||
142910781 | BEAR0131 | F | Jan. 16, 2022, 3:59 a.m. | OK | GNU C++14 | TESTS | 42 | 155 | 8601600 | ||
142907661 | L7-56 | F | Jan. 16, 2022, 2:38 a.m. | OK | GNU C++14 | TESTS | 42 | 156 | 7577600 | ||
142908163 | Potassium | F | Jan. 16, 2022, 2:52 a.m. | OK | GNU C++14 | TESTS | 42 | 156 | 13107200 | ||
142908256 | vjudge3 | F | Jan. 16, 2022, 2:55 a.m. | OK | GNU C++14 | TESTS | 42 | 171 | 14950400 | ||
142906940 | WHC-MIK-7521X | F | Jan. 16, 2022, 2:16 a.m. | OK | GNU C++14 | TESTS | 42 | 171 | 14950400 |
Back to search problems