Codeforces Round 688 (Div. 2)

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
1453 Codeforces Round 688 (Div. 2) FINISHED False 8100 124736099 Dec. 4, 2020, 1:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6056 ) C Triangles PROGRAMMING greedy implementation

B"Gildong has a square board consisting of n rows and n columns of square cells, each consisting of a single digit (from 0 to 9 ). The cell at the j -th column of the i -th row can be represented as (i, j) , and the length of the side of each cell is 1 . Gildong likes big things, so for each digit d , he wants to find a triangle such that: Of course, he can't just be happy with finding these triangles as is. Therefore, for each digit d , he's going to change the digit of exactly one cell of the board to d , then find such a triangle. He changes it back to its original digit after he is done with each digit. Find the maximum area of the triangle he can make for each digit. Note that he can put multiple vertices of the triangle on the same cell, and the triangle can be a degenerate triangle; i.e. the area of the triangle can be 0 . Also, note that he is allowed to change the digit of a cell from d to d . Each test contains one or more test cases. The first line contains the number of test cases t ( 1 <= t <= 1000 ). The first line of each test case contains one integer n ( 1 <= n <= 2000 ) -- the number of rows and columns of the board. The next n lines of each test case each contain a string of n digits without spaces. The j -th digit of the i -th line is the digit of the cell at (i, j) . Each digit is one of the characters from 0 to 9 . It is guaranteed that the sum of n^2 in all test cases doesn't exceed 4 cdot 10^6 . For each test case, print one line with 10 integers. The i -th integer is the maximum area of triangle Gildong can make when d = i-1 , multiplied by 2 . In the first case, for d=0 , no matter which cell he chooses to use, the triangle with vertices at (1, 1) , (1, 3) , and (3, 1) is the biggest triangle with area of cfrac{2 cdot 2}{2} = 2 . Since we"...

Tutorials

