Codeforces Global Round 8

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
1368 Codeforces Global Round 8 FINISHED False 9000 139331699 June 18, 2020, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 226 ) H2 Breadboard Capacity (hard version) PROGRAMMING

B'This is a harder version of the problem H with modification queries. Lester and Delbert work at an electronics company. They are currently working on a microchip component serving to connect two independent parts of a large supercomputer. The component is built on top of a breadboard -- a grid-like base for a microchip. The breadboard has n rows and m columns, and each row-column intersection contains a node. Also, on each side of the breadboard there are ports that can be attached to adjacent nodes. Left and right side have n ports each, and top and bottom side have m ports each. Each of the ports is connected on the outside to one of the parts bridged by the breadboard, and is colored red or blue respectively. Ports can be connected by wires going inside the breadboard. However, there are a few rules to follow: The capacity of the breadboard is the largest number of red-blue wire connections that can be made subject to the rules above. For example, the breadboard above has capacity 7 , and one way to make seven connections is pictured below. Up to this point statements of both versions are identical. Differences follow below. As is common, specifications of the project change a lot during development, so coloring of the ports is not yet fixed. There are q modifications to process, each of them has the form of "colors of all ports in a contiguous range along one of the sides are switched (red become blue, and blue become red)". All modifications are persistent, that is, the previous modifications are not undone before the next one is made. To estimate how bad the changes are, Lester and Delbert need to find the breadboard capacity after each change. Help them do this efficiently. The first line contains three integers n, m, q ( 1 <= q n, m <= q 10^5 , 0 <= q q <= q 10^5 ) -- the number of rows and columns of the breadboard, and the number of modifications respectively. The next four lines describe init'...

Tutorials

Codeforces Global Round 8: editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
84273720 Benq H2 June 18, 2020, 8:14 p.m. OK GNU C++17 TESTS 31 936 26214400
84283544 ecnerwala H2 June 19, 2020, 1:55 a.m. OK GNU C++17 (64) TESTS 31 248 28979200
84260842 KAN H2 June 18, 2020, 5:56 p.m. OK GNU C++17 (64) TESTS 31 546 50380800
84262602 Lewin H2 June 18, 2020, 6:09 p.m. OK Java 11 TESTS 31 1965 101683200

remove filters

Back to search problems