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 |
---|---|---|---|---|---|---|
1775 | Codeforces Round 843 (Div. 2) | FINISHED | False | 9000 | 58473899 | Jan. 10, 2023, 11:15 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 769 ) | F | Laboratory on Pluto | PROGRAMMING | brute force combinatorics dp fft greedy math |
B"As you know, Martian scientists are actively engaged in space research. One of the highest priorities is Pluto. In order to study this planet in more detail, it was decided to build a laboratory on Pluto. It is known that the lab will be built of n square blocks of equal size. For convenience, we will assume that Pluto's surface is a plane divided by vertical and horizontal lines into unit squares. Each square is either occupied by a lab block or not, and only n squares are occupied. Since each block is square, it has four walls. If a wall is adjacent to another block, it is considered inside, otherwise -- outside. Pluto is famous for its extremely cold temperatures, so the outside walls of the lab must be insulated. One unit of insulation per exterior wall would be required. Thus, the greater the total length of the outside walls of the lab (i. e., its perimeter), the more insulation will be needed. Consider the lab layout in the figure below. It shows that the lab consists of n = 33 blocks, and all the blocks have a total of 24 outside walls, i. e. 24 units of insulation will be needed. You should build the lab optimally, i. e., minimize the amount of insulation. On the other hand, there may be many optimal options, so scientists may be interested in the number of ways to build the lab using the minimum amount of insulation, modulo a prime number m . Two ways are considered the same if they are the same when overlapping without turning. Thus, if a lab plan is rotated by 90^{ circ} , such a new plan can be considered a separate way. To help scientists explore Pluto, you need to write a program that solves these difficult problems. The first line contains two integers t and u ( 1 <= t <= 2 cdot 10^5 , 1 <= u <= 2 ) -- the number of test cases and the test type. If u=1 , you need to find any way to build the lab in an optimal way, and if u=2 , you need to calculate the number "... |
Codeforces Round #843 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
188808432 | davis_kb | F | Jan. 10, 2023, 8:22 p.m. | OK | GNU C++14 | TESTS | 27 | 155 | 0 | ||
188824897 | YeahPotato | F | Jan. 11, 2023, 3:05 a.m. | OK | GNU C++14 | TESTS | 27 | 155 | 7168000 | ||
188821468 | 08kevin-02 | F | Jan. 11, 2023, 2:03 a.m. | OK | GNU C++14 | TESTS | 27 | 156 | 12800000 | ||
188817543 | Kaedehara_Kazuha_ | F | Jan. 11, 2023, 12:20 a.m. | OK | GNU C++14 | TESTS | 27 | 187 | 3993600 | ||
188824841 | free_fantasy | F | Jan. 11, 2023, 3:04 a.m. | OK | GNU C++14 | TESTS | 27 | 249 | 5836800 | ||
188833784 | Davidshx | F | Jan. 11, 2023, 5:20 a.m. | OK | GNU C++14 | TESTS | 27 | 265 | 3174400 | ||
188824193 | Exusiai_ | F | Jan. 11, 2023, 2:53 a.m. | OK | GNU C++14 | TESTS | 27 | 265 | 8192000 | ||
188829061 | zzyorz | F | Jan. 11, 2023, 4:12 a.m. | OK | GNU C++14 | TESTS | 27 | 296 | 3174400 | ||
188823732 | zrz-0520 | F | Jan. 11, 2023, 2:44 a.m. | OK | GNU C++14 | TESTS | 27 | 374 | 32358400 | ||
188770328 | Min_25 | F | Jan. 10, 2023, 2:57 p.m. | OK | GNU C++14 | TESTS | 27 | 421 | 1945600 | ||
188802199 | ttamx | F | Jan. 10, 2023, 6:56 p.m. | OK | GNU C++17 | TESTS | 27 | 155 | 0 | ||
188830998 | NiroBC | F | Jan. 11, 2023, 4:42 a.m. | OK | GNU C++17 | TESTS | 27 | 171 | 0 | ||
188821150 | BROKEN_BIRD | F | Jan. 11, 2023, 1:57 a.m. | OK | GNU C++17 | TESTS | 27 | 186 | 11264000 | ||
188780053 | tick | F | Jan. 10, 2023, 3:57 p.m. | OK | GNU C++17 | TESTS | 27 | 187 | 0 | ||
188772334 | Obama2 | F | Jan. 10, 2023, 3:07 p.m. | OK | GNU C++17 | TESTS | 27 | 342 | 16384000 | ||
188836916 | limbo16 | F | Jan. 11, 2023, 5:57 a.m. | OK | GNU C++17 | TESTS | 27 | 342 | 65024000 | ||
188771356 | yuan_mz | F | Jan. 10, 2023, 3:02 p.m. | OK | GNU C++17 | TESTS | 27 | 343 | 9625600 | ||
188781863 | kukul | F | Jan. 10, 2023, 4:10 p.m. | OK | GNU C++17 | TESTS | 27 | 623 | 9216000 | ||
188779940 | TeasingMaster | F | Jan. 10, 2023, 3:57 p.m. | OK | GNU C++17 | TESTS | 27 | 1154 | 229171200 | ||
188799940 | DeThanh | F | Jan. 10, 2023, 6:32 p.m. | OK | GNU C++17 | TESTS | 27 | 1357 | 50278400 | ||
188786838 | Nostalgically | F | Jan. 10, 2023, 4:46 p.m. | OK | GNU C++17 (64) | TESTS | 27 | 92 | 4710400 | ||
188822848 | Illusory_dimes | F | Jan. 11, 2023, 2:29 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 108 | 0 | ||
188806487 | Origenes | F | Jan. 10, 2023, 7:50 p.m. | OK | GNU C++17 (64) | TESTS | 27 | 108 | 0 | ||
188826517 | wanghai673 | F | Jan. 11, 2023, 3:32 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 124 | 0 | ||
188822774 | Minus_Stardust | F | Jan. 11, 2023, 2:28 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 124 | 0 | ||
188835135 | ciuim | F | Jan. 11, 2023, 5:37 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 187 | 0 | ||
188835040 | ciuim | F | Jan. 11, 2023, 5:36 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 187 | 0 | ||
188834337 | PEKKA_l | F | Jan. 11, 2023, 5:27 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 202 | 3276800 | ||
188772120 | clear_wind | F | Jan. 10, 2023, 3:06 p.m. | OK | GNU C++17 (64) | TESTS | 27 | 249 | 1638400 | ||
188831740 | gqf123 | F | Jan. 11, 2023, 4:53 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 280 | 3788800 | ||
188829422 | Ivan_len | F | Jan. 11, 2023, 4:17 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 93 | 0 | ||
188829242 | OutsiderZz | F | Jan. 11, 2023, 4:15 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 108 | 0 | ||
188826968 | tarjen | F | Jan. 11, 2023, 3:39 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 108 | 614400 | ||
188791853 | ytkn | F | Jan. 10, 2023, 5:26 p.m. | OK | GNU C++20 (64) | TESTS | 27 | 108 | 4505600 | ||
188830669 | K-423 | F | Jan. 11, 2023, 4:37 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 124 | 0 | ||
188817509 | Licykoc | F | Jan. 11, 2023, 12:20 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 124 | 2252800 | ||
188824614 | K-423 | F | Jan. 11, 2023, 3:01 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 124 | 4403200 | ||
188827915 | do_while_true | F | Jan. 11, 2023, 3:53 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 124 | 4812800 | ||
188775603 | gongkoufadongji | F | Jan. 10, 2023, 3:27 p.m. | OK | GNU C++20 (64) | TESTS | 27 | 124 | 16076800 | ||
188817668 | Licykoc | F | Jan. 11, 2023, 12:24 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 139 | 2252800 | ||
188823557 | dzhi | F | Jan. 11, 2023, 2:41 a.m. | OK | Java 11 | TESTS | 27 | 405 | 2560000 | ||
188790479 | arvindf232 | F | Jan. 10, 2023, 5:14 p.m. | OK | Kotlin 1.6 | TESTS | 27 | 1528 | 1024000 | ||
188790579 | arvindf232 | F | Jan. 10, 2023, 5:15 p.m. | OK | Kotlin 1.7 | TESTS | 27 | 1403 | 26316800 | ||
188807013 | USYDLDH | F | Jan. 10, 2023, 7:58 p.m. | OK | PyPy 3-64 | TESTS | 27 | 248 | 14438400 |
Back to search problems