Codeforces Round #688 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
100373776 Gassa C Dec. 4, 2020, 2:23 p.m. OK D TESTS 44 701 74547200
100368741 daut-dlang C Dec. 4, 2020, 1:57 p.m. OK D TESTS 44 1902 99020800
100383341 ruban C Dec. 4, 2020, 3:08 p.m. OK Delphi TESTS 44 311 14131200
100371357 wjhh C Dec. 4, 2020, 2:10 p.m. OK FPC TESTS 44 561 3993600
100392177 babaiserror C Dec. 4, 2020, 4:48 p.m. OK GNU C11 TESTS 44 93 17408000
100375080 YOK C Dec. 4, 2020, 2:29 p.m. OK GNU C11 TESTS 44 124 3993600
100391629 Hisoka C Dec. 4, 2020, 4:39 p.m. OK GNU C++11 TESTS 44 62 409600
100383591 ZJNU_X C Dec. 4, 2020, 3:10 p.m. OK GNU C++11 TESTS 44 62 4096000
100372558 lifehappy C Dec. 4, 2020, 2:17 p.m. OK GNU C++11 TESTS 44 62 4300800
100375265 lzc2001 C Dec. 4, 2020, 2:30 p.m. OK GNU C++11 TESTS 44 62 4403200
100391042 LKP1111 C Dec. 4, 2020, 4:31 p.m. OK GNU C++11 TESTS 44 62 5120000
100371007 SergheySmirnov C Dec. 4, 2020, 2:08 p.m. OK GNU C++11 TESTS 44 62 5324800
100377129 bao216 C Dec. 4, 2020, 2:39 p.m. OK GNU C++11 TESTS 44 62 6860800
100373356 minhle.ff C Dec. 4, 2020, 2:21 p.m. OK GNU C++11 TESTS 44 62 6860800
100411662 2uoidub C Dec. 5, 2020, 2:44 a.m. OK GNU C++11 TESTS 44 62 16076800
100411441 2uoidub C Dec. 5, 2020, 2:37 a.m. OK GNU C++11 TESTS 44 62 16076800
100385451 byjiang98 C Dec. 4, 2020, 3:17 p.m. OK GNU C++14 TESTS 44 77 307200
100409641 tuanle03 C Dec. 5, 2020, 1:26 a.m. OK GNU C++14 TESTS 44 77 4096000
100375067 _Nice C Dec. 4, 2020, 2:29 p.m. OK GNU C++14 TESTS 44 77 5120000
100373358 YugiHacker C Dec. 4, 2020, 2:21 p.m. OK GNU C++14 TESTS 44 77 5632000
100407600 gouh9qn C Dec. 4, 2020, 11:19 p.m. OK GNU C++14 TESTS 44 77 7168000
100371013 _misaka C Dec. 4, 2020, 2:08 p.m. OK GNU C++14 TESTS 44 77 7577600
100413894 summer_ C Dec. 5, 2020, 3:55 a.m. OK GNU C++14 TESTS 44 78 3993600
100388187 adhklp C Dec. 4, 2020, 3:55 p.m. OK GNU C++14 TESTS 44 78 3993600
100370513 chenfu1234 C Dec. 4, 2020, 2:06 p.m. OK GNU C++14 TESTS 44 78 3993600
100381442 Chen_zhuozhuo C Dec. 4, 2020, 3 p.m. OK GNU C++14 TESTS 44 78 4096000
100368904 dyxx C Dec. 4, 2020, 1:58 p.m. OK GNU C++17 TESTS 44 62 4198400
100373720 MS6530-P9 C Dec. 4, 2020, 2:22 p.m. OK GNU C++17 TESTS 44 62 10956800
100415128 developer.eeshan C Dec. 5, 2020, 4:28 a.m. OK GNU C++17 TESTS 44 77 3993600
100409629 haogee C Dec. 5, 2020, 1:25 a.m. OK GNU C++17 TESTS 44 77 3993600
100369627 GersonVinicius C Dec. 4, 2020, 2:01 p.m. OK GNU C++17 TESTS 44 77 4300800
100378393 majiamajia66 C Dec. 4, 2020, 2:45 p.m. OK GNU C++17 TESTS 44 77 4403200
100404451 silvertint C Dec. 4, 2020, 8:49 p.m. OK GNU C++17 TESTS 44 77 4812800
100380359 BobbyZ C Dec. 4, 2020, 2:54 p.m. OK GNU C++17 TESTS 44 77 7168000
100376884 EminOrucov2004 C Dec. 4, 2020, 2:38 p.m. OK GNU C++17 TESTS 44 77 7168000
100398341 Dreamy_boy C Dec. 4, 2020, 6:31 p.m. OK GNU C++17 TESTS 44 77 9011200
100409073 Arrebol C Dec. 5, 2020, 12:58 a.m. OK GNU C++17 (64) TESTS 44 77 4096000
100388110 Anus1373 C Dec. 4, 2020, 3:54 p.m. OK GNU C++17 (64) TESTS 44 77 4505600
100394145 nayan_000 C Dec. 4, 2020, 5:16 p.m. OK GNU C++17 (64) TESTS 44 77 7270400
100419145 darkpsychic C Dec. 5, 2020, 5:48 a.m. OK GNU C++17 (64) TESTS 44 77 7372800
100419117 darkpsychic C Dec. 5, 2020, 5:47 a.m. OK GNU C++17 (64) TESTS 44 77 7372800
100406076 ankushkhanna C Dec. 4, 2020, 9:57 p.m. OK GNU C++17 (64) TESTS 44 77 7372800
100403471 Lost_Arrow C Dec. 4, 2020, 8:19 p.m. OK GNU C++17 (64) TESTS 44 77 7372800
100403419 Lost_Arrow C Dec. 4, 2020, 8:18 p.m. OK GNU C++17 (64) TESTS 44 77 7372800
100380739 Coki628 C Dec. 4, 2020, 2:56 p.m. OK GNU C++17 (64) TESTS 44 77 7372800
100368681 izlyforever C Dec. 4, 2020, 1:57 p.m. OK GNU C++17 (64) TESTS 44 77 7372800
100371184 synapse C Dec. 4, 2020, 2:09 p.m. OK Go TESTS 44 452 10035200
100392610 nirvana_rsc C Dec. 4, 2020, 4:54 p.m. OK Java 11 TESTS 44 280 9523200
100416871 ojhaankesh1975 C Dec. 5, 2020, 5:13 a.m. OK Java 11 TESTS 44 296 9625600
100369476 blackBird C Dec. 4, 2020, 2:01 p.m. OK Java 11 TESTS 44 327 0
100392560 nirvana_rsc C Dec. 4, 2020, 4:53 p.m. OK Java 11 TESTS 44 327 9625600
100388171 Jman C Dec. 4, 2020, 3:55 p.m. OK Java 11 TESTS 44 342 102400
100399418 DreamInfinite C Dec. 4, 2020, 6:51 p.m. OK Java 11 TESTS 44 342 19763200
100404340 mphillotry C Dec. 4, 2020, 8:45 p.m. OK Java 11 TESTS 44 343 18944000
100371938 dauom C Dec. 4, 2020, 2:13 p.m. OK Java 11 TESTS 44 389 57446400
100373235 rupeswar C Dec. 4, 2020, 2:20 p.m. OK Java 11 TESTS 44 405 19148800
100368799 AgnimandurDIV3 C Dec. 4, 2020, 1:57 p.m. OK Java 11 TESTS 44 420 19046400
100392413 djm03178 C Dec. 4, 2020, 4:51 p.m. OK Java 8 TESTS 44 171 4096000
100379916 procrastinate7 C Dec. 4, 2020, 2:52 p.m. OK Java 8 TESTS 44 217 17305600
100372608 wleite C Dec. 4, 2020, 2:17 p.m. OK Java 8 TESTS 44 218 0
100369227 robinz62 C Dec. 4, 2020, 2 p.m. OK Java 8 TESTS 44 264 4915200
100370482 FC_WIN C Dec. 4, 2020, 2:06 p.m. OK Java 8 TESTS 44 265 5427200
100387650 kocko C Dec. 4, 2020, 3:52 p.m. OK Java 8 TESTS 44 265 8089600
100370548 subhamdtu C Dec. 4, 2020, 2:06 p.m. OK Java 8 TESTS 44 311 17510400
100387661 shojin_pro C Dec. 4, 2020, 3:52 p.m. OK Java 8 TESTS 44 374 0
100385188 tejram C Dec. 4, 2020, 3:16 p.m. OK Java 8 TESTS 44 389 0
100381732 gagan_6730 C Dec. 4, 2020, 3:01 p.m. OK Java 8 TESTS 44 405 17715200
100374151 Scotty_pwnz C Dec. 4, 2020, 2:25 p.m. OK Kotlin TESTS 44 327 8806400
100374955 sylvyrfysh C Dec. 4, 2020, 2:28 p.m. OK Kotlin TESTS 44 452 39014400
100380969 koper C Dec. 4, 2020, 2:57 p.m. OK Kotlin TESTS 44 654 6860800
100396976 11001101 C Dec. 4, 2020, 6:05 p.m. OK Kotlin TESTS 44 2355 11161600
100371808 dandoh C Dec. 4, 2020, 2:12 p.m. OK Kotlin TESTS 44 2433 27136000
100380358 Tampere C Dec. 4, 2020, 2:54 p.m. OK MS C++ TESTS 44 576 16384000
100384704 dddttdCF C Dec. 4, 2020, 3:14 p.m. OK MS C++ 2017 TESTS 44 109 16588800
100372578 Aleksander C Dec. 4, 2020, 2:17 p.m. OK MS C++ 2017 TESTS 44 109 32460800
100381381 samcpp C Dec. 4, 2020, 3 p.m. OK MS C++ 2017 TESTS 44 124 6041600
100378178 hotpepsi C Dec. 4, 2020, 2:44 p.m. OK MS C++ 2017 TESTS 44 155 13414400
100378774 youx C Dec. 4, 2020, 2:47 p.m. OK MS C++ 2017 TESTS 44 202 75468800
100408552 agctXY C Dec. 5, 2020, 12:27 a.m. OK MS C++ 2017 TESTS 44 202 77619200
100379146 seoungjun C Dec. 4, 2020, 2:49 p.m. OK MS C++ 2017 TESTS 44 234 16076800
100376216 Stevewy C Dec. 4, 2020, 2:35 p.m. OK MS C++ 2017 TESTS 44 280 326246400
100378691 JackieLee C Dec. 4, 2020, 2:47 p.m. OK MS C++ 2017 TESTS 44 311 148787200
100408594 oneskovic C Dec. 5, 2020, 12:30 a.m. OK MS C++ 2017 TESTS 44 405 10035200
100388668 MyEighthName C Dec. 4, 2020, 4:04 p.m. OK .NET Core C# TESTS 44 514 28467200
100371580 G4NP0N C Dec. 4, 2020, 2:11 p.m. OK .NET Core C# TESTS 44 592 15872000
100374234 Mukundan314 C Dec. 4, 2020, 2:25 p.m. OK PyPy 2 TESTS 44 701 26009600
100376771 hxu10 C Dec. 4, 2020, 2:38 p.m. OK PyPy 2 TESTS 44 811 9318400
100371165 shehebe C Dec. 4, 2020, 2:09 p.m. OK PyPy 2 TESTS 44 826 8704000
100376798 Gaurav1 C Dec. 4, 2020, 2:38 p.m. OK PyPy 2 TESTS 44 2448 21913600
100383487 rishabnahar2025 C Dec. 4, 2020, 3:09 p.m. OK PyPy 2 TESTS 44 2917 126054400
100387849 jimm89 C Dec. 4, 2020, 3:53 p.m. OK PyPy 3 TESTS 44 763 27648000
100378466 vermakunal088 C Dec. 4, 2020, 2:45 p.m. OK PyPy 3 TESTS 44 795 28979200
100395066 nickdiazarmy209 C Dec. 4, 2020, 5:31 p.m. OK PyPy 3 TESTS 44 888 23756800
100402843 silvertint C Dec. 4, 2020, 8:04 p.m. OK PyPy 3 TESTS 44 888 26316800
100396438 2019ucp1350 C Dec. 4, 2020, 5:55 p.m. OK PyPy 3 TESTS 44 889 22937600
100379305 titia C Dec. 4, 2020, 2:50 p.m. OK PyPy 3 TESTS 44 935 12595200
100392463 djm03178 C Dec. 4, 2020, 4:52 p.m. OK PyPy 3 TESTS 44 951 25600000
100395019 nickdiazarmy209 C Dec. 4, 2020, 5:31 p.m. OK PyPy 3 TESTS 44 982 23756800
100397292 sh1194 C Dec. 4, 2020, 6:11 p.m. OK PyPy 3 TESTS 44 997 12083200
100394922 erickjohnross C Dec. 4, 2020, 5:29 p.m. OK PyPy 3 TESTS 44 997 58265600
100378337 ia7ck C Dec. 4, 2020, 2:45 p.m. OK Rust TESTS 44 171 17408000
100376819 cotton100pc C Dec. 4, 2020, 2:38 p.m. OK Rust TESTS 44 187 55603200
100383811 quickn_babo C Dec. 4, 2020, 3:11 p.m. OK Rust TESTS 44 623 17612800
100388686 optozorax C Dec. 4, 2020, 4:04 p.m. OK Rust TESTS 44 1404 8806400

remove filters

Back to search problems