Codeforces Global Round 12

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
1450 Codeforces Global Round 12 FINISHED False 10800 124557899 Dec. 6, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3728 ) C2 Errich-Tac-Toe (Hard Version) PROGRAMMING constructive algorithms math

B"The only difference between the easy and hard versions is that tokens of type O do not appear in the input of the easy version. Errichto gave Monogon the following challenge in order to intimidate him from taking his top contributor spot on Codeforces. In a Tic-Tac-Toe grid, there are n rows and n columns. Each cell of the grid is either empty or contains a token. There are two types of tokens: X and O. If there exist three tokens of the same type consecutive in a row or column, it is a winning configuration. Otherwise, it is a draw configuration. In an operation, you can change an X to an O, or an O to an X. Let k denote the total number of tokens in the grid. Your task is to make the grid a draw in at most lfloor frac{k}{3} rfloor (rounding down) operations. You are not required to minimize the number of operations. The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= n <= 300 ) -- the size of the grid. The following n lines each contain a string of n characters, denoting the initial grid. The character in the i -th row and j -th column is '.' if the cell is empty, or it is the type of token in the cell: 'X' or 'O'. It is guaranteed that not all cells are empty. The sum of n across all test cases does not exceed 300 . For each test case, print the state of the grid after applying the operations. We have proof that a solution always exists. If there are multiple solutions, print any. In the first test case, there are initially three 'O' consecutive in the second row and the second column. By changing the middle token to 'X' we make the grid a draw, and we only changed 1 <= lfloor 5/3 rfloor token. In the second test case, the final grid is a draw. We only changed 8 <= lfloor 32/3 rfloor tokens. In the third test case, the final grid is a draw. We only changed"...

Tutorials

