Bubble Cup 13 - Finals [Online Mirror, unrated, 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
1423 Bubble Cup 13 - Finals [Online Mirror, unrated, Div. 1] FINISHED False 10800 129920099 Oct. 5, 2020, 1:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 380 ) F Coins PROGRAMMING math

B'A famous gang of pirates, Sea Dogs, has come back to their hideout from one of their extravagant plunders. They want to split their treasure fairly amongst themselves, that is why You, their trusted financial advisor, devised a game to help them: All of them take a sit at their round table, some of them with the golden coins they have just stolen. At each iteration of the game if one of them has equal or more than 2 coins, he is eligible to the splitting and he gives one coin to each pirate sitting next to him. If there are more candidates (pirates with equal or more than 2 coins) then You are the one that chooses which one of them will do the splitting in that iteration. The game ends when there are no more candidates eligible to do the splitting. Pirates can call it a day, only when the game ends. Since they are beings with a finite amount of time at their disposal, they would prefer if the game that they are playing can end after finite iterations, and if so, they call it a good game. On the other hand, if no matter how You do the splitting, the game cannot end in finite iterations, they call it a bad game. Can You help them figure out before they start playing if the game will be good or bad? The first line of input contains two integer numbers n and k ( 1 <= n <= 10^{9} , 0 <= k <= 2 cdot10^5 ), where n denotes total number of pirates and k is the number of pirates that have any coins. The next k lines of input contain integers a_i and b_i ( 1 <= a_i <= n , 1 <= b_i <= 10^{9} ), where a_i denotes the index of the pirate sitting at the round table ( n and 1 are neighbours) and b_i the total number of coins that pirate a_i has at the start of the game. Print 1 if the game is a good game: There is a way to do the splitting so the game ends after finite number of iterations. Print -1 if the game is a bad game: No matter how You do the splitting t'...

Tutorials

FinalsEditorial2020.pdf

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
94811791 scimoon F Oct. 6, 2020, 12:45 a.m. OK GNU C++11 TESTS 35 46 3174400
94779150 C20191629 TiwAirOAO F Oct. 5, 2020, 2:27 p.m. OK GNU C++11 TESTS 35 46 7987200
94785145 zhangguangxuan99 F Oct. 5, 2020, 3:19 p.m. OK GNU C++11 TESTS 35 77 0
94790851 Pyqe F Oct. 5, 2020, 4:09 p.m. OK GNU C++11 TESTS 35 93 3174400
94793773 tzaph_ F Oct. 5, 2020, 4:50 p.m. OK GNU C++11 TESTS 35 608 0
94823014 sharabhagrawal25 F Oct. 6, 2020, 5:54 a.m. OK GNU C++14 TESTS 35 109 0
94789804 Kalptaru _baba_yaga Wernier F Oct. 5, 2020, 4 p.m. OK GNU C++14 TESTS 35 109 3174400
94803124 KostasKostil F Oct. 5, 2020, 7:35 p.m. OK GNU C++14 TESTS 35 140 6348800
94816470 sjcakioi F Oct. 6, 2020, 3:19 a.m. OK GNU C++14 TESTS 35 483 1638400
94816381 MagicSpark F Oct. 6, 2020, 3:17 a.m. OK GNU C++14 TESTS 35 483 1638400
94780113 Arg_007 _Ash__ Anachor F Oct. 5, 2020, 2:35 p.m. OK GNU C++17 TESTS 35 78 0
94807604 Pajaraja F Oct. 5, 2020, 9:26 p.m. OK GNU C++17 TESTS 35 93 0
94822660 st1vdy F Oct. 6, 2020, 5:48 a.m. OK GNU C++17 TESTS 35 108 0
94776168 Gom gs18115 Retro3014 F Oct. 5, 2020, 2:02 p.m. OK GNU C++17 TESTS 35 108 0
94773703 Amoo_Safar Atreus Shayan.P F Oct. 5, 2020, 1:44 p.m. OK GNU C++17 TESTS 35 109 0
94796213 nor F Oct. 5, 2020, 5:29 p.m. OK GNU C++17 TESTS 35 124 0
94784528 tourist F Oct. 5, 2020, 3:13 p.m. OK GNU C++17 TESTS 35 124 0
94781062 cuiaoxiang F Oct. 5, 2020, 2:43 p.m. OK GNU C++17 TESTS 35 124 0
94774655 wfgold kutcoder black_horse2014 F Oct. 5, 2020, 1:51 p.m. OK GNU C++17 TESTS 35 124 0
94773666 77o F Oct. 5, 2020, 1:43 p.m. OK GNU C++17 TESTS 35 124 0
94791230 liouzhou_101 F Oct. 5, 2020, 4:14 p.m. OK GNU C++17 (64) TESTS 35 31 2150400
94779778 QAQAutoMaton F Oct. 5, 2020, 2:32 p.m. OK GNU C++17 (64) TESTS 35 46 17100800
94820722 st1vdy F Oct. 6, 2020, 5:08 a.m. OK GNU C++17 (64) TESTS 35 62 0
94792722 rama_pang F Oct. 5, 2020, 4:34 p.m. OK GNU C++17 (64) TESTS 35 62 0
94786037 newbiegcz Itst Rubbish12345 F Oct. 5, 2020, 3:26 p.m. OK GNU C++17 (64) TESTS 35 62 0
94784483 wrinx F Oct. 5, 2020, 3:13 p.m. OK GNU C++17 (64) TESTS 35 62 32153600
94798336 L_I_Erq34 F Oct. 5, 2020, 6:03 p.m. OK GNU C++17 (64) TESTS 35 77 0
94791476 Maripium F Oct. 5, 2020, 4:17 p.m. OK GNU C++17 (64) TESTS 35 77 0
94789417 8-_-8 fake123 fedoseev.timofey F Oct. 5, 2020, 3:57 p.m. OK GNU C++17 (64) TESTS 35 77 0
94785733 hos.lyric maroonrk yosupo F Oct. 5, 2020, 3:24 p.m. OK GNU C++17 (64) TESTS 35 77 0
94781540 uwi F Oct. 5, 2020, 2:47 p.m. OK Java 11 TESTS 35 202 0
94787222 Kenb rabaiBomkarBittalBang Tlatoani F Oct. 5, 2020, 3:37 p.m. OK Java 8 TESTS 35 186 0
94781490 riantkb nuip mtsd F Oct. 5, 2020, 2:47 p.m. OK Mono C# TESTS 35 171 4608000
94772548 wow_ok conqueror_of_tourist FlakeLCR F Oct. 5, 2020, 1:34 p.m. OK PyPy 3 TESTS 35 248 12492800
94821774 generic_placeholder_name F Oct. 6, 2020, 5:30 a.m. OK PyPy 3 TESTS 35 249 12697600

remove filters

Back to search problems