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
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 . We can show that the 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 to (p cdot q^{-1}) modulo 998244353 . The first line contains two integers n , m ( 2 <= n <= 2 cdot 10^5 , n is ev'... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
100567605 |
hos.lyric |
H1 |
Dec. 6, 2020, 4:25 p.m. |
OK |
D |
TESTS |
47 |
62 |
15155200 |
|
|
100596825 |
tzaph_ |
H1 |
Dec. 7, 2020, 3:13 a.m. |
OK |
GNU C++11 |
TESTS |
47 |
31 |
3174400 |
|
|
100574336 |
gisp_zjz |
H1 |
Dec. 6, 2020, 5 p.m. |
OK |
GNU C++11 |
TESTS |
47 |
62 |
13004800 |
|
|
100574637 |
duality |
H1 |
Dec. 6, 2020, 5:02 p.m. |
OK |
GNU C++11 |
TESTS |
47 |
234 |
16179200 |
|
|
100582776 |
353cerega |
H1 |
Dec. 6, 2020, 6:29 p.m. |
OK |
GNU C++11 |
TESTS |
47 |
530 |
29696000 |
|
|
100567947 |
nhho |
H1 |
Dec. 6, 2020, 4:26 p.m. |
OK |
GNU C++14 |
TESTS |
47 |
46 |
3379200 |
|
|
100571573 |
ugly2333 |
H1 |
Dec. 6, 2020, 4:45 p.m. |
OK |
GNU C++14 |
TESTS |
47 |
46 |
9420800 |
|
|
100569853 |
apiadu |
H1 |
Dec. 6, 2020, 4:36 p.m. |
OK |
GNU C++14 |
TESTS |
47 |
62 |
2150400 |
|
|
100576917 |
Potassium |
H1 |
Dec. 6, 2020, 5:15 p.m. |
OK |
GNU C++14 |
TESTS |
47 |
62 |
16588800 |
|
|
100575504 |
Amoo_Safar |
H1 |
Dec. 6, 2020, 5:07 p.m. |
OK |
GNU C++14 |
TESTS |
47 |
124 |
8601600 |
|
|
100582401 |
torisasami |
H1 |
Dec. 6, 2020, 6:26 p.m. |
OK |
GNU C++14 |
TESTS |
47 |
233 |
38400000 |
|
|
100582564 |
Qing_Yang |
H1 |
Dec. 6, 2020, 6:27 p.m. |
OK |
GNU C++14 |
TESTS |
47 |
343 |
3788800 |
|
|
100578385 |
KAN |
H1 |
Dec. 6, 2020, 5:23 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
46 |
1843200 |
|
|
100576081 |
tlwpdus |
H1 |
Dec. 6, 2020, 5:11 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
46 |
3379200 |
|
|
100571716 |
Fulisike |
H1 |
Dec. 6, 2020, 4:46 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
46 |
3379200 |
|
|
100588895 |
majk |
H1 |
Dec. 6, 2020, 8:39 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
46 |
3788800 |
|
|
100585567 |
AliShahali1382 |
H1 |
Dec. 6, 2020, 7:09 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
46 |
10035200 |
|
|
100580343 |
se1ka2 |
H1 |
Dec. 6, 2020, 5:33 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
62 |
3686400 |
|
|
100567583 |
antontrygubO_o |
H1 |
Dec. 6, 2020, 4:25 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
62 |
8601600 |
|
|
100567527 |
atomicenergy |
H1 |
Dec. 6, 2020, 4:24 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
62 |
22630400 |
|
|
100578506 |
Ant_Man |
H1 |
Dec. 6, 2020, 5:24 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
77 |
18022400 |
|
|
100565954 |
snuke |
H1 |
Dec. 6, 2020, 4:17 p.m. |
OK |
GNU C++17 |
TESTS |
47 |
78 |
6963200 |
|
|
100577874 |
kotatsugame |
H1 |
Dec. 6, 2020, 5:20 p.m. |
OK |
GNU C++17 (64) |
TESTS |
47 |
31 |
2355200 |
|
|
100572685 |
rainboy |
H1 |
Dec. 6, 2020, 4:52 p.m. |
OK |
GNU C++17 (64) |
TESTS |
47 |
31 |
3379200 |
|
|
100579451 |
Nebuchadnezzar |
H1 |
Dec. 6, 2020, 5:29 p.m. |
OK |
GNU C++17 (64) |
TESTS |
47 |
31 |
3584000 |
|
|
100590413 |
izlyforever |
H1 |
Dec. 6, 2020, 9:32 p.m. |
OK |
GNU C++17 (64) |
TESTS |
47 |
31 |
3788800 |
|
|
100577659 |
Roundgod |
H1 |
Dec. 6, 2020, 5:19 p.m. |
OK |
GNU C++17 (64) |
TESTS |
47 |
46 |
2150400 |
|
|
100572594 |
Egor |
H1 |
Dec. 6, 2020, 4:51 p.m. |
OK |
GNU C++17 (64) |
TESTS |
47 |
46 |
2150400 |
|
|
100565890 |
tatyam |
H1 |
Dec. 6, 2020, 4:16 p.m. |
OK |
GNU C++17 (64) |
TESTS |
47 |
46 |
3276800 |
|
|
100576100 |
Eccentricity |
H1 |
Dec. 6, 2020, 5:11 p.m. |
OK |
GNU C++17 (64) |
TESTS |
47 |
46 |
3379200 |
|
|
100593092 |
Marckess |
H1 |
Dec. 7, 2020, 12:06 a.m. |
OK |
GNU C++17 (64) |
TESTS |
47 |
46 |
3686400 |
|
|
100579912 |
Maksim1744 |
H1 |
Dec. 6, 2020, 5:31 p.m. |
OK |
GNU C++17 (64) |
TESTS |
47 |
46 |
4505600 |
|
|
100579363 |
eatmore |
H1 |
Dec. 6, 2020, 5:28 p.m. |
OK |
Java 11 |
TESTS |
47 |
217 |
0 |
|
|
100600639 |
fivefourthreeone |
H1 |
Dec. 7, 2020, 5:06 a.m. |
OK |
Java 11 |
TESTS |
47 |
234 |
5939200 |
|
|
100579170 |
uwi |
H1 |
Dec. 6, 2020, 5:27 p.m. |
OK |
Java 11 |
TESTS |
47 |
249 |
4403200 |
|
|
100575872 |
ngtkana |
H1 |
Dec. 6, 2020, 5:09 p.m. |
OK |
Rust |
TESTS |
47 |
62 |
8192000 |
|
|
remove filters
Back to search problems