Codeforces Global Round 12

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
1450 Codeforces Global Round 12 FINISHED False 10800 124557899 Dec. 6, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 219 ) H2 Multithreading (Hard Version) PROGRAMMING combinatorics implementation math

B'The only difference between the two versions of the problem is that there are no updates in the easy version. There are n spools of thread placed on the rim of a circular table. The spools come in two types of thread: the first thread is black and the second thread is white. For any two spools of the same color, you can attach them with a thread of that color in a straight line segment. Define a matching as a way to attach spools together so that each spool is attached to exactly one other spool. Coloring is an assignment of colors (white and black) to the spools. A coloring is called valid if it has at least one matching. That is if the number of black spools and the number of white spools are both even. Given a matching, we can find the number of times some white thread intersects some black thread. We compute the number of pairs of differently colored threads that intersect instead of the number of intersection points, so one intersection point may be counted multiple times if different pairs of threads intersect at the same point. If c is a valid coloring, let f(c) denote the minimum number of such intersections out of all possible matchings. You are given a string s representing an unfinished coloring, with black, white, and uncolored spools. A coloring c is called s -reachable if you can achieve it by assigning colors to the uncolored spools of s without changing the others. A coloring c is chosen uniformly at random among all valid, s -reachable colorings. Compute the expected value of f(c) . You should find it by modulo 998244353 . There will be m updates to change one character of s . After each update, you should again compute the expected value of f(c) . We can show that each answer can be written in the form frac{p}{q} where p and q are relatively prime integers and q not equiv 0 pmod{998244353} . The answer by modulo 998244353 is equal t'...

Tutorials

Codeforces Global Round 12 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
100572613 rainboy H2 Dec. 6, 2020, 4:51 p.m. OK GNU C11 TESTS 97 889 3379200
100582732 gisp_zjz H2 Dec. 6, 2020, 6:28 p.m. OK GNU C++17 TESTS 97 202 21094400
100585573 AliShahali1382 H2 Dec. 6, 2020, 7:10 p.m. OK GNU C++17 TESTS 97 327 10035200
100573639 ksun48 H2 Dec. 6, 2020, 4:57 p.m. OK GNU C++17 TESTS 97 389 8089600
100577202 maroonrk H2 Dec. 6, 2020, 5:16 p.m. OK GNU C++17 TESTS 97 482 64512000
100588258 rainboy H2 Dec. 6, 2020, 8:19 p.m. OK GNU C++17 (64) TESTS 97 140 3379200
100587975 ecnerwala H2 Dec. 6, 2020, 8:11 p.m. OK GNU C++17 (64) TESTS 97 186 4608000
100588224 ecnerwala H2 Dec. 6, 2020, 8:18 p.m. OK GNU C++17 (64) TESTS 97 187 2969600
100571207 Benq H2 Dec. 6, 2020, 4:43 p.m. OK GNU C++17 (64) TESTS 97 280 27750400
100578673 kefaa2 H2 Dec. 6, 2020, 5:24 p.m. OK GNU C++17 (64) TESTS 97 795 77926400
100579825 ecnerwala H2 Dec. 6, 2020, 5:30 p.m. OK GNU C++17 (64) TESTS 97 841 5529600
100591731 Monogon H2 Dec. 6, 2020, 10:36 p.m. OK GNU C++17 (64) TESTS 97 1076 6963200
100571395 Um_nik H2 Dec. 6, 2020, 4:45 p.m. OK GNU C++17 (64) TESTS 97 1808 31641600
100577587 yosupo H2 Dec. 6, 2020, 5:19 p.m. OK GNU C++17 (64) TESTS 97 2168 243507200
100600657 fivefourthreeone H2 Dec. 7, 2020, 5:06 a.m. OK Java 11 TESTS 97 2979 6041600

remove filters

Back to search problems