Codeforces Round 804 (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
1699 Codeforces Round 804 (Div. 2) FINISHED False 7200 80321062 July 4, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 20092 ) B Almost Ternary Matrix PROGRAMMING 2-sat bitmasks constructive algorithms matrices

B'You are given two even integers n and m . Your task is to find any binary matrix a with n rows and m columns where every cell (i,j) has exactly two neighbours with a different value than a_{i,j} . Two cells in the matrix are considered neighbours if and only if they share a side. More formally, the neighbours of cell (x,y) are: (x-1,y) , (x,y+1) , (x+1,y) and (x,y-1) . It can be proven that under the given constraints, an answer always exists. Each test contains multiple test cases. The first line of input contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. The following lines contain the descriptions of the test cases. The only line of each test case contains two even integers n and m ( 2 <= n,m <= 50 ) -- the height and width of the binary matrix, respectively. For each test case, print n lines, each of which contains m numbers, equal to 0 or 1 -- any binary matrix which satisfies the constraints described in the statement. It can be proven that under the given constraints, an answer always exists. White means 0 , black means 1 . '...

Tutorials

Codeforces Round #804 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
162803030 szzz- B July 4, 2022, 4:18 p.m. OK C# 10 TESTS 4 46 5836800
162797724 artemijkurganov B July 4, 2022, 3:58 p.m. OK C# 10 TESTS 4 295 0
162796227 ruban B July 4, 2022, 3:53 p.m. OK Delphi TESTS 4 15 27238400
162815563 kpandey2803 B July 4, 2022, 5:54 p.m. OK GNU C11 TESTS 4 15 0
162802214 AJ_S003 B July 4, 2022, 4:14 p.m. OK GNU C11 TESTS 4 358 0
162801651 Abhishek_Tewatia B July 4, 2022, 4:12 p.m. OK GNU C11 TESTS 4 592 0
162799734 cbing B July 4, 2022, 4:05 p.m. OK GNU C11 TESTS 4 624 0
162806221 scottdavidjones360 B July 4, 2022, 4:29 p.m. OK GNU C11 TESTS 4 624 0
162812156 zwu2021016618 B July 4, 2022, 5:15 p.m. OK GNU C11 TESTS 4 639 0
162835449 Afzal_Hossan B July 5, 2022, midnight OK GNU C11 TESTS 4 639 0
162816591 harshdeepj B July 4, 2022, 6:07 p.m. OK GNU C11 TESTS 4 670 0
162800224 iniya_adhithya B July 4, 2022, 4:07 p.m. OK GNU C11 TESTS 4 685 0
162803155 yis B July 4, 2022, 4:18 p.m. OK GNU C++14 TESTS 4 0 0
162822081 Shady.scof B July 4, 2022, 7:19 p.m. OK GNU C++14 TESTS 4 0 0
162803919 morning-star B July 4, 2022, 4:21 p.m. OK GNU C++14 TESTS 4 0 0
162802522 sanchit_1605 B July 4, 2022, 4:15 p.m. OK GNU C++14 TESTS 4 0 0
162799150 jashwanth08 B July 4, 2022, 4:03 p.m. OK GNU C++14 TESTS 4 0 0
162798812 ZhanPJ B July 4, 2022, 4:02 p.m. OK GNU C++14 TESTS 4 0 0
162796373 kalashj93 B July 4, 2022, 3:54 p.m. OK GNU C++14 TESTS 4 0 0
162805905 chirag4520 B July 4, 2022, 4:28 p.m. OK GNU C++14 TESTS 4 0 102400
162799480 MaxwangCHN B July 4, 2022, 4:04 p.m. OK GNU C++14 TESTS 4 0 102400
162802948 911Boom B July 4, 2022, 4:17 p.m. OK GNU C++14 TESTS 4 0 4198400
162813315 djs100201 B July 4, 2022, 5:28 p.m. OK GNU C++17 TESTS 4 0 0
162832923 Mariam_1027 B July 4, 2022, 10:42 p.m. OK GNU C++17 TESTS 4 0 0
162832285 anant_jain_01 B July 4, 2022, 10:25 p.m. OK GNU C++17 TESTS 4 0 0
162820497 aquamarine B July 4, 2022, 6:58 p.m. OK GNU C++17 TESTS 4 0 0
162838345 apgpsoop B July 5, 2022, 1:18 a.m. OK GNU C++17 TESTS 4 0 0
162838396 dovanphuoc B July 5, 2022, 1:19 a.m. OK GNU C++17 TESTS 4 0 0
162848486 xiaopa18 B July 5, 2022, 4:15 a.m. OK GNU C++17 TESTS 4 0 0
162851205 gg_131102 B July 5, 2022, 5:04 a.m. OK GNU C++17 TESTS 4 0 0
162852329 _Subham24 B July 5, 2022, 5:22 a.m. OK GNU C++17 TESTS 4 0 0
162853949 Kartik020 B July 5, 2022, 5:46 a.m. OK GNU C++17 TESTS 4 0 0
162819499 Bhagavath B July 4, 2022, 6:42 p.m. OK GNU C++17 (64) TESTS 4 0 0
162840038 Messywind B July 5, 2022, 1:51 a.m. OK GNU C++17 (64) TESTS 4 0 0
162841826 bi_chen B July 5, 2022, 2:26 a.m. OK GNU C++17 (64) TESTS 4 0 0
162817660 ScarletS B July 4, 2022, 6:19 p.m. OK GNU C++17 (64) TESTS 4 0 0
162813473 PurpleCrayon B July 4, 2022, 5:30 p.m. OK GNU C++17 (64) TESTS 4 0 0
162811888 FAILURE. B July 4, 2022, 5:13 p.m. OK GNU C++17 (64) TESTS 4 0 0
162797466 ravager_23 B July 4, 2022, 3:57 p.m. OK GNU C++17 (64) TESTS 4 0 0
162796852 Mulhamadla B July 4, 2022, 3:55 p.m. OK GNU C++17 (64) TESTS 4 0 0
162796182 tcmmichaelb139 B July 4, 2022, 3:53 p.m. OK GNU C++17 (64) TESTS 4 0 0
162811922 MtSaka B July 4, 2022, 5:13 p.m. OK GNU C++17 (64) TESTS 4 0 204800
162837574 Zrian B July 5, 2022, 1:01 a.m. OK GNU C++20 (64) TESTS 4 0 0
162839049 Azalea05 B July 5, 2022, 1:32 a.m. OK GNU C++20 (64) TESTS 4 0 0
162840767 dipankar_2110 B July 5, 2022, 2:06 a.m. OK GNU C++20 (64) TESTS 4 0 0
162840949 Hxxj B July 5, 2022, 2:09 a.m. OK GNU C++20 (64) TESTS 4 0 0
162841928 smac B July 5, 2022, 2:28 a.m. OK GNU C++20 (64) TESTS 4 0 0
162843139 bijibenli B July 5, 2022, 2:48 a.m. OK GNU C++20 (64) TESTS 4 0 0
162846654 ZXX1141754930 B July 5, 2022, 3:44 a.m. OK GNU C++20 (64) TESTS 4 0 0
162847367 __Harsh__ B July 5, 2022, 3:56 a.m. OK GNU C++20 (64) TESTS 4 0 0
162848163 hoangviet1803 B July 5, 2022, 4:09 a.m. OK GNU C++20 (64) TESTS 4 0 0
162853996 HSLComeon B July 5, 2022, 5:47 a.m. OK GNU C++20 (64) TESTS 4 0 0
162796559 rlblaster B July 4, 2022, 3:54 p.m. OK Go TESTS 4 30 0
162831058 NToneE B July 4, 2022, 9:53 p.m. OK Haskell TESTS 4 93 0
162831277 NToneE B July 4, 2022, 9:58 p.m. OK Haskell TESTS 4 109 0
162803755 fareedaragab B July 4, 2022, 4:20 p.m. OK Java 11 TESTS 4 155 0
162842205 1364354238zxd B July 5, 2022, 2:33 a.m. OK Java 11 TESTS 4 156 0
162851862 x21svage B July 5, 2022, 5:15 a.m. OK Java 11 TESTS 4 171 0
162844216 satyaa_78 B July 5, 2022, 3:06 a.m. OK Java 11 TESTS 4 171 0
162809830 yudi23 B July 4, 2022, 4:56 p.m. OK Java 11 TESTS 4 171 0
162822898 tushar19280 B July 4, 2022, 7:31 p.m. OK Java 11 TESTS 4 186 0
162818804 anubhav44044 B July 4, 2022, 6:33 p.m. OK Java 11 TESTS 4 186 0
162812706 IanISam B July 4, 2022, 5:21 p.m. OK Java 11 TESTS 4 187 0
162846965 Hitesh_Ahuja B July 5, 2022, 3:49 a.m. OK Java 11 TESTS 4 202 0
162836736 yash13203 B July 5, 2022, 12:40 a.m. OK Java 11 TESTS 4 202 0
162796314 ak2041 B July 4, 2022, 3:53 p.m. OK Java 17 TESTS 4 171 0
162826405 Stirboy B July 4, 2022, 8:24 p.m. OK Java 17 TESTS 4 233 512000
162852442 morphsprit B July 5, 2022, 5:24 a.m. OK Java 17 TESTS 4 451 819200
162804718 SinghSaksham B July 4, 2022, 4:24 p.m. OK Java 17 TESTS 4 499 204800
162799703 headshot1703 B July 4, 2022, 4:05 p.m. OK Java 8 TESTS 4 93 0
162821235 Sussykin B July 4, 2022, 7:08 p.m. OK Java 8 TESTS 4 93 0
162812979 r3hab.rs B July 4, 2022, 5:24 p.m. OK Java 8 TESTS 4 109 0
162800544 Ghost_Fox_Sledgehammer B July 4, 2022, 4:08 p.m. OK Java 8 TESTS 4 109 0
162836584 MagentaCobra B July 5, 2022, 12:36 a.m. OK Java 8 TESTS 4 109 0
162803401 ne1tron B July 4, 2022, 4:19 p.m. OK Java 8 TESTS 4 124 0
162797548 aries.pratyush B July 4, 2022, 3:57 p.m. OK Java 8 TESTS 4 140 0
162849728 yaswanth_coder B July 5, 2022, 4:39 a.m. OK Java 8 TESTS 4 140 0
162816781 ScoobyDoobyDo B July 4, 2022, 6:09 p.m. OK Java 8 TESTS 4 140 0
162799175 toufique_husein B July 4, 2022, 4:03 p.m. OK Java 8 TESTS 4 155 0
162832858 qihnus B July 4, 2022, 10:40 p.m. OK Kotlin 1.6 TESTS 4 233 0
162797180 alitest B July 4, 2022, 3:56 p.m. OK Mono C# TESTS 4 561 3072000
162849696 Scvprogram B July 5, 2022, 4:38 a.m. OK MS C++ 2017 TESTS 4 15 0
162837003 BIg-P B July 5, 2022, 12:46 a.m. OK MS C++ 2017 TESTS 4 15 0
162846261 Nulor B July 5, 2022, 3:38 a.m. OK MS C++ 2017 TESTS 4 31 0
162841113 Killer_No.47 B July 5, 2022, 2:13 a.m. OK MS C++ 2017 TESTS 4 31 0
162802172 wsnbb1542 B July 4, 2022, 4:14 p.m. OK MS C++ 2017 TESTS 4 31 0
162801014 The_Chosen_One666 B July 4, 2022, 4:10 p.m. OK MS C++ 2017 TESTS 4 31 0
162806004 qweras B July 4, 2022, 4:29 p.m. OK MS C++ 2017 TESTS 4 46 0
162802150 lovelive__ B July 4, 2022, 4:14 p.m. OK MS C++ 2017 TESTS 4 62 0
162830866 rafi0 B July 4, 2022, 9:49 p.m. OK MS C++ 2017 TESTS 4 78 0
162805560 Levi__Ackerman B July 4, 2022, 4:27 p.m. OK MS C++ 2017 TESTS 4 78 0
162798396 kunwarabhayrai12345 B July 4, 2022, 4 p.m. OK Node.js TESTS 4 46 1945600
162804745 wojciechkomor B July 4, 2022, 4:24 p.m. OK Node.js TESTS 4 124 2867200
162829312 784 B July 4, 2022, 9:17 p.m. OK Perl TESTS 4 93 0
162829139 784 B July 4, 2022, 9:14 p.m. OK Perl TESTS 4 108 0
162837109 progin B July 5, 2022, 12:49 a.m. OK PHP TESTS 4 15 0
162804027 Preetmodh_13 B July 4, 2022, 4:22 p.m. OK PyPy 3 TESTS 4 124 3788800
162822857 YashNandwana B July 4, 2022, 7:31 p.m. OK PyPy 3 TESTS 4 155 6041600
162821853 aayush_chhabra B July 4, 2022, 7:16 p.m. OK PyPy 3 TESTS 4 155 8396800
162810889 WalrusRamen21 B July 4, 2022, 5:04 p.m. OK PyPy 3 TESTS 4 155 9216000
162821884 MohamedHamed123 B July 4, 2022, 7:17 p.m. OK PyPy 3 TESTS 4 156 9420800
162804423 NapoleonB B July 4, 2022, 4:23 p.m. OK PyPy 3 TESTS 4 171 7475200
162801286 rajn5181 B July 4, 2022, 4:11 p.m. OK PyPy 3 TESTS 4 171 8396800
162802752 Justin_Foley B July 4, 2022, 4:16 p.m. OK PyPy 3 TESTS 4 171 9318400
162821924 MohamedHamed123 B July 4, 2022, 7:17 p.m. OK PyPy 3 TESTS 4 171 9420800
162804671 egor-m08 B July 4, 2022, 4:24 p.m. OK PyPy 3 TESTS 4 171 9420800
162811110 escesare B July 4, 2022, 5:06 p.m. OK PyPy 3-64 TESTS 4 124 2969600
162834199 Ahmed_Turkman B July 4, 2022, 11:21 p.m. OK PyPy 3-64 TESTS 4 139 4300800
162840942 Youarenotgood B July 5, 2022, 2:09 a.m. OK PyPy 3-64 TESTS 4 139 5324800
162817501 LAAL21 B July 4, 2022, 6:18 p.m. OK PyPy 3-64 TESTS 4 140 2662400
162798062 alex391a B July 4, 2022, 3:59 p.m. OK PyPy 3-64 TESTS 4 155 2764800
162800058 wanglijie B July 4, 2022, 4:06 p.m. OK PyPy 3-64 TESTS 4 155 3276800
162826684 ossau_guildo B July 4, 2022, 8:29 p.m. OK PyPy 3-64 TESTS 4 155 3481600
162805802 Lolka555 B July 4, 2022, 4:28 p.m. OK PyPy 3-64 TESTS 4 155 4198400
162822441 ronitsingh B July 4, 2022, 7:24 p.m. OK PyPy 3-64 TESTS 4 155 4403200
162853285 bridgekiller B July 5, 2022, 5:36 a.m. OK PyPy 3-64 TESTS 4 155 4915200
162842537 OLOGY B July 5, 2022, 2:38 a.m. OK Python 2 TESTS 4 77 102400
162811145 Maltsev_Kir B July 4, 2022, 5:06 p.m. OK Python 3 TESTS 4 31 0
162833054 ranivorous B July 4, 2022, 10:46 p.m. OK Python 3 TESTS 4 46 0
162832367 michaleproff B July 4, 2022, 10:26 p.m. OK Python 3 TESTS 4 46 0
162809671 jahnavi_vardhineni B July 4, 2022, 4:55 p.m. OK Python 3 TESTS 4 46 0
162802381 B.Rutvik B July 4, 2022, 4:15 p.m. OK Python 3 TESTS 4 46 0
162798548 Baibars B July 4, 2022, 4:01 p.m. OK Python 3 TESTS 4 46 0
162798430 the_beginner28 B July 4, 2022, 4 p.m. OK Python 3 TESTS 4 46 0
162797716 Datsky B July 4, 2022, 3:58 p.m. OK Python 3 TESTS 4 46 0
162803231 HusseinFarhat B July 4, 2022, 4:18 p.m. OK Python 3 TESTS 4 61 0
162810941 ARobakidze B July 4, 2022, 5:04 p.m. OK Python 3 TESTS 4 62 0
162848286 Thallium54 B July 5, 2022, 4:11 a.m. OK Rust 2021 TESTS 4 15 0
162814717 LittleFall B July 4, 2022, 5:44 p.m. OK Rust 2021 TESTS 4 15 0
162814483 LittleFall B July 4, 2022, 5:42 p.m. OK Rust 2021 TESTS 4 15 0
162818980 liut B July 4, 2022, 6:35 p.m. OK Rust 2021 TESTS 4 31 102400

remove filters

Back to search problems