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
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. In the easy version, the character 'O' does not appear in the input. 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 'X' consecutive in the second row and the second column. By changing the middle token to 'O' we make the grid a draw, and we only changed 1 <= lfloor 5/3 rfloor token. In the second test case, we change only 9 <= lfloor 32/3 rfloor tokens, and there does not exis"... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
100579481 |
daut-dlang |
C1 |
Dec. 6, 2020, 5:29 p.m. |
OK |
D |
TESTS |
33 |
31 |
4198400 |
|
|
100567966 |
babaiserror |
C1 |
Dec. 6, 2020, 4:26 p.m. |
OK |
GNU C11 |
TESTS |
33 |
296 |
307200 |
|
|
100594119 |
RainAir |
C1 |
Dec. 7, 2020, 1:13 a.m. |
OK |
GNU C++11 |
TESTS |
33 |
15 |
512000 |
|
|
100574211 |
ZigZagK |
C1 |
Dec. 6, 2020, 5 p.m. |
OK |
GNU C++11 |
TESTS |
33 |
30 |
0 |
|
|
100588281 |
saiful.dh |
C1 |
Dec. 6, 2020, 8:19 p.m. |
OK |
GNU C++11 |
TESTS |
33 |
30 |
102400 |
|
|
100595977 |
Contna |
C1 |
Dec. 7, 2020, 2:43 a.m. |
OK |
GNU C++11 |
TESTS |
33 |
30 |
102400 |
|
|
100595204 |
fishcathu. |
C1 |
Dec. 7, 2020, 2:14 a.m. |
OK |
GNU C++11 |
TESTS |
33 |
30 |
102400 |
|
|
100580055 |
eudanip |
C1 |
Dec. 6, 2020, 5:31 p.m. |
OK |
GNU C++11 |
TESTS |
33 |
31 |
0 |
|
|
100595111 |
He_Ren |
C1 |
Dec. 7, 2020, 2:10 a.m. |
OK |
GNU C++11 |
TESTS |
33 |
31 |
0 |
|
|
100600665 |
lin_rany |
C1 |
Dec. 7, 2020, 5:07 a.m. |
OK |
GNU C++11 |
TESTS |
33 |
31 |
102400 |
|
|
100597766 |
I_Love_Sakurajima_Mai |
C1 |
Dec. 7, 2020, 3:46 a.m. |
OK |
GNU C++11 |
TESTS |
33 |
31 |
102400 |
|
|
100601567 |
Ifan |
C1 |
Dec. 7, 2020, 5:27 a.m. |
OK |
GNU C++11 |
TESTS |
33 |
31 |
102400 |
|
|
100602791 |
reddy_123 |
C1 |
Dec. 7, 2020, 5:52 a.m. |
OK |
GNU C++14 |
TESTS |
33 |
30 |
102400 |
|
|
100599441 |
ra51296 |
C1 |
Dec. 7, 2020, 4:35 a.m. |
OK |
GNU C++14 |
TESTS |
33 |
31 |
102400 |
|
|
100602473 |
n00bie_1004 |
C1 |
Dec. 7, 2020, 5:45 a.m. |
OK |
GNU C++14 |
TESTS |
33 |
31 |
102400 |
|
|
100600704 |
patelmanan |
C1 |
Dec. 7, 2020, 5:08 a.m. |
OK |
GNU C++14 |
TESTS |
33 |
31 |
102400 |
|
|
100600015 |
ccutyear |
C1 |
Dec. 7, 2020, 4:50 a.m. |
OK |
GNU C++14 |
TESTS |
33 |
31 |
102400 |
|
|
100599406 |
ojhaakshat |
C1 |
Dec. 7, 2020, 4:34 a.m. |
OK |
GNU C++14 |
TESTS |
33 |
31 |
102400 |
|
|
100599338 |
whoissmt |
C1 |
Dec. 7, 2020, 4:32 a.m. |
OK |
GNU C++14 |
TESTS |
33 |
31 |
102400 |
|
|
100599229 |
HinS |
C1 |
Dec. 7, 2020, 4:29 a.m. |
OK |
GNU C++14 |
TESTS |
33 |
31 |
102400 |
|
|
100598588 |
gaurav_2020 |
C1 |
Dec. 7, 2020, 4:12 a.m. |
OK |
GNU C++14 |
TESTS |
33 |
31 |
102400 |
|
|
100597959 |
kair011a_ |
C1 |
Dec. 7, 2020, 3:53 a.m. |
OK |
GNU C++14 |
TESTS |
33 |
31 |
102400 |
|
|
100587425 |
jhorvat |
C1 |
Dec. 6, 2020, 7:55 p.m. |
OK |
GNU C++17 |
TESTS |
33 |
30 |
102400 |
|
|
100591181 |
vm7 |
C1 |
Dec. 6, 2020, 10:08 p.m. |
OK |
GNU C++17 |
TESTS |
33 |
30 |
102400 |
|
|
100588354 |
yash_27 |
C1 |
Dec. 6, 2020, 8:22 p.m. |
OK |
GNU C++17 |
TESTS |
33 |
30 |
102400 |
|
|
100603021 |
YabelAurelius |
C1 |
Dec. 7, 2020, 5:56 a.m. |
OK |
GNU C++17 |
TESTS |
33 |
31 |
102400 |
|
|
100602993 |
NightStalker |
C1 |
Dec. 7, 2020, 5:56 a.m. |
OK |
GNU C++17 |
TESTS |
33 |
31 |
102400 |
|
|
100601836 |
korangu_kuppan |
C1 |
Dec. 7, 2020, 5:32 a.m. |
OK |
GNU C++17 |
TESTS |
33 |
31 |
102400 |
|
|
100600692 |
PORK |
C1 |
Dec. 7, 2020, 5:07 a.m. |
OK |
GNU C++17 |
TESTS |
33 |
31 |
102400 |
|
|
100601291 |
shajal |
C1 |
Dec. 7, 2020, 5:20 a.m. |
OK |
GNU C++17 |
TESTS |
33 |
31 |
102400 |
|
|
100600443 |
prabhav_ |
C1 |
Dec. 7, 2020, 5:01 a.m. |
OK |
GNU C++17 |
TESTS |
33 |
31 |
102400 |
|
|
100603350 |
Igor_2017 |
C1 |
Dec. 7, 2020, 6:03 a.m. |
OK |
GNU C++17 |
TESTS |
33 |
31 |
102400 |
|
|
100588884 |
_baba_yaga |
C1 |
Dec. 6, 2020, 8:38 p.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
30 |
102400 |
|
|
100573963 |
jupiro |
C1 |
Dec. 6, 2020, 4:58 p.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
30 |
102400 |
|
|
100602353 |
sourabhgol1999 |
C1 |
Dec. 7, 2020, 5:43 a.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
30 |
102400 |
|
|
100584549 |
Ayalla |
C1 |
Dec. 6, 2020, 6:53 p.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
30 |
102400 |
|
|
100570300 |
SebaMarin |
C1 |
Dec. 6, 2020, 4:38 p.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
30 |
204800 |
|
|
100598801 |
Jo3kerR |
C1 |
Dec. 7, 2020, 4:18 a.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
30 |
204800 |
|
|
100567110 |
ntwbvdbl_oe |
C1 |
Dec. 6, 2020, 4:22 p.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
30 |
409600 |
|
|
100584969 |
stoned_ |
C1 |
Dec. 6, 2020, 7 p.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
30 |
409600 |
|
|
100603318 |
knshnb |
C1 |
Dec. 7, 2020, 6:03 a.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
30 |
512000 |
|
|
100598208 |
XDD_____ |
C1 |
Dec. 7, 2020, 4 a.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
30 |
819200 |
|
|
100593430 |
kkkkush |
C1 |
Dec. 7, 2020, 12:30 a.m. |
OK |
Java 11 |
TESTS |
33 |
171 |
0 |
|
|
100586559 |
insert_cool_handle |
C1 |
Dec. 6, 2020, 7:31 p.m. |
OK |
Java 11 |
TESTS |
33 |
171 |
0 |
|
|
100594226 |
Ste |
C1 |
Dec. 7, 2020, 1:20 a.m. |
OK |
Java 11 |
TESTS |
33 |
171 |
0 |
|
|
100582938 |
dauom |
C1 |
Dec. 6, 2020, 6:30 p.m. |
OK |
Java 11 |
TESTS |
33 |
171 |
0 |
|
|
100592207 |
abdelrahman-yousf |
C1 |
Dec. 6, 2020, 11:07 p.m. |
OK |
Java 11 |
TESTS |
33 |
187 |
0 |
|
|
100589528 |
yarrr |
C1 |
Dec. 6, 2020, 8:59 p.m. |
OK |
Java 11 |
TESTS |
33 |
187 |
0 |
|
|
100585929 |
KGECian_23 |
C1 |
Dec. 6, 2020, 7:17 p.m. |
OK |
Java 11 |
TESTS |
33 |
187 |
0 |
|
|
100585373 |
gssakash |
C1 |
Dec. 6, 2020, 7:06 p.m. |
OK |
Java 11 |
TESTS |
33 |
187 |
0 |
|
|
100573255 |
Apfeloxid |
C1 |
Dec. 6, 2020, 4:54 p.m. |
OK |
Java 11 |
TESTS |
33 |
187 |
0 |
|
|
100583355 |
skittles1412 |
C1 |
Dec. 6, 2020, 6:35 p.m. |
OK |
Java 11 |
TESTS |
33 |
202 |
0 |
|
|
100583984 |
subhamdtu |
C1 |
Dec. 6, 2020, 6:44 p.m. |
OK |
Java 8 |
TESTS |
33 |
109 |
0 |
|
|
100573298 |
MagentaCobra |
C1 |
Dec. 6, 2020, 4:55 p.m. |
OK |
Java 8 |
TESTS |
33 |
109 |
0 |
|
|
100603231 |
tirth9960 |
C1 |
Dec. 7, 2020, 6:01 a.m. |
OK |
Java 8 |
TESTS |
33 |
109 |
0 |
|
|
100592184 |
sushant-kun |
C1 |
Dec. 6, 2020, 11:05 p.m. |
OK |
Java 8 |
TESTS |
33 |
109 |
0 |
|
|
100591334 |
mareshkau |
C1 |
Dec. 6, 2020, 10:15 p.m. |
OK |
Java 8 |
TESTS |
33 |
109 |
0 |
|
|
100585194 |
martins |
C1 |
Dec. 6, 2020, 7:04 p.m. |
OK |
Java 8 |
TESTS |
33 |
109 |
0 |
|
|
100587393 |
ashraf101 |
C1 |
Dec. 6, 2020, 7:54 p.m. |
OK |
Java 8 |
TESTS |
33 |
109 |
0 |
|
|
100594285 |
MubtasimShahriar |
C1 |
Dec. 7, 2020, 1:23 a.m. |
OK |
Java 8 |
TESTS |
33 |
124 |
0 |
|
|
100584072 |
R3KT |
C1 |
Dec. 6, 2020, 6:46 p.m. |
OK |
Java 8 |
TESTS |
33 |
124 |
0 |
|
|
100587417 |
honeysingh18 |
C1 |
Dec. 6, 2020, 7:54 p.m. |
OK |
Java 8 |
TESTS |
33 |
124 |
0 |
|
|
100583044 |
amelentev |
C1 |
Dec. 6, 2020, 6:32 p.m. |
OK |
Kotlin |
TESTS |
33 |
140 |
1638400 |
|
|
100587305 |
Dev.Zaki |
C1 |
Dec. 6, 2020, 7:52 p.m. |
OK |
Kotlin |
TESTS |
33 |
155 |
1638400 |
|
|
100584312 |
Hakiobo |
C1 |
Dec. 6, 2020, 6:49 p.m. |
OK |
Kotlin |
TESTS |
33 |
156 |
1638400 |
|
|
100578174 |
Hakiobo |
C1 |
Dec. 6, 2020, 5:22 p.m. |
OK |
Kotlin |
TESTS |
33 |
171 |
1945600 |
|
|
100590939 |
koper |
C1 |
Dec. 6, 2020, 9:55 p.m. |
OK |
Kotlin |
TESTS |
33 |
186 |
1945600 |
|
|
100588500 |
stevancv |
C1 |
Dec. 6, 2020, 8:26 p.m. |
OK |
MS C++ 2017 |
TESTS |
33 |
31 |
102400 |
|
|
100565714 |
ustaritz |
C1 |
Dec. 6, 2020, 4:16 p.m. |
OK |
MS C++ 2017 |
TESTS |
33 |
31 |
102400 |
|
|
100568209 |
ElizaBest |
C1 |
Dec. 6, 2020, 4:28 p.m. |
OK |
MS C++ 2017 |
TESTS |
33 |
31 |
102400 |
|
|
100597975 |
Pratham_Kumar |
C1 |
Dec. 7, 2020, 3:53 a.m. |
OK |
MS C++ 2017 |
TESTS |
33 |
31 |
102400 |
|
|
100582874 |
pichulia |
C1 |
Dec. 6, 2020, 6:30 p.m. |
OK |
MS C++ 2017 |
TESTS |
33 |
31 |
307200 |
|
|
100565751 |
GagO_O |
C1 |
Dec. 6, 2020, 4:16 p.m. |
OK |
MS C++ 2017 |
TESTS |
33 |
46 |
204800 |
|
|
100585100 |
Gravekper |
C1 |
Dec. 6, 2020, 7:02 p.m. |
OK |
MS C++ 2017 |
TESTS |
33 |
46 |
1740800 |
|
|
100587869 |
fgwiebfaoish |
C1 |
Dec. 6, 2020, 8:08 p.m. |
OK |
.NET Core C# |
TESTS |
33 |
108 |
716800 |
|
|
100566069 |
MyEighthName |
C1 |
Dec. 6, 2020, 4:17 p.m. |
OK |
.NET Core C# |
TESTS |
33 |
108 |
3788800 |
|
|
100586464 |
tomvai15 |
C1 |
Dec. 6, 2020, 7:29 p.m. |
OK |
.NET Core C# |
TESTS |
33 |
326 |
512000 |
|
|
100585393 |
tennisru |
C1 |
Dec. 6, 2020, 7:07 p.m. |
OK |
Node.js |
TESTS |
33 |
139 |
4812800 |
|
|
100598075 |
Gaurav1 |
C1 |
Dec. 7, 2020, 3:56 a.m. |
OK |
PyPy 2 |
TESTS |
33 |
248 |
6246400 |
|
|
100586428 |
marroncastle |
C1 |
Dec. 6, 2020, 7:28 p.m. |
OK |
PyPy 3 |
TESTS |
33 |
171 |
3788800 |
|
|
100565246 |
asdsasd |
C1 |
Dec. 6, 2020, 4:13 p.m. |
OK |
PyPy 3 |
TESTS |
33 |
171 |
3788800 |
|
|
100585703 |
marroncastle |
C1 |
Dec. 6, 2020, 7:12 p.m. |
OK |
PyPy 3 |
TESTS |
33 |
171 |
3993600 |
|
|
100589955 |
silvertint |
C1 |
Dec. 6, 2020, 9:14 p.m. |
OK |
PyPy 3 |
TESTS |
33 |
171 |
4096000 |
|
|
100601039 |
Death_17 |
C1 |
Dec. 7, 2020, 5:15 a.m. |
OK |
PyPy 3 |
TESTS |
33 |
171 |
4198400 |
|
|
100586914 |
oadey89 |
C1 |
Dec. 6, 2020, 7:41 p.m. |
OK |
PyPy 3 |
TESTS |
33 |
171 |
4300800 |
|
|
100592007 |
FlakeLCR |
C1 |
Dec. 6, 2020, 10:52 p.m. |
OK |
PyPy 3 |
TESTS |
33 |
171 |
4505600 |
|
|
100565494 |
ZzaZi |
C1 |
Dec. 6, 2020, 4:14 p.m. |
OK |
PyPy 3 |
TESTS |
33 |
171 |
4608000 |
|
|
100601213 |
Coki628 |
C1 |
Dec. 7, 2020, 5:19 a.m. |
OK |
PyPy 3 |
TESTS |
33 |
171 |
5120000 |
|
|
100587040 |
gintoki_s |
C1 |
Dec. 6, 2020, 7:45 p.m. |
OK |
PyPy 3 |
TESTS |
33 |
171 |
7270400 |
|
|
100601682 |
ap1008 |
C1 |
Dec. 7, 2020, 5:29 a.m. |
OK |
Python 2 |
TESTS |
33 |
217 |
614400 |
|
|
100593850 |
ChanceRamen |
C1 |
Dec. 7, 2020, 12:58 a.m. |
OK |
Python 3 |
TESTS |
33 |
140 |
307200 |
|
|
100599896 |
nchack |
C1 |
Dec. 7, 2020, 4:46 a.m. |
OK |
Python 3 |
TESTS |
33 |
140 |
2867200 |
|
|
100568006 |
----__-__--_ |
C1 |
Dec. 6, 2020, 4:26 p.m. |
OK |
Python 3 |
TESTS |
33 |
186 |
716800 |
|
|
100597301 |
mkawa2 |
C1 |
Dec. 7, 2020, 3:29 a.m. |
OK |
Python 3 |
TESTS |
33 |
218 |
3174400 |
|
|
100567479 |
LaPatate |
C1 |
Dec. 6, 2020, 4:24 p.m. |
OK |
Python 3 |
TESTS |
33 |
233 |
1536000 |
|
|
100570908 |
isan_L |
C1 |
Dec. 6, 2020, 4:42 p.m. |
OK |
Python 3 |
TESTS |
33 |
265 |
1331200 |
|
|
100575324 |
-Kami- |
C1 |
Dec. 6, 2020, 5:06 p.m. |
OK |
Python 3 |
TESTS |
33 |
295 |
1638400 |
|
|
100569048 |
ved_vyas |
C1 |
Dec. 6, 2020, 4:32 p.m. |
OK |
Python 3 |
TESTS |
33 |
577 |
2252800 |
|
|
100587756 |
optozorax |
C1 |
Dec. 6, 2020, 8:05 p.m. |
OK |
Rust |
TESTS |
33 |
46 |
409600 |
|
|
remove filters
Back to search problems