Codeforces Round 789 (Div. 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
1677 Codeforces Round 789 (Div. 1) FINISHED False 7200 85245863 May 8, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4268 ) B Tokitsukaze and Meeting PROGRAMMING implementation math

B'Tokitsukaze is arranging a meeting. There are n rows and m columns of seats in the meeting hall. There are exactly n cdot m students attending the meeting, including several naughty students and several serious students. The students are numerated from 1 to n cdot m . The students will enter the meeting hall in order. When the i -th student enters the meeting hall, he will sit in the 1 -st column of the 1 -st row, and the students who are already seated will move back one seat. Specifically, the student sitting in the j -th ( 1 <= q j <= q m-1 ) column of the i -th row will move to the (j+1) -th column of the i -th row, and the student sitting in m -th column of the i -th row will move to the 1 -st column of the (i+1) -th row. For example, there is a meeting hall with 2 rows and 2 columns of seats shown as below: There will be 4 students entering the meeting hall in order, represented as a binary string "1100", of which '0 ' represents naughty students and '1 ' represents serious students. The changes of seats in the meeting hall are as follows: Denote a row or a column good if and only if there is at least one serious student in this row or column. Please predict the number of good rows and columns just after the i -th student enters the meeting hall, for all i . The first contains a single positive integer t ( 1 <= q t <= q 10 ,000 ) -- the number of test cases. For each test case, the first line contains two integers n , m ( 1 <= q n,m <= q 10^6 ; 1 <= q n cdot m <= q 10^6 ), denoting there are n rows and m columns of seats in the meeting hall. The second line contains a binary string s of length n cdot m , consisting only of zeros and ones. If s_i equal to '0 ' represents the i -th student is a naughty student, and s_i equal to '1 ' represents the i -th student is '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
156314397 Gassa B May 8, 2022, 3:01 p.m. OK D TESTS 75 249 37683200
156325028 chro4896 B May 8, 2022, 3:24 p.m. OK GNU C11 TESTS 75 358 24985600
156370885 Suiseiseki B May 9, 2022, 12:26 a.m. OK GNU C++14 TESTS 75 155 6041600
156314391 temp06 B May 8, 2022, 3:01 p.m. OK GNU C++14 TESTS 75 155 9011200
156355705 Code937 B May 8, 2022, 6:10 p.m. OK GNU C++14 TESTS 75 155 13004800
156375934 yanchengzhi B May 9, 2022, 2:40 a.m. OK GNU C++14 TESTS 75 155 16998400
156322642 yoohuu B May 8, 2022, 3:18 p.m. OK GNU C++14 TESTS 75 156 6041600
156312875 Eric_hooo B May 8, 2022, 2:59 p.m. OK GNU C++14 TESTS 75 156 13004800
156355554 Code937 B May 8, 2022, 6:08 p.m. OK GNU C++14 TESTS 75 156 14028800
156331811 ngpin04 B May 8, 2022, 3:42 p.m. OK GNU C++14 TESTS 75 170 11161600
156312726 LZDQ B May 8, 2022, 2:58 p.m. OK GNU C++14 TESTS 75 171 6041600
156324020 Milesian B May 8, 2022, 3:21 p.m. OK GNU C++14 TESTS 75 171 6041600
156319091 machhra B May 8, 2022, 3:10 p.m. OK GNU C++17 TESTS 75 155 5529600
156311114 subscriber B May 8, 2022, 2:56 p.m. OK GNU C++17 TESTS 75 155 9113600
156333022 Sofapuden B May 8, 2022, 3:46 p.m. OK GNU C++17 TESTS 75 155 9113600
156354545 altgifted B May 8, 2022, 5:56 p.m. OK GNU C++17 TESTS 75 156 5222400
156316507 chuchu B May 8, 2022, 3:05 p.m. OK GNU C++17 TESTS 75 156 20070400
156318155 MadProgrammer B May 8, 2022, 3:08 p.m. OK GNU C++17 TESTS 75 170 5222400
156334884 lxyb B May 8, 2022, 3:51 p.m. OK GNU C++17 TESTS 75 170 6041600
156324567 pill B May 8, 2022, 3:23 p.m. OK GNU C++17 TESTS 75 170 14131200
156313344 _dlbm17 B May 8, 2022, 2:59 p.m. OK GNU C++17 TESTS 75 170 16998400
156353422 int_jim B May 8, 2022, 5:43 p.m. OK GNU C++17 TESTS 75 170 16998400
156301220 QAQAutoMaton B May 8, 2022, 2:43 p.m. OK GNU C++17 (64) TESTS 75 46 13312000
156311898 Juanzhang B May 8, 2022, 2:57 p.m. OK GNU C++17 (64) TESTS 75 109 32665600
156316602 Kude B May 8, 2022, 3:05 p.m. OK GNU C++17 (64) TESTS 75 124 7065600
156352542 Kirill22 B May 8, 2022, 5:34 p.m. OK GNU C++17 (64) TESTS 75 124 14131200
156319191 ttttan B May 8, 2022, 3:11 p.m. OK GNU C++17 (64) TESTS 75 139 10137600
156322022 TheeLooser B May 8, 2022, 3:17 p.m. OK GNU C++17 (64) TESTS 75 139 10137600
156306116 CodigoL B May 8, 2022, 2:49 p.m. OK GNU C++17 (64) TESTS 75 139 10240000
156309256 Xellos B May 8, 2022, 2:53 p.m. OK GNU C++17 (64) TESTS 75 139 11161600
156318161 Lawali B May 8, 2022, 3:08 p.m. OK GNU C++17 (64) TESTS 75 139 14131200
156306737 mango_lassi B May 8, 2022, 2:49 p.m. OK GNU C++17 (64) TESTS 75 139 14131200
156311950 Vercingetorix B May 8, 2022, 2:57 p.m. OK GNU C++20 (64) TESTS 75 62 17612800
156305970 maspy B May 8, 2022, 2:49 p.m. OK GNU C++20 (64) TESTS 75 62 21811200
156312709 liouzhou_101 B May 8, 2022, 2:58 p.m. OK GNU C++20 (64) TESTS 75 77 24576000
156362153 NK_ B May 8, 2022, 7:52 p.m. OK GNU C++20 (64) TESTS 75 78 29491200
156324501 joelau B May 8, 2022, 3:22 p.m. OK GNU C++20 (64) TESTS 75 92 10137600
156312841 Uanogcdp B May 8, 2022, 2:59 p.m. OK GNU C++20 (64) TESTS 75 93 6144000
156353159 smax B May 8, 2022, 5:40 p.m. OK GNU C++20 (64) TESTS 75 93 6144000
156319226 atoiz B May 8, 2022, 3:11 p.m. OK GNU C++20 (64) TESTS 75 93 7168000
156351091 maxplus B May 8, 2022, 5:24 p.m. OK GNU C++20 (64) TESTS 75 93 10137600
156339847 jerdno B May 8, 2022, 4:07 p.m. OK GNU C++20 (64) TESTS 75 93 10137600
156323340 knightL B May 8, 2022, 3:20 p.m. OK Java 11 TESTS 75 326 6451200
156328503 yehara B May 8, 2022, 3:33 p.m. OK Java 11 TESTS 75 389 11468800
156325344 fetetriste B May 8, 2022, 3:25 p.m. OK Java 8 TESTS 75 265 5427200
156384353 sharpen B May 9, 2022, 5:50 a.m. OK Java 8 TESTS 75 280 2560000
156333435 megaspazz B May 8, 2022, 3:47 p.m. OK Java 8 TESTS 75 280 10035200
156322580 AndreySiunov B May 8, 2022, 3:18 p.m. OK Java 8 TESTS 75 295 8704000
156322761 DumplingLife B May 8, 2022, 3:18 p.m. OK Java 8 TESTS 75 327 4710400
156327002 golions B May 8, 2022, 3:29 p.m. OK Java 8 TESTS 75 358 47820800
156320673 SecondThread B May 8, 2022, 3:14 p.m. OK Java 8 TESTS 75 389 104448000
156330086 DarLam B May 8, 2022, 3:37 p.m. OK Java 8 TESTS 75 577 16384000
156307460 Tlatoani B May 8, 2022, 2:50 p.m. OK Kotlin 1.4 TESTS 75 218 52019200
156317395 Hakiobo B May 8, 2022, 3:07 p.m. OK Kotlin 1.4 TESTS 75 311 3993600
156311893 arvindf232 B May 8, 2022, 2:57 p.m. OK Kotlin 1.4 TESTS 75 358 37478400
156335103 r57shell B May 8, 2022, 3:52 p.m. OK MS C++ 2017 TESTS 75 280 16998400
156318968 machine_solution B May 8, 2022, 3:10 p.m. OK MS C++ 2017 TESTS 75 655 25395200
156330945 titia B May 8, 2022, 3:40 p.m. OK PyPy 3 TESTS 75 888 58777600
156352250 alex_mat B May 8, 2022, 5:32 p.m. OK PyPy 3 TESTS 75 888 91136000
156322924 whatshisbucket B May 8, 2022, 3:19 p.m. OK PyPy 3 TESTS 75 951 83148800
156343235 alexwice B May 8, 2022, 4:19 p.m. OK PyPy 3-64 TESTS 75 311 61132800
156321646 shobonvip B May 8, 2022, 3:16 p.m. OK PyPy 3-64 TESTS 75 358 100454400
156324219 siganai B May 8, 2022, 3:22 p.m. OK PyPy 3-64 TESTS 75 374 83558400
156353327 notTehlka B May 8, 2022, 5:42 p.m. OK PyPy 3-64 TESTS 75 561 47001600
156323275 notnotTehlka B May 8, 2022, 3:20 p.m. OK PyPy 3-64 TESTS 75 561 47001600
156335622 alex_mat B May 8, 2022, 3:54 p.m. OK PyPy 3-64 TESTS 75 654 69427200
156318842 FruminousBandersnatch B May 8, 2022, 3:10 p.m. OK PyPy 3-64 TESTS 75 873 106291200
156352927 taiga0629 B May 8, 2022, 5:38 p.m. OK PyPy 3-64 TESTS 75 904 150732800
156332267 huikang B May 8, 2022, 3:44 p.m. OK PyPy 3-64 TESTS 75 967 136806400
156320115 chinerist B May 8, 2022, 3:12 p.m. OK PyPy 3-64 TESTS 75 998 131072000
156312510 sansen B May 8, 2022, 2:58 p.m. OK Rust 2021 TESTS 75 78 28774400
156372010 Spheniscine B May 9, 2022, 1:08 a.m. OK Rust 2021 TESTS 75 108 22835200
156371875 Spheniscine B May 9, 2022, 1:04 a.m. OK Rust 2021 TESTS 75 108 22835200
156320504 Spheniscine B May 8, 2022, 3:13 p.m. OK Rust 2021 TESTS 75 109 22835200
156361179 clause B May 8, 2022, 7:34 p.m. OK Rust 2021 TESTS 75 155 7065600

remove filters

Back to search problems