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 |
|---|---|---|---|---|---|---|
| 2195 | Codeforces Round 1080 (Div. 3) | FINISHED | False | 9000 | 5238923 | Feb. 15, 2026, 2:45 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 452 ) | H | Codeforces Heuristic Contest 001 | PROGRAMMING | brute force constructive algorithms geometry implementation |
There is a grid of (3n \times 3n) points, consisting of all integer points ((x,y)) such that (1 \le x,y \le 3n). Find a largest set of triangles satisfying the following conditions: Each triangle has its vertices on exactly three points on the grid. Each triangle has an area of exactly (\frac{1}{2}). Note that they do not have to be right triangles. No two triangles share a common intersection point, including their vertices. If there exist multiple largest such sets of triangles, you may output any of them. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 30)). The description of the test cases follows. The only line of each test case contains a single integer (n) ((1 \le n \le 166)). It is guaranteed that the sum of (n^2) over all test cases does not exceed (166^2). Output the maximum size (m) of the set of triangles on one line ((0 \le m \le 3n^2)). Then, output (m) lines in the following format: (x_{i,1}\;y_{i,1}\;x_{i,2}\;y_{i,2}\;x_{i,3}\;y_{i,3}): The vertices of the (i)-th triangle are ((x_{i,1},y_{i,1})), ((x_{i,2},y_{i,2})), ((x_{i,3},y_{i,3})). You may output the vertices of one triangle in any order (clockwise or counterclockwise). Your output will be accepted if it satisfies all conditions and the maximum size given is correct. In the first test case, the example output has (2) triangles as shown in the following image: In the second test case, the example output has (12) triangles as shown in the image on the left: As the triangles are not required to be right triangles, the set of triangles shown in the image on the right will also be considered valid. |
| Codeforces Round 1080 (Div. 3) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 363186130 | Teymur1 | H | Feb. 15, 2026, 5:03 p.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 62 | 819200 | ||
| 363186178 | Dimozavr | H | Feb. 15, 2026, 5:03 p.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 62 | 921600 | ||
| 363229002 | Darko2026 | H | Feb. 16, 2026, 3 a.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 78 | 102400 | ||
| 363193982 | cscsksks | H | Feb. 15, 2026, 5:30 p.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 78 | 102400 | ||
| 363221718 | pandaa73 | H | Feb. 15, 2026, 11:09 p.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 78 | 819200 | ||
| 363201458 | BABEL | H | Feb. 15, 2026, 6:23 p.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 78 | 16076800 | ||
| 363224739 | pupil256 | H | Feb. 16, 2026, 12:56 a.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 93 | 0 | ||
| 363203289 | dirtblock | H | Feb. 15, 2026, 6:39 p.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 93 | 0 | ||
| 363195164 | _criminal | H | Feb. 15, 2026, 5:38 p.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 93 | 819200 | ||
| 363192837 | mikistarlm | H | Feb. 15, 2026, 5:23 p.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 109 | 102400 | ||
| 363190697 | AlRntn | H | Feb. 15, 2026, 5:13 p.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 46 | 0 | ||
| 363197324 | a_foolish_OIer | H | Feb. 15, 2026, 5:52 p.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 46 | 1024000 | ||
| 363190410 | amod_24 | H | Feb. 15, 2026, 5:13 p.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 46 | 7168000 | ||
| 363225083 | EricZzzzz | H | Feb. 16, 2026, 1:07 a.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 62 | 0 | ||
| 363195157 | khoianh | H | Feb. 15, 2026, 5:38 p.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 62 | 0 | ||
| 363186604 | OG_Matveychick1 | H | Feb. 15, 2026, 5:04 p.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 62 | 0 | ||
| 363234136 | UKE2006 | H | Feb. 16, 2026, 4:40 a.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 62 | 102400 | ||
| 363189321 | MagnusCarlsen321 | H | Feb. 15, 2026, 5:10 p.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 62 | 102400 | ||
| 363193737 | Owstin | H | Feb. 15, 2026, 5:29 p.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 62 | 307200 | ||
| 363184096 | LOV34EVER | H | Feb. 15, 2026, 4:58 p.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 62 | 2457600 | ||
| 363226162 | lam09062016 | H | Feb. 16, 2026, 1:44 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 12 | 46 | 0 | ||
| 363205435 | AllFiction | H | Feb. 15, 2026, 7 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 12 | 46 | 0 | ||
| 363190368 | makeit420 | H | Feb. 15, 2026, 5:13 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 12 | 46 | 2457600 | ||
| 363224998 | Ladamalina | H | Feb. 16, 2026, 1:04 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 12 | 62 | 0 | ||
| 363223592 | Gokuu007 | H | Feb. 16, 2026, 12:21 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 12 | 62 | 0 | ||
| 363209456 | YuukiS | H | Feb. 15, 2026, 7:46 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 12 | 62 | 0 | ||
| 363200815 | Modest_Xi | H | Feb. 15, 2026, 6:18 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 12 | 62 | 0 | ||
| 363200242 | El_gge | H | Feb. 15, 2026, 6:14 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 12 | 62 | 0 | ||
| 363198732 | Anemone_ | H | Feb. 15, 2026, 6:02 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 12 | 62 | 0 | ||
| 363197615 | avner.m.lim | H | Feb. 15, 2026, 5:54 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 12 | 62 | 0 | ||
| 363196677 | rachit.gupta | H | Feb. 15, 2026, 5:48 p.m. | OK | Java 21 | TESTS | 12 | 234 | 409600 | ||
| 363196629 | shubhansh_gupta | H | Feb. 15, 2026, 5:47 p.m. | OK | Java 21 | TESTS | 12 | 234 | 409600 | ||
| 363191683 | akane646 | H | Feb. 15, 2026, 5:17 p.m. | OK | PyPy 3-64 | TESTS | 12 | 125 | 25600000 | ||
| 363205181 | Ergodic137 | H | Feb. 15, 2026, 6:57 p.m. | OK | PyPy 3-64 | TESTS | 12 | 140 | 13209600 | ||
| 363235629 | gameon030609 | H | Feb. 16, 2026, 5:01 a.m. | OK | PyPy 3-64 | TESTS | 12 | 156 | 9625600 | ||
| 363184688 | UcUkoyo | H | Feb. 15, 2026, 4:59 p.m. | OK | PyPy 3-64 | TESTS | 12 | 171 | 19353600 | ||
| 363188714 | akane646 | H | Feb. 15, 2026, 5:09 p.m. | OK | PyPy 3-64 | TESTS | 12 | 171 | 25804800 | ||
| 363229873 | Meguhine | H | Feb. 16, 2026, 3:21 a.m. | OK | PyPy 3-64 | TESTS | 12 | 187 | 19251200 | ||
| 363195875 | sigtuna | H | Feb. 15, 2026, 5:43 p.m. | OK | PyPy 3-64 | TESTS | 12 | 203 | 10240000 | ||
| 363198576 | Juk-Skorobei | H | Feb. 15, 2026, 6:01 p.m. | OK | PyPy 3-64 | TESTS | 12 | 203 | 19353600 | ||
| 363198122 | Only365 | H | Feb. 15, 2026, 5:58 p.m. | OK | PyPy 3-64 | TESTS | 12 | 203 | 19353600 | ||
| 363240177 | Msgnh | H | Feb. 16, 2026, 6:05 a.m. | OK | PyPy 3-64 | TESTS | 12 | 218 | 10240000 | ||
| 363202309 | patacca | H | Feb. 15, 2026, 6:30 p.m. | OK | Rust 2024 | TESTS | 12 | 78 | 3072000 |
Back to search problems