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 |
|---|---|---|---|---|---|---|
| 2030 | Codeforces Round 979 (Div. 2) | FINISHED | False | 8100 | 47058923 | Oct. 19, 2024, 2:05 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 197 ) | G2 | The Destruction of the Universe (Hard Version) | PROGRAMMING | math |
This is the hard version of the problem. In this version, (n \leq 10^6). You can only make hacks if both versions of the problem are solved. Orangutans are powerful beings—so powerful that they only need (1) unit of time to destroy every vulnerable planet in the universe! There are (n) planets in the universe. Each planet has an interval of vulnerability (l, r), during which it will be exposed to destruction by orangutans. Orangutans can also expand the interval of vulnerability of any planet by (1) unit. Specifically, suppose the expansion is performed on planet (p) with interval of vulnerability (l_p, r_p). Then, the resulting interval of vulnerability may be either (l_p - 1, r_p) or (l_p, r_p + 1). Given a set of planets, orangutans can destroy all planets if the intervals of vulnerability of all planets in the set intersect at least one common point. Let the score of such a set denote the minimum number of expansions that must be performed. Orangutans are interested in the sum of scores of all non-empty subsets of the planets in the universe. As the answer can be large, output it modulo (998\,244\,353). The first line contains an integer (t) ((1 \leq t \leq 10^4)) — the number of test cases. The first line of each test case contains an integer (n) ((1 \leq n \leq 10^6)) — the number of planets in the universe. The following (n) lines contain two integers (l_i) and (r_i) ((1 \leq l_i \leq r_i \leq n)) — the initial interval of vulnerability of the (i)-th planet. It is guaranteed that the sum of (n) does not exceed (10^6) over all test cases. For each test case, output an integer — the sum of scores to destroy all non-empty subsets of the planets in the universe, modulo (998\,244\,353). In the first testcase, there are seven non-empty subsets of planets we must consider: For each of the subsets (\{1,1\}, \{2,3\}, \{3,3\}), the score is (0). For t |
| Codeforces Round 979 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 286826569 | Sparkle_Twilight | G2 | Oct. 19, 2024, 5:29 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 1921 | 128307200 | ||
| 286823851 | mduc209 | G2 | Oct. 19, 2024, 5:13 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 2046 | 128307200 | ||
| 286839621 | artemi__sav | G2 | Oct. 19, 2024, 7:08 p.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 2499 | 124620800 | ||
| 286856787 | forelax | G2 | Oct. 20, 2024, 12:02 a.m. | OK | C++17 (GCC 7-32) | TESTS | 28 | 2608 | 119193600 | ||
| 286866115 | LNian | G2 | Oct. 20, 2024, 3:35 a.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 499 | 35942400 | ||
| 286850332 | nifeshe | G2 | Oct. 19, 2024, 9:22 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 749 | 56320000 | ||
| 286822622 | StarSilk | G2 | Oct. 19, 2024, 5:08 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 952 | 208486400 | ||
| 286840280 | vtb | G2 | Oct. 19, 2024, 7:15 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 1515 | 48947200 | ||
| 286877374 | 2200030476 | G2 | Oct. 20, 2024, 5:44 a.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 1655 | 128307200 | ||
| 286832971 | sudhir_335 | G2 | Oct. 19, 2024, 6:12 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 1655 | 128307200 | ||
| 286832210 | Tier_3_failure | G2 | Oct. 19, 2024, 6:06 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 1655 | 128307200 | ||
| 286840134 | vtb | G2 | Oct. 19, 2024, 7:14 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 1858 | 49152000 | ||
| 286839843 | vtb | G2 | Oct. 19, 2024, 7:11 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 1999 | 45158400 | ||
| 286812366 | TKT_YI | G2 | Oct. 19, 2024, 4:06 p.m. | OK | C++20 (GCC 13-64) | TESTS | 28 | 2202 | 160256000 | ||
| 286844309 | orztanangkad | G2 | Oct. 19, 2024, 8 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 578 | 24064000 | ||
| 286844644 | orztanangkad | G2 | Oct. 19, 2024, 8:04 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 874 | 20480000 | ||
| 286834045 | Now_Sashak | G2 | Oct. 19, 2024, 6:20 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 1531 | 128307200 | ||
| 286840622 | awesomeguy856 | G2 | Oct. 19, 2024, 7:18 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 1577 | 100454400 | ||
| 286872305 | 415411 | G2 | Oct. 20, 2024, 4:56 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 2452 | 68198400 | ||
| 286872408 | 415411 | G2 | Oct. 20, 2024, 4:57 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 2468 | 68198400 | ||
| 286871744 | 415411 | G2 | Oct. 20, 2024, 4:49 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 2796 | 68198400 | ||
| 286824383 | satyam343 | G2 | Oct. 19, 2024, 5:16 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 28 | 3015 | 266137600 |
Back to search problems