Codeforces Round 996 (Div. 2)

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
2055 Codeforces Round 996 (Div. 2) FINISHED False 7200 39713123 Jan. 12, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 89 ) F Cosmic Divide PROGRAMMING brute force geometry hashing math strings

A polyomino is a connected(^{\text{∗}}) figure constructed by joining one or more equal (1 \times 1) unit squares edge to edge. A polyomino is convex if, for any two squares in the polyomino that share the same row or the same column, all squares between them are also part of the polyomino. Below are four polyominoes, only the first and second of which are convex. You are given a convex polyomino with (n) rows and an even area. For each row (i) from (1) to (n), the unit squares from column (l_i) to column (r_i) are part of the polyomino. In other words, there are (r_i - l_i + 1) unit squares that are part of the polyomino in the (i)-th row: ((i, l_i), (i, l_i + 1), \ldots, (i, r_i-1), (i, r_i)). Two polyominoes are congruent if and only if you can make them fit exactly on top of each other by translating the polyominoes. Note that you are not allowed to rotate or reflect the polyominoes. Determine whether it is possible to partition the given convex polyomino into two disjoint connected polyominoes that are congruent to each other. The following examples illustrate a valid partition of each of the two convex polyominoes shown above: The partitioned polyominoes do not need to be convex, and each unit square should belong to exactly one of the two partitioned polyominoes. (^{\text{∗}})A polyomino is connected if and only if for every two unit squares (u \neq v) that are part of the polyomino, there exists a sequence of distinct squares (s_1, s_2, \ldots, s_k), such that (s_1 = u), (s_k = v), (s_i) are all part of the polyomino, and (s_i, s_{i+1}) share an edge for each (1 \le i \le k - 1). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The first line of each test case contains a single integer (n) ((1\le n\le 2\cdot 10^5)) — the number of rows of the polyomin

Tutorials

Codeforces Round 996 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
300775767 rainboy F Jan. 13, 2025, 1:21 a.m. OK C++17 (GCC 7-32) TESTS 82 125 7270400
300775762 rainboy F Jan. 13, 2025, 1:21 a.m. OK C++20 (GCC 13-64) TESTS 82 156 7270400
300773197 defnotmee F Jan. 12, 2025, 11:44 p.m. OK C++20 (GCC 13-64) TESTS 82 203 8396800
300739400 244mhq F Jan. 12, 2025, 4:19 p.m. OK C++20 (GCC 13-64) TESTS 81 640 28876800
300763108 A_G F Jan. 12, 2025, 7:37 p.m. OK C++20 (GCC 13-64) TESTS 81 1749 1126400
300759762 Rubikun F Jan. 12, 2025, 6:56 p.m. OK C++20 (GCC 13-64) TESTS 81 2843 30310400
300773275 defnotmee F Jan. 12, 2025, 11:47 p.m. OK C++23 (GCC 14-64, msys2) TESTS 82 218 8499200
300775742 rainboy F Jan. 13, 2025, 1:20 a.m. OK C++23 (GCC 14-64, msys2) TESTS 82 312 7270400
300783948 Normalizerr F Jan. 13, 2025, 4:01 a.m. OK C++23 (GCC 14-64, msys2) TESTS 82 452 5324800
300783517 Normalizerr F Jan. 13, 2025, 3:55 a.m. OK C++23 (GCC 14-64, msys2) TESTS 82 452 5324800
300739991 Forested F Jan. 12, 2025, 4:20 p.m. OK C++23 (GCC 14-64, msys2) TESTS 81 452 5324800
300775699 rainboy F Jan. 13, 2025, 1:19 a.m. OK GNU C11 TESTS 82 171 7372800
300753933 rainboy F Jan. 12, 2025, 6 p.m. OK GNU C11 TESTS 81 171 7372800
300766600 Dukkha F Jan. 12, 2025, 8:32 p.m. OK Java 21 TESTS 82 281 1024000
300774500 404-BrainNotFound F Jan. 13, 2025, 12:40 a.m. OK Java 21 TESTS 82 343 1433600
300766214 Dukkha F Jan. 12, 2025, 8:25 p.m. OK Java 21 TESTS 82 405 20787200

remove filters

Back to search problems