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 |
|---|---|---|---|---|---|---|
| 2239 | Codeforces Round 1105 (Div. 1) | FINISHED | False | 9000 | 4893914 | June 27, 2026, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 221 ) | F | Colorful Works | PROGRAMMING | dp fft games implementation |
Gold14526 is a painter. He can paint with (n) colors, numbered (1, 2, \ldots, n). Color (i) has a constraint interval (l_i, r_i). A work is defined as a rooted tree (T=(V,E)) where every edge is colored (with one of the (n) colors). A work is called colorful if the following conditions are satisfied: For any three nodes (u, v, w \in V), if edges ((u,v)) and ((v,w)) both exist, they must have different colors. For all colors (i \in 1,n), let (d(u,i)) denote the number of edges of color (i) on the simple path from node (u) to the root. Then (\max_{u \in V} d(u,i) \in l_i, r_i). Two works (T=(V,E)) and (T'=(V',E')) are defined as isomorphic if and only if the following two conditions are met: (\lvert V\rvert = \lvert V'\rvert); There exists a bijection (f:V \to V') such that: Let (r) be the root of (T) and (r') be the root of (T'). Then (f(r) = r'); For any ((u,v) \in E), we have that ((f(u),f(v)) \in E'), and the color of edge ((u,v)) is the same as the color of edge ((f(u),f(v))). Let (r) be the root of (T) and (r') be the root of (T'). Then (f(r) = r'); For any ((u,v) \in E), we have that ((f(u),f(v)) \in E'), and the color of edge ((u,v)) is the same as the color of edge ((f(u),f(v))). Gold14526 wants to know the maximum number of colorful works he can choose such that the works are pairwise non-isomorphic. Output the answer modulo (\bf2). 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 an integer (n) ((1\le n\le 2\cdot 10^6)) — denoting the number of colors. The following (n) lines each contain two integers, the (i) -th of them (l_i) and (r_i) ((0\le l_i\le r_i\le 2\cdot 10^5), (r_i\ge 1)) — denoting the constraint |
| Codeforces Round 1105 (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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 380380382 | hos.lyric | F | June 27, 2026, 6:54 p.m. | OK | C++17 (GCC 7-32) | TESTS | 60 | 4406 | 15462400 | ||
| 380374203 | szsyhh | F | June 27, 2026, 5:42 p.m. | OK | C++20 (GCC 13-64) | TESTS | 60 | 906 | 15872000 | ||
| 380409715 | saee0103 | F | June 28, 2026, 3:25 a.m. | OK | C++20 (GCC 13-64) | TESTS | 60 | 2000 | 16896000 | ||
| 380409441 | Milkcat2009 | F | June 28, 2026, 3:19 a.m. | OK | C++20 (GCC 13-64) | TESTS | 60 | 2000 | 16896000 | ||
| 380373972 | Tuli2024 | F | June 27, 2026, 5:39 p.m. | OK | C++20 (GCC 13-64) | TESTS | 60 | 4000 | 18739200 | ||
| 380411571 | LLI_E_P_JI_O_K | F | June 28, 2026, 4:06 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 437 | 14336000 | ||
| 380403764 | mdhasanraza | F | June 28, 2026, 12:29 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 1062 | 15462400 | ||
| 380411484 | AdamAlt | F | June 28, 2026, 4:04 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 1421 | 16076800 | ||
| 380417636 | the_main_question_is_why | F | June 28, 2026, 5:58 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 1703 | 20377600 | ||
| 380377962 | hawk.chan | F | June 27, 2026, 6:22 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 2015 | 29593600 | ||
| 380372148 | 9h26.animeshpandey | F | June 27, 2026, 5:20 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 2093 | 18022400 | ||
| 380398104 | StevenKnight | F | June 27, 2026, 10:07 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 2390 | 12390400 | ||
| 380368748 | jiangly | F | June 27, 2026, 4:54 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 3953 | 147968000 | ||
| 380406792 | Endagorion | F | June 28, 2026, 2:13 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 4578 | 22732800 | ||
| 380364789 | Kevin114514 | F | June 27, 2026, 4:34 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 4781 | 18841600 | ||
| 380402966 | d11maan | F | June 27, 2026, 11:51 p.m. | OK | Go | TESTS | 60 | 3015 | 90214400 |
Back to search problems