Codeforces Round 831 (Div. 1 + 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
1740 Codeforces Round 831 (Div. 1 + Div. 2) FINISHED False 9900 64788599 Oct. 29, 2022, 9:10 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 187 ) G Dangerous Laser Power PROGRAMMING constructive algorithms ds sortings 3100

B"Pak Chanek has an n x m grid of portals. The portal on the i -th row and j -th column is denoted as portal (i,j) . The portals (1,1) and (n,m) are on the north-west and south-east corner of the grid respectively. The portal (i,j) has two settings: When a laser enters face k of portal (i, j) with speed x_ text{in} , it leaves the portal going out of face (k+2+t_{i,j}) bmod 4 with speed x_ text{out} = max(x_ text{in},s_{i,j}) . The portal also has to consume x_ text{out} - x_ text{in} units of energy. Pak Chanek is very bored today. He will shoot 4nm lasers with an initial speed of 1 , one into each face of each portal. Each laser will travel throughout this grid of portals until it moves outside the grid or it has passed through 10^{100} portals. At the end, Pak Chanek thinks that a portal is good if and only if the total energy consumed by that portal modulo 2 is equal to its type. Given the strength settings of all portals, find a way to assign the type settings of each portal such that the number of good portals is maximised. The first line contains two integers n and m ( 1 <= n, m <= 1000 ) -- the number of rows and columns in the grid. The i -th of the next n lines contains m integers, with the j -th integer being s_{i,j} ( 1 <= q s_{i,j} <= q 10^9 ) -- the strength of portal (i, j) . Print n lines with each line containing a string of length m consisting of characters 0 or 1 representing the type settings. The j -th character in the i -th string is the type setting of portal (i, j) . If there are multiple solutions, you can output any of them. In the first example, let's consider the laser Pak Chanek shoots into face 1 of portal (2, 2) . The laser travels as follows: The illustration of the travel of the laser above is as follows. As an examp"...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
178390099 RGB_ICPC1 G Oct. 29, 2022, 11:39 a.m. OK GNU C++14 TESTS 43 1886 68096000 3100
178391606 2018gtyz10 G Oct. 29, 2022, 11:44 a.m. OK GNU C++14 TESTS 43 1949 276582400 3100
178410865 sd0061 G Oct. 29, 2022, 1:55 p.m. OK GNU C++17 TESTS 43 982 72089600 3100
178430733 Savelij G Oct. 29, 2022, 4:37 p.m. OK GNU C++17 TESTS 43 1091 100044800 3100
178389960 mango_lassi G Oct. 29, 2022, 11:39 a.m. OK GNU C++17 TESTS 43 1122 96153600 3100
178457114 hitonanode G Oct. 29, 2022, 9:56 p.m. OK GNU C++17 TESTS 43 1325 50380800 3100
178452315 Radewoosh G Oct. 29, 2022, 8:22 p.m. OK GNU C++17 TESTS 43 2995 303718400 3100
178390073 Xellos G Oct. 29, 2022, 11:39 a.m. OK GNU C++17 (64) TESTS 43 966 64819200 3100
178457069 hitonanode G Oct. 29, 2022, 9:55 p.m. OK GNU C++17 (64) TESTS 43 1107 50790400 3100
178456881 hitonanode G Oct. 29, 2022, 9:51 p.m. OK GNU C++17 (64) TESTS 43 1122 50790400 3100
178456598 hitonanode G Oct. 29, 2022, 9:45 p.m. OK GNU C++17 (64) TESTS 43 1637 98201600 3100
178429073 maxplus G Oct. 29, 2022, 4:32 p.m. OK GNU C++20 (64) TESTS 43 327 41779200 3100
178399239 maxplus G Oct. 29, 2022, 12:38 p.m. OK GNU C++20 (64) TESTS 43 451 42700800 3100
178398964 maxplus G Oct. 29, 2022, 12:37 p.m. OK GNU C++20 (64) TESTS 43 483 42700800 3100
178398319 maxplus G Oct. 29, 2022, 12:34 p.m. OK GNU C++20 (64) TESTS 43 608 42496000 3100
178420520 Aaeria G Oct. 29, 2022, 3:15 p.m. OK GNU C++20 (64) TESTS 43 732 246272000 3100
178403355 alvingogo G Oct. 29, 2022, 12:59 p.m. OK GNU C++20 (64) TESTS 43 873 100556800 3100
178390136 maroonrk G Oct. 29, 2022, 11:39 a.m. OK GNU C++20 (64) TESTS 43 920 128819200 3100
178451482 A_G G Oct. 29, 2022, 8:10 p.m. OK GNU C++20 (64) TESTS 43 1028 146534400 3100
178457090 hitonanode G Oct. 29, 2022, 9:55 p.m. OK GNU C++20 (64) TESTS 43 1045 50790400 3100
178400524 tobias.glimmerfors G Oct. 29, 2022, 12:41 p.m. OK GNU C++20 (64) TESTS 43 1060 198860800 3100
178464575 sansen G Oct. 30, 2022, 2:28 a.m. OK Rust 2021 TESTS 43 857 328704000 3100

remove filters

Back to search problems