Codeforces Round 749 (Div. 1 + Div. 2, based on Technocup 2022 Elimination Round 1)

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
1586 Codeforces Round 749 (Div. 1 + Div. 2, based on Technocup 2022 Elimination Round 1) FINISHED False 8100 97354499 Oct. 17, 2021, 11:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 204 ) I Omkar and Mosaic PROGRAMMING combinatorics constructive algorithms math

B"Omkar is creating a mosaic using colored square tiles, which he places in an n x n grid. When the mosaic is complete, each cell in the grid will have either a glaucous or sinoper tile. However, currently he has only placed tiles in some cells. A completed mosaic will be a mastapeece if and only if each tile is adjacent to exactly 2 tiles of the same color ( 2 tiles are adjacent if they share a side.) Omkar wants to fill the rest of the tiles so that the mosaic becomes a mastapeece. Now he is wondering, is the way to do this unique, and if it is, what is it? The first line contains a single integer n ( 1 <= q n <= q 2000 ). Then follow n lines with n characters in each line. The i -th character in the j -th line corresponds to the cell in row i and column j of the grid, and will be S if Omkar has placed a sinoper tile in this cell, G if Omkar has placed a glaucous tile, . if it's empty. On the first line, print UNIQUE if there is a unique way to get a mastapeece, NONE if Omkar cannot create any, and MULTIPLE if there is more than one way to do so. All letters must be uppercase. If you print UNIQUE, then print n additional lines with n characters in each line, such that the i -th character in the j^{ text{th}} line is S if the tile in row i and column j of the mastapeece is sinoper, and G if it is glaucous. For the first test case, Omkar can make the mastapeeces SSSS SGGS SGGS SSSS and SSGG SSGG GGSS GGSS. For the second test case, it can be proven that it is impossible for Omkar to add tiles to create a mastapeece. For the third case, it can be proven that the given mastapeece is the only mastapeece Omkar can create by adding tiles. For the fourth test case, it's clearly impossible for the only tile in any mosaic Omkar creates to be adjacent to two tiles of the same color, as it will be adjacent to 0 tiles total. "...

Tutorials

Editorial for Technocup 2022 — Elimination Round 1 and Codeforces Round #749 (Div. 1+Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
132283654 rainboy I Oct. 17, 2021, 6:04 p.m. OK GNU C11 TESTS 138 249 3993600
132302398 LJC00118 I Oct. 18, 2021, 3:06 a.m. OK GNU C++17 TESTS 138 312 36249600
132252923 peti1234 I Oct. 17, 2021, 12:52 p.m. OK GNU C++17 TESTS 138 358 20172800
132283079 Vercingetorix I Oct. 17, 2021, 5:55 p.m. OK GNU C++17 TESTS 138 1356 208998400
132289506 Rafbill I Oct. 17, 2021, 7:37 p.m. OK GNU C++17 (64) TESTS 138 312 70348800
132263256 mnbvmar I Oct. 17, 2021, 2:13 p.m. OK GNU C++17 (64) TESTS 138 374 42188800
132298366 KevinWan I Oct. 18, 2021, 12:53 a.m. OK GNU C++17 (64) TESTS 138 483 39628800
132264478 kefaa2 I Oct. 17, 2021, 2:24 p.m. OK GNU C++17 (64) TESTS 138 951 32256000
132266438 655editorial I Oct. 17, 2021, 2:43 p.m. OK GNU C++20 (64) TESTS 138 1091 32256000
132266268 655editorial I Oct. 17, 2021, 2:42 p.m. OK Java 11 TESTS 138 451 18329600
132266318 655editorial I Oct. 17, 2021, 2:42 p.m. OK Kotlin 1.5 TESTS 138 561 6144000

remove filters

Back to search problems