Codeforces Global Round 12 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
100571612 Duy_e C2 Dec. 6, 2020, 4:46 p.m. OK FPC TESTS 70 296 11980800
100583169 babaiserror C2 Dec. 6, 2020, 6:33 p.m. OK GNU C11 TESTS 70 311 307200
100593342 2016wudi C2 Dec. 7, 2020, 12:24 a.m. OK GNU C++11 TESTS 70 31 0
100595123 He_Ren C2 Dec. 7, 2020, 2:10 a.m. OK GNU C++11 TESTS 70 31 0
100596777 Contna C2 Dec. 7, 2020, 3:12 a.m. OK GNU C++11 TESTS 70 31 102400
100596625 wbscd C2 Dec. 7, 2020, 3:06 a.m. OK GNU C++11 TESTS 70 31 102400
100596225 Qingyu98821 C2 Dec. 7, 2020, 2:52 a.m. OK GNU C++11 TESTS 70 31 102400
100595779 YouDongLiang C2 Dec. 7, 2020, 2:37 a.m. OK GNU C++11 TESTS 70 31 102400
100595189 fishcathu. C2 Dec. 7, 2020, 2:13 a.m. OK GNU C++11 TESTS 70 31 102400
100602547 LKP1111 C2 Dec. 7, 2020, 5:46 a.m. OK GNU C++11 TESTS 70 31 102400
100601149 lin_rany C2 Dec. 7, 2020, 5:17 a.m. OK GNU C++11 TESTS 70 31 102400
100600998 I_Love_Sakurajima_Mai C2 Dec. 7, 2020, 5:14 a.m. OK GNU C++11 TESTS 70 31 102400
100594297 dl720125 C2 Dec. 7, 2020, 1:23 a.m. OK GNU C++14 TESTS 70 31 102400
100600321 tanmay.raj.29 C2 Dec. 7, 2020, 4:58 a.m. OK GNU C++14 TESTS 70 31 102400
100599310 whoissmt C2 Dec. 7, 2020, 4:32 a.m. OK GNU C++14 TESTS 70 31 102400
100597320 YannLiu C2 Dec. 7, 2020, 3:30 a.m. OK GNU C++14 TESTS 70 31 102400
100595758 _CPE_ C2 Dec. 7, 2020, 2:36 a.m. OK GNU C++14 TESTS 70 31 102400
100594668 tuanle03 C2 Dec. 7, 2020, 1:46 a.m. OK GNU C++14 TESTS 70 31 102400
100593616 keroker0 C2 Dec. 7, 2020, 12:43 a.m. OK GNU C++14 TESTS 70 31 102400
100593328 aayuprasad C2 Dec. 7, 2020, 12:23 a.m. OK GNU C++14 TESTS 70 31 102400
100587917 flamestorm C2 Dec. 6, 2020, 8:09 p.m. OK GNU C++14 TESTS 70 31 102400
100583482 farmerboy C2 Dec. 6, 2020, 6:37 p.m. OK GNU C++14 TESTS 70 31 102400
100599884 Mehedihasanprodhan C2 Dec. 7, 2020, 4:46 a.m. OK GNU C++17 TESTS 70 31 102400
100599053 L_lawliet27 C2 Dec. 7, 2020, 4:24 a.m. OK GNU C++17 TESTS 70 31 102400
100598322 Pecco C2 Dec. 7, 2020, 4:04 a.m. OK GNU C++17 TESTS 70 31 102400
100596248 loulingli C2 Dec. 7, 2020, 2:53 a.m. OK GNU C++17 TESTS 70 31 102400
100593487 HAUT_Xjl C2 Dec. 7, 2020, 12:34 a.m. OK GNU C++17 TESTS 70 31 102400
100592174 WhiteChocolate C2 Dec. 6, 2020, 11:04 p.m. OK GNU C++17 TESTS 70 31 102400
100591122 rocks03 C2 Dec. 6, 2020, 10:04 p.m. OK GNU C++17 TESTS 70 31 102400
100590109 jatinkansal81 C2 Dec. 6, 2020, 9:19 p.m. OK GNU C++17 TESTS 70 31 102400
100589388 AryaN_ChauhaN25 C2 Dec. 6, 2020, 8:54 p.m. OK GNU C++17 TESTS 70 31 102400
100586846 the_ocean C2 Dec. 6, 2020, 7:39 p.m. OK GNU C++17 TESTS 70 31 102400
100583649 jupiro C2 Dec. 6, 2020, 6:39 p.m. OK GNU C++17 (64) TESTS 70 30 102400
100573103 saketh C2 Dec. 6, 2020, 4:54 p.m. OK GNU C++17 (64) TESTS 70 30 204800
100594180 dqa2020 C2 Dec. 7, 2020, 1:18 a.m. OK GNU C++17 (64) TESTS 70 31 0
100594149 lookcook C2 Dec. 7, 2020, 1:16 a.m. OK GNU C++17 (64) TESTS 70 31 102400
100601794 ashutosh_aks C2 Dec. 7, 2020, 5:31 a.m. OK GNU C++17 (64) TESTS 70 31 102400
100600596 zed4419 C2 Dec. 7, 2020, 5:05 a.m. OK GNU C++17 (64) TESTS 70 31 102400
100598777 ShadeSlide C2 Dec. 7, 2020, 4:18 a.m. OK GNU C++17 (64) TESTS 70 31 102400
100597989 SSYernar C2 Dec. 7, 2020, 3:53 a.m. OK GNU C++17 (64) TESTS 70 31 102400
100596192 vioalbert C2 Dec. 7, 2020, 2:51 a.m. OK GNU C++17 (64) TESTS 70 31 102400
100593013 aurinegro C2 Dec. 7, 2020, 12:01 a.m. OK GNU C++17 (64) TESTS 70 31 102400
100589654 yarrr C2 Dec. 6, 2020, 9:03 p.m. OK Java 11 TESTS 70 171 0
100583898 skittles1412 C2 Dec. 6, 2020, 6:43 p.m. OK Java 11 TESTS 70 187 0
100583434 mikit C2 Dec. 6, 2020, 6:36 p.m. OK Java 11 TESTS 70 187 0
100577000 Apfeloxid C2 Dec. 6, 2020, 5:15 p.m. OK Java 11 TESTS 70 187 0
100586565 insert_cool_handle C2 Dec. 6, 2020, 7:32 p.m. OK Java 11 TESTS 70 202 0
100576082 adp527 C2 Dec. 6, 2020, 5:11 p.m. OK Java 8 TESTS 70 124 0
100592862 MagentaCobra C2 Dec. 6, 2020, 11:50 p.m. OK Java 8 TESTS 70 124 0
100587407 ashraf101 C2 Dec. 6, 2020, 7:54 p.m. OK Java 8 TESTS 70 124 0
100584123 R3KT C2 Dec. 6, 2020, 6:46 p.m. OK Java 8 TESTS 70 124 0
100584020 subhamdtu C2 Dec. 6, 2020, 6:45 p.m. OK Java 8 TESTS 70 124 0
100603041 tanmayks1999.ts C2 Dec. 7, 2020, 5:57 a.m. OK Java 8 TESTS 70 420 0
100584319 Hakiobo C2 Dec. 6, 2020, 6:49 p.m. OK Kotlin TESTS 70 155 1638400
100587544 Dev.Zaki C2 Dec. 6, 2020, 7:58 p.m. OK Kotlin TESTS 70 155 1638400
100583106 amelentev C2 Dec. 6, 2020, 6:32 p.m. OK Kotlin TESTS 70 155 1638400
100591071 koper C2 Dec. 6, 2020, 10:02 p.m. OK Kotlin TESTS 70 186 2048000
100582899 pichulia C2 Dec. 6, 2020, 6:30 p.m. OK MS C++ 2017 TESTS 70 31 307200
100585122 Gravekper C2 Dec. 6, 2020, 7:03 p.m. OK MS C++ 2017 TESTS 70 31 1638400
100578784 gnomina007 C2 Dec. 6, 2020, 5:25 p.m. OK MS C++ 2017 TESTS 70 31 1740800
100566194 Megalitum C2 Dec. 6, 2020, 4:18 p.m. OK MS C++ 2017 TESTS 70 46 102400
100589114 stevancv C2 Dec. 6, 2020, 8:45 p.m. OK MS C++ 2017 TESTS 70 46 102400
100568146 Toryu C2 Dec. 6, 2020, 4:27 p.m. OK MS C++ 2017 TESTS 70 62 409600
100584262 azukun C2 Dec. 6, 2020, 6:48 p.m. OK .NET Core C# TESTS 70 109 4300800
100598083 Gaurav1 C2 Dec. 7, 2020, 3:56 a.m. OK PyPy 2 TESTS 70 187 6553600
100566614 asdsasd C2 Dec. 6, 2020, 4:20 p.m. OK PyPy 3 TESTS 70 171 3993600
100586410 marroncastle C2 Dec. 6, 2020, 7:28 p.m. OK PyPy 3 TESTS 70 171 4300800
100587386 oadey89 C2 Dec. 6, 2020, 7:53 p.m. OK PyPy 3 TESTS 70 171 4403200
100589933 silvertint C2 Dec. 6, 2020, 9:13 p.m. OK PyPy 3 TESTS 70 171 4608000
100587028 gintoki_s C2 Dec. 6, 2020, 7:44 p.m. OK PyPy 3 TESTS 70 171 7884800
100582947 titia C2 Dec. 6, 2020, 6:30 p.m. OK PyPy 3 TESTS 70 186 4300800
100599910 arihant72600 C2 Dec. 7, 2020, 4:47 a.m. OK PyPy 3 TESTS 70 187 4300800
100598056 nocreative1 C2 Dec. 7, 2020, 3:56 a.m. OK PyPy 3 TESTS 70 187 4300800
100601481 Coki628 C2 Dec. 7, 2020, 5:25 a.m. OK PyPy 3 TESTS 70 187 5324800
100566299 Arpa C2 Dec. 6, 2020, 4:18 p.m. OK PyPy 3 TESTS 70 217 4096000
100601699 ap1008 C2 Dec. 7, 2020, 5:29 a.m. OK Python 2 TESTS 70 233 614400
100597293 mkawa2 C2 Dec. 7, 2020, 3:29 a.m. OK Python 3 TESTS 70 249 3174400
100587947 optozorax C2 Dec. 6, 2020, 8:10 p.m. OK Rust TESTS 70 46 409600
100587766 optozorax C2 Dec. 6, 2020, 8:05 p.m. OK Rust TESTS 70 46 409600
100580405 ngtkana C2 Dec. 6, 2020, 5:33 p.m. OK Rust TESTS 70 46 1331200

remove filters

Back to search problems