Educational Codeforces Round 154 (Rated for 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
1861 Educational Codeforces Round 154 (Rated for Div. 2) FINISHED False 7200 38330699 Aug. 31, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 205 ) F Four Suits PROGRAMMING

B"The game of Berland poker is played as follows. There are n+1 people: n players, numbered from 1 to n , and the dealer. The dealer has a deck which contains cards of four different suits (the number of cards of each suit is not necessarily the same); the number of cards in the deck is divisible by n . The dealer gives all cards to the players, so that every player receives the same number of cards, and the whole deck is used. After the cards are dealt, every player chooses one of four suits (independently) and discards all cards from their hand which do not belong to their chosen suit. The winner of the game is the player with the maximum number of cards left in their hand. The number of points the winner receives is x - y , where x is the number of cards in the winner's hand, and y is the maximum number of cards among all other players; everyone else receives 0 points. Note that it means that if there are multiple players with the maximum number of cards, everyone receives 0 points. Since every player wants to maximize their odds to win, they will choose a suit with the maximum number of cards in their hand. Monocarp is the dealer. He has already given some cards to the players; the i -th player received a_{i,j} cards of suit j . Note that the number of cards in players' hands don't have to be the same at this moment. Monocarp has b_1, b_2, b_3, b_4 cards of suit 1, 2, 3, 4 respectively left in his deck. He has to give them to the players so that, after all cards are dealt, every player has the same number of cards. For each player, calculate the maximum number of points they can receive among all ways to deal the remaining cards according to the rules of the game. The first line of the input contains one integer n ( 2 <= n <= 5 cdot 10^4 ) -- the number of players. Then n lines follow. The i -th of them contains four integers a_{i,1}, a_{i,2},"...

Tutorials

Educational Codeforces Round 154 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
221366887 mdshakib2003. F Aug. 31, 2023, 5:47 p.m. OK GNU C++14 TESTS 49 1185 26419200
221369045 HuTao_Oya_OyaOya F Aug. 31, 2023, 6:07 p.m. OK GNU C++17 TESTS 49 2885 69529600
221393952 qiuzx F Sept. 1, 2023, 1:51 a.m. OK GNU C++20 (64) TESTS 49 468 33177600
221401682 chappy1 F Sept. 1, 2023, 4:20 a.m. OK GNU C++20 (64) TESTS 49 483 33382400
221403211 chappy1 F Sept. 1, 2023, 4:44 a.m. OK GNU C++20 (64) TESTS 49 561 33382400
221357428 Kude F Aug. 31, 2023, 4:42 p.m. OK GNU C++20 (64) TESTS 49 624 49971200
221360817 Mangooste F Aug. 31, 2023, 5:01 p.m. OK GNU C++20 (64) TESTS 49 2433 94822400
221387945 Ormlis F Aug. 31, 2023, 11:14 p.m. OK GNU C++20 (64) TESTS 49 3525 16076800

remove filters

Back to search problems