Codeforces Round 639 (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
1344 Codeforces Round 639 (Div. 1) FINISHED False 8100 148577111 May 6, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 457 ) F Piet's Palette PROGRAMMING matrices 3200

B'Piet Mondrian is an artist most famous for his minimalist works, consisting only of the four colors red, yellow, blue, and white. Most people attribute this to his style, but the truth is that his paint behaves in a very strange way where mixing two primary colors only produces another primary color! A sequence of primary colors (red, yellow, blue) is mixed as follows. While there are at least two colors, look at the first two. If they are distinct, replace them with the missing color. If they are the same, remove them from the sequence. In the end, if there is one color, that is the resulting color. Otherwise, if the sequence is empty, we say the resulting color is white. Here are two example mixings: Piet has a color palette with cells numbered from 1 to n . Each cell contains a primary color or is empty. Piet is very secretive, and will not share his palette with you, so you do not know what colors belong to each cell. However, he did perform k operations. There are four kinds of operations: Piet only tells you the list of operations he performs in chronological order, the indexes involved, and the resulting color of each mix operation. For each mix operation, you also know the order in which the cells are mixed. Given this information, determine the color of each cell in the initial palette. That is, you should find one possible state of the palette (before any operations were performed), or say that the described situation is impossible. The first line contains two integers n and k ( 1 <= n,k <= 1000 ) -- the number of cells in the palette and the number of operations, respectively. The next k lines describe the operations. The i -th line begins with the name of the i -th operation and an integer m ( 1 <= m <= n ) -- the number of indexes involved. Then follow m integers j_1, ldots,j_m ( 1 <= j_i <= n ) -- the indexes of the operation. It is guaranteed that all j_i '...

Tutorials

Codeforces Round #639 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
79336602 hos.lyric F May 8, 2020, 1:41 a.m. OK D TESTS 52 249 29388800 3200
79305736 rainboy F May 7, 2020, 4:03 p.m. OK GNU C11 TESTS 52 139 4300800 3200
79210903 rainboy F May 6, 2020, 9:58 p.m. OK GNU C11 TESTS 52 155 4300800 3200
79225204 yasugongshang F May 7, 2020, 3:31 a.m. OK GNU C++11 TESTS 52 78 4403200 3200
79342165 Lagoon_ F May 8, 2020, 4:08 a.m. OK GNU C++11 TESTS 52 124 4710400 3200
79382042 huhaoo F May 8, 2020, 1:29 p.m. OK GNU C++11 TESTS 52 124 5836800 3200
79395202 algodoer F May 8, 2020, 4 p.m. OK GNU C++11 TESTS 52 140 4710400 3200
79379615 jxdxhy F May 8, 2020, 12:57 p.m. OK GNU C++11 TESTS 52 280 4403200 3200
79241407 atoiz F May 7, 2020, 7:05 a.m. OK GNU C++11 TESTS 52 296 5017600 3200
79342674 QAQAutoMaton F May 8, 2020, 4:20 a.m. OK GNU C++14 TESTS 52 109 8499200 3200
79266382 Jayce132 F May 7, 2020, 12:02 p.m. OK GNU C++14 TESTS 52 156 4300800 3200
79395297 algodoer F May 8, 2020, 4:01 p.m. OK GNU C++14 TESTS 52 156 4710400 3200
79246608 skywalkert F May 7, 2020, 8:04 a.m. OK GNU C++14 TESTS 52 171 4198400 3200
79384333 jerome_wei F May 8, 2020, 1:57 p.m. OK GNU C++14 TESTS 52 171 4710400 3200
79422347 dongdziz F May 9, 2020, 12:18 a.m. OK GNU C++14 TESTS 52 186 4505600 3200
79303720 neal F May 7, 2020, 3:43 p.m. OK GNU C++17 TESTS 52 61 4915200 3200
79201012 tourist F May 6, 2020, 4:39 p.m. OK GNU C++17 TESTS 52 124 5017600 3200
79321158 Xellos F May 7, 2020, 7:20 p.m. OK GNU C++17 TESTS 52 140 4505600 3200
79335345 hos.lyric F May 8, 2020, 1 a.m. OK GNU C++17 TESTS 52 155 8396800 3200
79350622 superbigjuruo F May 8, 2020, 6:33 a.m. OK GNU C++17 TESTS 52 156 4300800 3200
79200845 paulica F May 6, 2020, 4:38 p.m. OK GNU C++17 TESTS 52 156 4403200 3200
79231953 Elegia F May 7, 2020, 5:17 a.m. OK GNU C++17 TESTS 52 171 4300800 3200
79214692 Monogon F May 6, 2020, 11:25 p.m. OK GNU C++17 TESTS 52 171 4300800 3200
79340808 lqs2015 F May 8, 2020, 3:35 a.m. OK GNU C++17 TESTS 52 171 4403200 3200
79340782 lqs2015 F May 8, 2020, 3:34 a.m. OK GNU C++17 TESTS 52 171 4403200 3200
79303439 neal F May 7, 2020, 3:41 p.m. OK GNU C++17 (64) TESTS 52 61 5427200 3200
79301898 neal F May 7, 2020, 3:25 p.m. OK GNU C++17 (64) TESTS 52 62 5427200 3200
79301956 neal F May 7, 2020, 3:26 p.m. OK GNU C++17 (64) TESTS 52 62 5427200 3200
79350655 superbigjuruo F May 8, 2020, 6:33 a.m. OK GNU C++17 (64) TESTS 52 108 4812800 3200
79301453 neal F May 7, 2020, 3:17 p.m. OK GNU C++17 (64) TESTS 52 109 5324800 3200
79207233 ecnerwala F May 6, 2020, 8:39 p.m. OK GNU C++17 (64) TESTS 52 109 5427200 3200
79303435 neal F May 7, 2020, 3:41 p.m. OK GNU C++17 (64) TESTS 52 109 5427200 3200
79199140 ksun48 F May 6, 2020, 4:26 p.m. OK GNU C++17 (64) TESTS 52 124 5427200 3200
79235108 gepardo F May 7, 2020, 5:58 a.m. OK GNU C++17 (64) TESTS 52 124 5529600 3200
79237209 maroonrk F May 7, 2020, 6:21 a.m. OK GNU C++17 (64) TESTS 52 139 5632000 3200

remove filters

Back to search problems