Codeforces Global Round 27

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
2035 Codeforces Global Round 27 FINISHED False 10800 46365923 Oct. 27, 2024, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 110 ) G2 Go Learn! (Hard Version) PROGRAMMING divide and conquer dp

The differences between the easy and hard versions are the constraints on (n) and the sum of (n). In this version, (n \leq 3\cdot 10^5) and the sum of (n) does not exceed (10^6). You can only make hacks if both versions are solved. Well, well, well, let's see how Bessie is managing her finances. She seems to be in the trenches! Fortunately, she is applying for a job at Moogle to resolve this issue. Moogle interviews require intensive knowledge of obscure algorithms and complex data structures, but Bessie received a tip-off from an LGM on exactly what she has to go learn. Bessie wrote the following code to binary search for a certain element (k) in a possibly unsorted array (a_1, a_2,\ldots,a_n) with (n) elements. Bessie submitted her code to Farmer John's problem with (m) ((1 \leq m \leq n)) tests. The (i)-th test is of the form ((x_i, k_i)) ((1 \leq x, k \leq n)). It is guaranteed all the (x_i) are distinct and all the (k_i) are distinct. Test (i) is correct if the following hold: The (x_i)-th element in the array is (k_i). If Bessie calls the binary search as shown in the above code for (k_i), it will return (x_i). It might not be possible for all (m) tests to be correct on the same array, so Farmer John will remove some of them so Bessie can AC. Let (r) be the minimum of tests removed so that there exists an array (a_1, a_2,\ldots,a_n) with (1 \leq a_i \leq n) so that all remaining tests are correct. In addition to finding (r), Farmer John wants you to count the number of arrays (a_1, a_2,\ldots,a_n) with (1 \leq a_i \leq n) such that there exists a way to remove exactly (r) tests so that all the remaining tests are correct. Since this number may be very large, please find it modulo (998\,244\,353). The first line contains a single integer (t) ((1 \le t \le 10^4)) — the number of test cases. The first line of each test case c

Tutorials

Codeforces Global Round 27 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
288408663 Ion_Gravirei G2 Oct. 28, 2024, 1:55 a.m. OK C++17 (GCC 7-32) TESTS 35 1842 50483200
288405645 275307894a G2 Oct. 28, 2024, 12:38 a.m. OK C++17 (GCC 7-32) TESTS 35 1842 50483200
288423477 mduc209 G2 Oct. 28, 2024, 5:50 a.m. OK C++17 (GCC 7-32) TESTS 35 3203 7987200
288376965 hos.lyric G2 Oct. 27, 2024, 6:03 p.m. OK C++17 (GCC 7-32) TESTS 35 4452 118374400
288403793 Ormlis G2 Oct. 27, 2024, 11:36 p.m. OK C++20 (GCC 13-64) TESTS 35 952 10240000
288403707 Ormlis G2 Oct. 27, 2024, 11:33 p.m. OK C++20 (GCC 13-64) TESTS 35 1234 34713600
288405618 275307894a G2 Oct. 28, 2024, 12:37 a.m. OK C++20 (GCC 13-64) TESTS 35 1687 52633600
288367442 275307894a G2 Oct. 27, 2024, 5:18 p.m. OK C++20 (GCC 13-64) TESTS 35 1765 69632000
288360519 taeyeon_ss G2 Oct. 27, 2024, 4:58 p.m. OK C++20 (GCC 13-64) TESTS 35 1781 25190400
288397293 Ormlis G2 Oct. 27, 2024, 9:10 p.m. OK C++20 (GCC 13-64) TESTS 35 1937 13414400
288378827 LJC00118 G2 Oct. 27, 2024, 6:12 p.m. OK C++20 (GCC 13-64) TESTS 35 2093 48128000
288401668 Ormlis G2 Oct. 27, 2024, 10:36 p.m. OK C++20 (GCC 13-64) TESTS 35 2108 8499200
288409981 qiuzx G2 Oct. 28, 2024, 2:22 a.m. OK C++20 (GCC 13-64) TESTS 35 2343 45772800
288397685 Hori G2 Oct. 27, 2024, 9:16 p.m. OK C++20 (GCC 13-64) TESTS 35 2718 16896000
288417565 Hamster_L G2 Oct. 28, 2024, 4:32 a.m. OK C++23 (GCC 14-64, msys2) TESTS 35 1234 42393600
288405659 275307894a G2 Oct. 28, 2024, 12:38 a.m. OK C++23 (GCC 14-64, msys2) TESTS 35 1655 52736000
288369748 jiangly G2 Oct. 27, 2024, 5:24 p.m. OK C++23 (GCC 14-64, msys2) TESTS 35 2077 85094400
288368607 JoesSR G2 Oct. 27, 2024, 5:21 p.m. OK C++23 (GCC 14-64, msys2) TESTS 35 2249 28876800
288381051 maroonrk G2 Oct. 27, 2024, 6:28 p.m. OK C++23 (GCC 14-64, msys2) TESTS 35 3124 203366400
288421242 _MASSIMO_ G2 Oct. 28, 2024, 5:23 a.m. OK C++23 (GCC 14-64, msys2) TESTS 35 4515 212992000
288379458 ecnerwala G2 Oct. 27, 2024, 6:16 p.m. OK C++23 (GCC 14-64, msys2) TESTS 35 4577 264806400
288400346 rainboy G2 Oct. 27, 2024, 10:05 p.m. OK GNU C11 TESTS 35 890 28876800

remove filters

Back to search problems