Codeforces Round 940 (Div. 2) and CodeCraft-23

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
1957 Codeforces Round 940 (Div. 2) and CodeCraft-23 FINISHED False 8100 23469863 April 21, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10045 ) C How Does the Rook Move? PROGRAMMING combinatorics dp math 1600

B"You are given an n x n chessboard where you and the computer take turns alternatingly to place white rooks & black rooks on the board respectively. While placing rooks, you have to ensure that no two rooks attack each other. Two rooks attack each other if they share the same row or column regardless of color. A valid move is placing a rook on a position ( r , c ) such that it doesn't attack any other rook. You start first, and when you make a valid move in your turn, placing a white rook at position ( r , c ), the computer will mirror you and place a black rook at position ( c , r ) in its turn. If r = c , then the computer can't mirror your move, and skips its turn. You have already played k moves with the computer (the computer tries to mirror these moves too), and you must continue playing the game until there are no valid moves remaining. How many different final configurations are possible when you continue the game after the k moves? It is guaranteed that the k moves and the implied computer moves are valid. Since the answer may be large, print it modulo 10^9+7 . Two configurations are considered different if there exists a coordinate ( r , c ) which has a rook in one configuration, but not in the other or the color of the rook on the coordinate is different. The first line contains a single integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The first line of each test case contains two integers n and k ( 1 <= q n <= q 3 cdot 10^5 , 0 <= q k <= q n ) -- the size of the chessboard and the number of moves you have already played respectively. Each of the next k lines of the test case contains two integers r_i and c_i , denoting the i -th move you made. It is guaranteed that the k moves and the implied computer moves are valid. It is guaranteed that the sum of n over all test cases does not exceed $$"...

Tutorials

