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 |
|---|---|---|---|---|---|---|
| 848 | Codeforces Round 431 (Div. 1) | FINISHED | False | 7200 | 272132723 | Sept. 1, 2017, 1:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 242 ) | E | Days of Floral Colours | PROGRAMMING | combinatorics divide and conquer dp fft math | 3400 |
The Floral Clock has been standing by the side of Mirror Lake for years. Though unable to keep time, it reminds people of the passage of time and the good old days. On the rim of the Floral Clock are 2 n flowers, numbered from 1 to 2 n clockwise, each of which has a colour among all n possible ones. For each colour, there are exactly two flowers with it, the distance between which either is less than or equal to 2 , or equals n . Additionally, if flowers u and v are of the same colour, then flowers opposite to u and opposite to v should be of the same colour as well — symmetry is beautiful! Formally, the distance between two flowers is 1 plus the number of flowers on the minor arc (or semicircle) between them. Below is a possible arrangement with n = 6 that cover all possibilities. The beauty of an arrangement is defined to be the product of the lengths of flower segments separated by all opposite flowers of the same colour. In other words, in order to compute the beauty, we remove from the circle all flowers that have the same colour as flowers opposite to them. Then, the beauty is the product of lengths of all remaining segments. Note that we include segments of length 0 in this product. If there are no flowers that have the same colour as flower opposite to them, the beauty equals 0 . For instance, the beauty of the above arrangement equals 1 × 3 × 1 × 3 = 9 — the segments are {2} , {4, 5, 6} , {8} and {10, 11, 12} . While keeping the constraints satisfied, there may be lots of different arrangements. Find out the sum of beauty over all possible arrangements, modulo 998 244 353 . Two arrangements are considered different, if a pair ( u , v ) ( 1 ≤ u , v ≤ 2 n ) exists such that flowers u and v are of the same colour in one of them, but not in the other. The first and only line of input contains a lonely positive integer n ( 3 ≤ n ≤ 50 000 ) — the number of colours present on the Floral Clock. Output one integer — the sum of beauty over all possible arra |
| Codeforces Round #431 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 30195524 | ktlnurdaulet | E | Sept. 8, 2017, 5:45 a.m. | OK | GNU C++ | TESTS | 50 | 654 | 21606400 | 3400 | |
| 31673898 | Doshik | E | Oct. 24, 2017, 8:33 a.m. | OK | GNU C++ | TESTS | 50 | 655 | 23859200 | 3400 | |
| 32092644 | Georgia_001 | E | Nov. 6, 2017, 11:35 a.m. | OK | GNU C++ | TESTS | 50 | 670 | 21606400 | 3400 | |
| 30120205 | FoolMike | E | Sept. 6, 2017, 12:41 a.m. | OK | GNU C++ | TESTS | 50 | 670 | 21606400 | 3400 | |
| 30119871 | FoolMike | E | Sept. 5, 2017, 11:51 p.m. | OK | GNU C++ | TESTS | 50 | 670 | 21606400 | 3400 | |
| 36611180 | LadyLex | E | March 25, 2018, 9:19 a.m. | OK | GNU C++ | TESTS | 50 | 1653 | 16896000 | 3400 | |
| 36610858 | LadyLex | E | March 25, 2018, 9:07 a.m. | OK | GNU C++ | TESTS | 50 | 2167 | 16896000 | 3400 | |
| 36611076 | LadyLex | E | March 25, 2018, 9:16 a.m. | OK | GNU C++ | TESTS | 50 | 2199 | 16896000 | 3400 | |
| 57873443 | lopare | E | July 28, 2019, 3:34 a.m. | OK | GNU C++11 | TESTS | 50 | 31 | 204800 | 3400 | |
| 56785914 | cly_none | E | July 10, 2019, 8:26 a.m. | OK | GNU C++11 | TESTS | 50 | 31 | 204800 | 3400 | |
| 67196727 | lzoiexplorer2004 | E | Dec. 19, 2019, 9:21 a.m. | OK | GNU C++11 | TESTS | 50 | 46 | 204800 | 3400 | |
| 57769183 | py_ultron | E | July 25, 2019, 10:57 p.m. | OK | GNU C++11 | TESTS | 50 | 46 | 204800 | 3400 | |
| 54088231 | jslijin | E | May 14, 2019, 8:49 a.m. | OK | GNU C++11 | TESTS | 50 | 62 | 1024000 | 3400 | |
| 55955266 | luogu_bot5 | E | June 23, 2019, 6:34 a.m. | OK | GNU C++11 | TESTS | 50 | 62 | 6246400 | 3400 | |
| 57166835 | luogu_bot1 | E | July 16, 2019, 11:49 p.m. | OK | GNU C++11 | TESTS | 50 | 77 | 6246400 | 3400 | |
| 50601901 | luogu_bot1 | E | Feb. 28, 2019, 1:04 p.m. | OK | GNU C++11 | TESTS | 50 | 78 | 6246400 | 3400 | |
| 50601893 | shadowice1984 | E | Feb. 28, 2019, 1:04 p.m. | OK | GNU C++11 | TESTS | 50 | 78 | 6246400 | 3400 | |
| 68979955 | Backseat-Stargazer | E | Jan. 17, 2020, 10:19 a.m. | OK | GNU C++11 | TESTS | 50 | 389 | 11366400 | 3400 | |
| 56784865 | XZA | E | July 10, 2019, 7:55 a.m. | OK | GNU C++14 | TESTS | 50 | 30 | 409600 | 3400 | |
| 69511992 | Cyanic | E | Jan. 25, 2020, 10:47 a.m. | OK | GNU C++14 | TESTS | 50 | 31 | 409600 | 3400 | |
| 56784712 | XZA | E | July 10, 2019, 7:51 a.m. | OK | GNU C++14 | TESTS | 50 | 31 | 409600 | 3400 | |
| 49761137 | black_horse2014 | E | Feb. 11, 2019, 9:01 a.m. | OK | GNU C++14 | TESTS | 50 | 46 | 204800 | 3400 | |
| 38265767 | kut_kjb1994 | E | May 15, 2018, 11:29 a.m. | OK | GNU C++14 | TESTS | 50 | 421 | 4198400 | 3400 | |
| 40980026 | ReaLNero1 | E | July 30, 2018, 5:20 p.m. | OK | GNU C++14 | TESTS | 50 | 436 | 819200 | 3400 | |
| 59646050 | Scut82 | E | Aug. 29, 2019, 5:49 a.m. | OK | GNU C++14 | TESTS | 50 | 514 | 6451200 | 3400 | |
| 34734922 | andronos | E | Jan. 31, 2018, 11:14 a.m. | OK | GNU C++14 | TESTS | 50 | 624 | 23552000 | 3400 | |
| 31797717 | mishobaxa1234 | E | Oct. 27, 2017, 1:51 p.m. | OK | GNU C++14 | TESTS | 50 | 655 | 21606400 | 3400 | |
| 31234259 | FizzyDavid | E | Oct. 12, 2017, 7:13 a.m. | OK | GNU C++14 | TESTS | 50 | 1419 | 5734400 | 3400 | |
| 62393555 | hjk1030 | E | Oct. 12, 2019, 4:09 a.m. | OK | GNU C++17 | TESTS | 50 | 1606 | 26316800 | 3400 | |
| 62962700 | gongsuidashen | E | Oct. 20, 2019, 2:10 a.m. | OK | GNU C++17 | TESTS | 50 | 1700 | 51302400 | 3400 | |
| 45972205 | _Happy_New_Year_ | E | Nov. 19, 2018, 4:30 p.m. | OK | GNU C++17 | TESTS | 50 | 1793 | 10752000 | 3400 | |
| 57474291 | Benq | E | July 21, 2019, 8:10 p.m. | OK | GNU C++17 | TESTS | 50 | 2885 | 4096000 | 3400 | |
| 66981423 | justfocusplease | E | Dec. 15, 2019, 4:32 p.m. | OK | GNU C++17 | TESTS | 50 | 3088 | 31027200 | 3400 | |
| 68986273 | Shayan.P | E | Jan. 17, 2020, 12:36 p.m. | OK | GNU C++17 | TESTS | 50 | 3946 | 154419200 | 3400 | |
| 68986139 | Shayan.P | E | Jan. 17, 2020, 12:34 p.m. | OK | GNU C++17 | TESTS | 50 | 3946 | 154419200 | 3400 | |
| 57459347 | mocania | E | July 21, 2019, 12:56 p.m. | OK | GNU C++17 | TESTS | 50 | 5521 | 11264000 | 3400 | |
| 68985657 | Shayan.P | E | Jan. 17, 2020, 12:24 p.m. | OK | GNU C++17 | TESTS | 50 | 6364 | 150220800 | 3400 |
Back to search problems