Codeforces Round 929 (Div. 3)

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
1933 Codeforces Round 929 (Div. 3) FINISHED False 8100 28135463 Feb. 27, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1003 ) G Turtle Magic: Royal Turtle Shell Pattern PROGRAMMING bitmasks brute force combinatorics math

B'Turtle Alice is currently designing a fortune cookie box, and she would like to incorporate the theory of LuoShu into it. The box can be seen as an n x m grid ( n, m ge 5 ), where the rows are numbered 1, 2, ... , n and columns are numbered 1, 2, ... , m . Each cell can either be empty or have a single fortune cookie of one of the following shapes: circle or square. The cell at the intersection of the a -th row and the b -th column is denoted as (a, b) . Initially, the entire grid is empty. Then, Alice performs q operations on the fortune cookie box. The i -th operation ( 1 <= i <= q ) is as follows: specify a currently empty cell (r_i,c_i) and a shape (circle or square), then put a fortune cookie of the specified shape on cell (r_i,c_i) . Note that after the i -th operation, the cell (r_i,c_i) is no longer empty. Before all operations and after each of the q operations, Alice wonders what the number of ways to place fortune cookies in all remaining empty cells is, such that the following condition is satisfied: No three consecutive cells (in horizontal, vertical, and both diagonal directions) contain cookies of the same shape. Formally: You should output all answers modulo 998 ,244 ,353 . Also note that it is possible that after some operations, the condition is already not satisfied with the already placed candies, in this case you should output 0 . The first line of the input contains a single integer t ( 1 <= t <= 10^3 ) -- the number of test cases. The first line of each test case contains three integers n , m , q ( 5 <= n, m <= 10^9, 0 <= q <= min(n x m, 10^5) ). The i -th of the next q lines contains two integers r_i , c_i and a single string text{shape}_i ( 1 <= r_i <= n, 1 <= c_i <= m , text{shape}_i= "circle" or "square"), representing the operations. It is guara'...

Tutorials