Codeforces Round #940 and CodeCraft-23 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
258547605 x1f0cb32d3_ C April 28, 2024, 10:18 a.m. OK C# 10 TESTS 36 171 5120000 1600
259625711 loop42 C May 5, 2024, 11:34 a.m. OK C# 10 TESTS 36 171 5632000 1600
262487440 mega_bot C May 25, 2024, 9:20 a.m. OK C# 10 TESTS 36 203 5427200 1600
262374336 A1ternate C May 24, 2024, 11:08 a.m. OK C# 10 TESTS 36 577 18944000 1600
259872845 Flvx C May 7, 2024, 12:19 p.m. OK C++14 (GCC 6-32) TESTS 36 140 0 1600
258814245 _s_m_ C April 30, 2024, 5:06 a.m. OK C++14 (GCC 6-32) TESTS 36 140 0 1600
259586706 2004himanshu C May 5, 2024, 5:32 a.m. OK C++14 (GCC 6-32) TESTS 36 140 1228800 1600
258247050 Sdchr C April 26, 2024, 2:25 p.m. OK C++14 (GCC 6-32) TESTS 36 140 1228800 1600
258954170 yyrwlj C May 1, 2024, 2:32 a.m. OK C++14 (GCC 6-32) TESTS 36 140 1536000 1600
260361408 dungprozzz C May 10, 2024, 3:37 p.m. OK C++14 (GCC 6-32) TESTS 36 140 2457600 1600
260359610 dungprozzz C May 10, 2024, 3:35 p.m. OK C++14 (GCC 6-32) TESTS 36 140 2457600 1600
260237329 wangpaopao1 C May 10, 2024, 10:31 a.m. OK C++14 (GCC 6-32) TESTS 36 140 2457600 1600
259505760 Silhouette_L C May 4, 2024, 12:11 p.m. OK C++14 (GCC 6-32) TESTS 36 140 2457600 1600
258625756 hvyotivy C April 29, 2024, 12:19 a.m. OK C++14 (GCC 6-32) TESTS 36 140 2457600 1600
261776381 RadimirK C May 20, 2024, 12:15 p.m. OK C++17 (GCC 7-32) TESTS 36 77 102400 1600
258338791 Isidira C April 27, 2024, 6:52 a.m. OK C++17 (GCC 7-32) TESTS 36 77 6144000 1600
260991647 greydra_k C May 15, 2024, 1:28 a.m. OK C++17 (GCC 7-32) TESTS 36 109 2457600 1600
263158197 robotmetalowy C May 29, 2024, 2:48 p.m. OK C++17 (GCC 7-32) TESTS 36 124 0 1600
258178317 in_the_wilderness C April 26, 2024, 3:15 a.m. OK C++17 (GCC 7-32) TESTS 36 125 204800 1600
258277960 anshu1609 C April 26, 2024, 6:27 p.m. OK C++17 (GCC 7-32) TESTS 36 125 1228800 1600
258262336 bigo007 C April 26, 2024, 4:19 p.m. OK C++17 (GCC 7-32) TESTS 36 125 1228800 1600
258256701 Sujalmanpara C April 26, 2024, 3:36 p.m. OK C++17 (GCC 7-32) TESTS 36 125 1228800 1600
258183723 kitkats_rule C April 26, 2024, 4:45 a.m. OK C++17 (GCC 7-32) TESTS 36 125 1228800 1600
261011789 LSD C May 15, 2024, 6:36 a.m. OK C++17 (GCC 7-32) TESTS 36 139 1126400 1600
261775922 RadimirK C May 20, 2024, 12:12 p.m. OK C++20 (GCC 13-64) TESTS 36 62 102400 1600
259589254 luogu_bot3 C May 5, 2024, 6:04 a.m. OK C++20 (GCC 13-64) TESTS 36 62 1638400 1600
258521233 TokaiZaopen C April 28, 2024, 6:17 a.m. OK C++20 (GCC 13-64) TESTS 36 93 8294400 1600
261793107 Elvich_Bhai C May 20, 2024, 2:23 p.m. OK C++20 (GCC 13-64) TESTS 36 109 0 1600
260776055 Code04Unique C May 13, 2024, 10:07 a.m. OK C++20 (GCC 13-64) TESTS 36 109 0 1600
259815845 manipulatedBit C May 7, 2024, 2:01 a.m. OK C++20 (GCC 13-64) TESTS 36 109 0 1600
259909669 nishant1520 C May 7, 2024, 5:25 p.m. OK C++20 (GCC 13-64) TESTS 36 109 1126400 1600
258646072 __orz__ C April 29, 2024, 6:31 a.m. OK C++20 (GCC 13-64) TESTS 36 109 1228800 1600
258631019 rvs_charan C April 29, 2024, 2:37 a.m. OK C++20 (GCC 13-64) TESTS 36 109 1228800 1600
258530782 shhy_LFB C April 28, 2024, 7:50 a.m. OK C++20 (GCC 13-64) TESTS 36 109 10752000 1600
260839886 anirudh2005 C May 13, 2024, 5:51 p.m. OK GNU C11 TESTS 36 140 2457600 1600
260840157 anirudh2005 C May 13, 2024, 5:53 p.m. OK GNU C11 TESTS 36 171 2560000 1600
260491943 nguyenquocthao00 C May 11, 2024, 6:14 a.m. OK Go TESTS 36 124 8294400 1600
258696238 nguyenquocthao00 C April 29, 2024, 1:27 p.m. OK Go TESTS 36 280 44032000 1600
258342754 d_sqaure C April 27, 2024, 7:26 a.m. OK Go TESTS 36 281 70041600 1600
259542751 stolis C May 4, 2024, 5:41 p.m. OK Java 21 TESTS 36 281 716800 1600
261207954 ramitg254 C May 16, 2024, 2:05 p.m. OK Java 21 TESTS 36 296 1126400 1600
258334626 _mza C April 27, 2024, 6:19 a.m. OK Java 21 TESTS 36 312 47411200 1600
258602510 abusaeed2433 C April 28, 2024, 5:58 p.m. OK Java 21 TESTS 36 327 38809600 1600
260848510 shilov C May 13, 2024, 7:17 p.m. OK Java 21 TESTS 36 390 819200 1600
259951024 Akash_Sardar C May 8, 2024, 5:15 a.m. OK Java 21 TESTS 36 390 921600 1600
259816885 Mahinr10 C May 7, 2024, 2:22 a.m. OK Java 21 TESTS 36 390 1228800 1600
260569719 Burhan_Akkus C May 11, 2024, 5:47 p.m. OK Java 21 TESTS 36 406 6451200 1600
258829962 Anupam720 C April 30, 2024, 8:36 a.m. OK Java 21 TESTS 36 437 921600 1600
258553754 gaju_01 C April 28, 2024, 11:18 a.m. OK Java 21 TESTS 36 437 15974400 1600
261315730 y_a_s C May 17, 2024, 10:49 a.m. OK Java 8 TESTS 36 249 0 1600
259021521 Friendly_ShirleyCCD C May 1, 2024, 2:55 p.m. OK Java 8 TESTS 36 780 0 1600
261294894 HardikG12 C May 17, 2024, 7:47 a.m. OK Java 8 TESTS 36 796 0 1600
260609990 om172 C May 12, 2024, 5:09 a.m. OK Java 8 TESTS 36 796 0 1600
259657382 NavneetKumar123 C May 5, 2024, 4:16 p.m. OK Java 8 TESTS 36 843 0 1600
262133299 ifelsegawd C May 22, 2024, 11:08 a.m. OK Java 8 TESTS 36 906 0 1600
259379836 Safawt C May 3, 2024, 3:22 p.m. OK Java 8 TESTS 36 984 94924800 1600
259118213 aknov711 C May 2, 2024, 12:15 p.m. OK Java 8 TESTS 36 1202 1024000 1600
258290772 sahild2003 C April 26, 2024, 8:55 p.m. OK Node.js TESTS 36 687 95436800 1600
259036704 maximzasorin C May 1, 2024, 4:56 p.m. OK PHP TESTS 36 187 29388800 1600
262969073 nealzane C May 28, 2024, 6:43 a.m. OK PyPy 3 TESTS 36 546 26521600 1600
261920398 CodeArmy C May 20, 2024, 6:03 p.m. OK PyPy 3 TESTS 36 1468 28160000 1600
260564850 mahnameisayush C May 11, 2024, 5:06 p.m. OK PyPy 3 TESTS 36 1483 28569600 1600
260749967 vjudge5 C May 13, 2024, 6:31 a.m. OK PyPy 3 TESTS 36 1531 29184000 1600
258241268 Doris__ C April 26, 2024, 1:40 p.m. OK PyPy 3-64 TESTS 36 171 8089600 1600
262929399 NitroSpear C May 27, 2024, 7:51 p.m. OK PyPy 3-64 TESTS 36 171 8192000 1600
259446589 gardengnome C May 4, 2024, 4:58 a.m. OK PyPy 3-64 TESTS 36 171 8704000 1600
262029344 praneethnellutla C May 21, 2024, 1:58 p.m. OK PyPy 3-64 TESTS 36 186 8704000 1600
259775848 oneman38669 C May 6, 2024, 4:02 p.m. OK PyPy 3-64 TESTS 36 187 7372800 1600
258341778 Prasham C April 27, 2024, 7:18 a.m. OK PyPy 3-64 TESTS 36 187 7372800 1600
262029062 praneethnellutla C May 21, 2024, 1:57 p.m. OK PyPy 3-64 TESTS 36 187 7680000 1600
258668856 accelerate_nju C April 29, 2024, 10:34 a.m. OK PyPy 3-64 TESTS 36 203 8806400 1600
261991538 S-DPR C May 21, 2024, 9:36 a.m. OK PyPy 3-64 TESTS 36 218 8704000 1600
263136060 acorn11 C May 29, 2024, 11:53 a.m. OK PyPy 3-64 TESTS 36 218 9420800 1600
258303570 sherbetlemons C April 27, 2024, 1:59 a.m. OK Python 3 TESTS 36 343 15155200 1600
259035168 2200033007_KLU C May 1, 2024, 4:40 p.m. OK Python 3 TESTS 36 484 15564800 1600
258193316 kitkats_rule C April 26, 2024, 6:48 a.m. OK Python 3 TESTS 36 500 11571200 1600
261451985 krism C May 18, 2024, 3:27 a.m. OK Python 3 TESTS 36 531 13824000 1600
262854663 klu-2100030642 C May 27, 2024, 9:05 a.m. OK Python 3 TESTS 36 561 15564800 1600
260002209 timiss C May 8, 2024, 1 p.m. OK Python 3 TESTS 36 561 15564800 1600
259974972 Gegedosh MakShon kapopenko C May 8, 2024, 9:09 a.m. OK Python 3 TESTS 36 561 15564800 1600
263416969 hx199411 C May 31, 2024, 5:49 a.m. OK Python 3 TESTS 36 577 12697600 1600
259352945 sky_raider C May 3, 2024, 12:07 p.m. OK Python 3 TESTS 36 608 15564800 1600
260164837 2210030287 C May 9, 2024, 6:24 p.m. OK Python 3 TESTS 36 608 16179200 1600
260800598 BetterThanNobita C May 13, 2024, 1 p.m. OK Rust 2021 TESTS 36 77 1228800 1600
260080875 BetterThanNobita C May 9, 2024, 6:42 a.m. OK Rust 2021 TESTS 36 77 1228800 1600
259719126 cck111 C May 6, 2024, 8:04 a.m. OK Rust 2021 TESTS 36 108 4300800 1600
258293549 RED_INSIDE C April 26, 2024, 9:42 p.m. OK Rust 2021 TESTS 36 109 2662400 1600
259422667 _Mus C May 3, 2024, 9:03 p.m. OK Rust 2021 TESTS 36 124 0 1600
261171384 gowosoft C May 16, 2024, 9:20 a.m. OK Rust 2021 TESTS 36 139 0 1600
261501221 Qumeric C May 18, 2024, 9:36 a.m. OK Rust 2021 TESTS 36 155 7680000 1600

remove filters

Back to search problems