Codeforces Round 641 (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
1349 Codeforces Round 641 (Div. 1) FINISHED False 9000 142536299 May 12, 2020, 12:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 92 ) E Slime and Hats PROGRAMMING constructive algorithms dp greedy 3500

B'Slime and Orac are holding a turn-based game. In a big room, there are n players sitting on the chairs, looking forward to a column and each of them is given a number: player 1 sits in the front of the column, player 2 sits directly behind him; player 3 sits directly behind player 2 , and so on; player n sits directly behind player n-1 . Each player wears a hat that is either black or white. As each player faces forward, player i knows the color of player j 's hat if and only if i is larger than j . At the start of each turn, Orac will tell whether there exists a player wearing a black hat in the room. After Orac speaks, if the player can uniquely identify the color of his hat, he will put his hat on the chair, stand up and leave the room. All players are smart, so if it is possible to understand the color of their hat using the obtained information during this and previous rounds, they will understand it. In each turn, all players who know the color of their hats will leave at the same time in this turn, which means a player can only leave in the next turn if he gets to know the color of his hat only after someone left the room at this turn. Note that when the player needs to leave, he will put the hat on the chair before leaving, so the players ahead of him still cannot see his hat. The i -th player will know who exactly left the room among players 1,2, ldots,i-1 , and how many players among i+1,i+2, ldots,n have left the room. Slime stands outdoor. He watches the players walking out and records the numbers of the players and the time they get out. Unfortunately, Slime is so careless that he has only recorded some of the data, and this given data is in the format "player x leaves in the y -th round". Slime asked you to tell him the color of each player 's hat. If there are multiple solutions, you can find any of them. The first line contains a integer n (1 <= n '...

Tutorials

Codeforces Round #641 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
80856969 plux E May 21, 2020, 1:37 p.m. OK GNU C++11 TESTS 57 93 19763200 3500
79914116 DmitryGrigorev E May 12, 2020, 6:33 p.m. OK GNU C++14 TESTS 57 93 16691200 3500
80048144 cz_xuyixuan E May 14, 2020, 8:27 a.m. OK GNU C++14 TESTS 57 124 10649600 3500
80882501 TrinhXuanDat2000 E May 21, 2020, 7:05 p.m. OK GNU C++14 TESTS 57 124 20172800 3500
80239281 toxicecstasy E May 15, 2020, 3:20 p.m. OK GNU C++14 TESTS 57 124 23654400 3500
80824175 LiciaDu E May 21, 2020, 6:11 a.m. OK GNU C++14 TESTS 57 140 10649600 3500
80453542 BSBandme E May 17, 2020, 9:14 a.m. OK GNU C++14 TESTS 57 156 26931200 3500
80453651 BSBandme E May 17, 2020, 9:15 a.m. OK GNU C++14 TESTS 57 156 27033600 3500
79886501 ainta E May 12, 2020, 2:50 p.m. OK GNU C++14 TESTS 57 217 24371200 3500
80186600 includehdhd E May 15, 2020, 3:08 a.m. OK GNU C++17 TESTS 57 93 66764800 3500
79988626 receed E May 13, 2020, 2:18 p.m. OK GNU C++17 TESTS 57 108 25088000 3500
79941840 jiangly E May 13, 2020, 4:48 a.m. OK GNU C++17 TESTS 57 109 12390400 3500
81566555 Shuvro04 E May 26, 2020, 9:56 p.m. OK GNU C++17 TESTS 57 109 63283200 3500
80293447 rajatnagar E May 16, 2020, 8:13 a.m. OK GNU C++17 TESTS 57 124 26624000 3500
80069110 xgcxgc E May 14, 2020, 12:33 p.m. OK GNU C++17 TESTS 57 139 17612800 3500
80175859 cookiedoth E May 14, 2020, 9:24 p.m. OK GNU C++17 (64) TESTS 57 77 21708800 3500
79941528 jiangly E May 13, 2020, 4:42 a.m. OK GNU C++17 (64) TESTS 57 78 15257600 3500
80023736 Benq E May 14, 2020, 1:06 a.m. OK GNU C++17 (64) TESTS 57 78 29491200 3500
79929145 WZYYN E May 12, 2020, 11:45 p.m. OK GNU C++17 (64) TESTS 57 217 30822400 3500

remove filters

Back to search problems