Codeforces Round 929 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
248734061 Gassa G Feb. 28, 2024, 11:20 a.m. OK D TESTS 64 187 2150400
248734098 Gassa G Feb. 28, 2024, 11:20 a.m. OK D TESTS 64 202 2150400
248738286 Gassa G Feb. 28, 2024, 11:47 a.m. OK D TESTS 64 218 6451200
248738228 Gassa G Feb. 28, 2024, 11:47 a.m. OK D TESTS 64 265 6451200
248755439 Orango G Feb. 28, 2024, 1:31 p.m. OK GNU C++17 TESTS 64 78 0
248741942 hht2005 G Feb. 28, 2024, 12:09 p.m. OK GNU C++17 TESTS 64 78 0
248715610 lddlinan G Feb. 28, 2024, 8:59 a.m. OK GNU C++17 TESTS 64 78 0
248817653 Noobish_Monk G Feb. 28, 2024, 10:48 p.m. OK GNU C++17 TESTS 64 78 102400
248789241 Harsh_kunwar G Feb. 28, 2024, 5:37 p.m. OK GNU C++17 TESTS 64 78 102400
248688437 outfinity G Feb. 28, 2024, 4:14 a.m. OK GNU C++17 TESTS 64 78 204800
248774404 Scano G Feb. 28, 2024, 3:45 p.m. OK GNU C++17 TESTS 64 78 8192000
248825214 abbcc__1 G Feb. 29, 2024, 2:02 a.m. OK GNU C++17 TESTS 64 92 0
248837335 automac G Feb. 29, 2024, 5:27 a.m. OK GNU C++17 TESTS 64 93 0
248830919 YuJun1024 G Feb. 29, 2024, 3:57 a.m. OK GNU C++17 TESTS 64 93 0
248690041 kdlive G Feb. 28, 2024, 4:36 a.m. OK GNU C++17 (64) TESTS 64 61 0
248827736 div7011 G Feb. 29, 2024, 2:53 a.m. OK GNU C++17 (64) TESTS 64 62 0
248826179 CaDe G Feb. 29, 2024, 2:21 a.m. OK GNU C++17 (64) TESTS 64 62 0
248763735 wxgmjfhy G Feb. 28, 2024, 2:25 p.m. OK GNU C++17 (64) TESTS 64 62 0
248757689 Yoystc0n G Feb. 28, 2024, 1:45 p.m. OK GNU C++17 (64) TESTS 64 62 0
248755364 sisanjiujiu G Feb. 28, 2024, 1:30 p.m. OK GNU C++17 (64) TESTS 64 62 0
248749061 Yue_chen G Feb. 28, 2024, 12:53 p.m. OK GNU C++17 (64) TESTS 64 62 0
248743054 H_ZzZ G Feb. 28, 2024, 12:16 p.m. OK GNU C++17 (64) TESTS 64 62 0
248739665 susanzhishen1234 G Feb. 28, 2024, 11:56 a.m. OK GNU C++17 (64) TESTS 64 62 0
248731437 njustbacon G Feb. 28, 2024, 11:02 a.m. OK GNU C++17 (64) TESTS 64 62 0
248737570 020_Omar_2028 G Feb. 28, 2024, 11:42 a.m. OK GNU C++20 (64) TESTS 64 31 204800
248715304 ZrjaK G Feb. 28, 2024, 8:57 a.m. OK GNU C++20 (64) TESTS 64 31 204800
248837318 Kyzer1de G Feb. 29, 2024, 5:27 a.m. OK GNU C++20 (64) TESTS 64 46 0
248835662 Duck_sajin G Feb. 29, 2024, 5:07 a.m. OK GNU C++20 (64) TESTS 64 46 0
248830664 KouMoSir G Feb. 29, 2024, 3:53 a.m. OK GNU C++20 (64) TESTS 64 46 0
248816379 Eman237 G Feb. 28, 2024, 10:23 p.m. OK GNU C++20 (64) TESTS 64 46 0
248795282 Ryazimn G Feb. 28, 2024, 6:23 p.m. OK GNU C++20 (64) TESTS 64 46 0
248783239 djl_0x3f G Feb. 28, 2024, 4:50 p.m. OK GNU C++20 (64) TESTS 64 46 0
248774057 jerry_2024target_master G Feb. 28, 2024, 3:42 p.m. OK GNU C++20 (64) TESTS 64 46 0
248765171 HHU_fl G Feb. 28, 2024, 2:35 p.m. OK GNU C++20 (64) TESTS 64 46 0
248685588 sugar2023 G Feb. 28, 2024, 3:33 a.m. OK Go TESTS 64 140 4608000
248718498 11fingers G Feb. 28, 2024, 9:21 a.m. OK Go TESTS 64 373 4812800
248687159 dzhi G Feb. 28, 2024, 3:56 a.m. OK Java 21 TESTS 64 358 614400
248719808 cpp10 G Feb. 28, 2024, 9:32 a.m. OK Java 21 TESTS 64 389 614400
248718728 cpp10 G Feb. 28, 2024, 9:23 a.m. OK Java 21 TESTS 64 405 512000
248686899 dzhi G Feb. 28, 2024, 3:52 a.m. OK Java 21 TESTS 64 420 102400
248690520 net12k44 G Feb. 28, 2024, 4:41 a.m. OK Java 21 TESTS 64 452 614400
248766265 MintCat G Feb. 28, 2024, 2:43 p.m. OK Java 8 TESTS 64 155 0
248687206 mikeac G Feb. 28, 2024, 3:56 a.m. OK PyPy 3-64 TESTS 64 233 10956800
248745756 yuki_keshiki G Feb. 28, 2024, 12:32 p.m. OK PyPy 3-64 TESTS 64 265 10956800
248792674 gardengnome G Feb. 28, 2024, 6:02 p.m. OK PyPy 3-64 TESTS 64 265 11264000
248688931 Learn_cute_k G Feb. 28, 2024, 4:22 a.m. OK PyPy 3-64 TESTS 64 311 11878400
248690032 cpchenpi G Feb. 28, 2024, 4:36 a.m. OK PyPy 3-64 TESTS 64 1076 10649600
248689649 cpchenpi G Feb. 28, 2024, 4:31 a.m. OK PyPy 3-64 TESTS 64 1091 10444800
248690734 cpchenpi G Feb. 28, 2024, 4:44 a.m. OK PyPy 3-64 TESTS 64 1138 10444800
248713808 Charming G Feb. 28, 2024, 8:47 a.m. OK PyPy 3-64 TESTS 64 1138 11161600
248829013 fisk G Feb. 29, 2024, 3:22 a.m. OK PyPy 3-64 TESTS 64 1512 13312000
248717488 jackylova_fan_fan_fan G Feb. 28, 2024, 9:13 a.m. OK PyPy 3-64 TESTS 64 2011 11776000
248696412 OLOGY G Feb. 28, 2024, 5:58 a.m. OK Python 2 TESTS 64 327 27443200
248698777 OLOGY G Feb. 28, 2024, 6:23 a.m. OK Python 2 TESTS 64 343 27443200
248700481 OLOGY G Feb. 28, 2024, 6:41 a.m. OK Python 2 TESTS 64 436 22630400

remove filters

Back to search problems