Codeforces Round 382 (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
735 Codeforces Round 382 (Div. 2) FINISHED False 7200 251558699 Nov. 27, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7537 ) C Tennis Championship PROGRAMMING combinatorics constructive algorithms greedy math 1700

B"Famous Brazil city Rio de Janeiro holds a tennis tournament and Ostap Bender doesn't want to miss this event. There will be n players participating, and the tournament will follow knockout rules from the very first game. That means, that if someone loses a game he leaves the tournament immediately. Organizers are still arranging tournament grid (i.e. the order games will happen and who is going to play with whom) but they have already fixed one rule: two players can play against each other only if the number of games one of them has already played differs by no more than one from the number of games the other one has already played. Of course, both players had to win all their games in order to continue participating in the tournament. Tournament hasn't started yet so the audience is a bit bored. Ostap decided to find out what is the maximum number of games the winner of the tournament can take part in (assuming the rule above is used). However, it is unlikely he can deal with this problem without your help. The only line of the input contains a single integer n (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891018) -- the number of players to participate in the tournament. Print the maximum number of games in which the winner of the tournament can take part. In all samples we consider that player number 1 is the winner. In the first sample, there would be only one game so the answer is 1. In the second sample, player 1 can consequently beat players 2 and 3. In the third sample, player 1 can't play with each other player as after he plays with players 2 and 3 he can't play against player 4, as he has 0 games played, while player 1 already played 2. Thus, the answer is 2 and to achieve we make pairs (1, xe2 x80 x892) and (3, xe2 x80 x894) and then clash the winners. "...

Tutorials

Codeforces Round #382 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
22592123 I_Love_Sasha_Golovach C Nov. 29, 2016, 6:40 a.m. OK Delphi TESTS 63 15 0 1700
29722771 GunDone C Aug. 24, 2017, 5:40 a.m. OK Delphi TESTS 63 15 102400 1700
23045997 StarScreamOwl C Dec. 17, 2016, 11:32 a.m. OK Delphi TESTS 63 15 102400 1700
22686581 longNH.IT17 C Dec. 3, 2016, 11:51 p.m. OK FPC TESTS 63 15 0 1700
23017476 romanfixture1404 C Dec. 15, 2016, 7:59 p.m. OK FPC TESTS 63 15 0 1700
23033021 Gray_58 C Dec. 16, 2016, 3:29 p.m. OK FPC TESTS 63 15 0 1700
27714586 KagamiharaNadeshiko C June 11, 2017, 4:09 a.m. OK FPC TESTS 63 15 0 1700
22642421 The_Unorthodox C Dec. 1, 2016, 2:57 p.m. OK FPC TESTS 63 15 0 1700
22629593 yan_lazy C Nov. 30, 2016, 6:32 p.m. OK FPC TESTS 63 15 0 1700
22644436 Zeron C Dec. 1, 2016, 4:45 p.m. OK FPC TESTS 63 15 0 1700
22606901 vladKB1 C Nov. 29, 2016, 5:15 p.m. OK FPC TESTS 63 15 0 1700
22654904 prosmgeorg C Dec. 2, 2016, 9:33 a.m. OK FPC TESTS 63 15 0 1700
22682958 tieuchanlong C Dec. 3, 2016, 6:35 p.m. OK FPC TESTS 63 15 0 1700
22641435 sumantra17 C Dec. 1, 2016, 2:14 p.m. OK GNU C TESTS 63 15 0 1700
23003018 jkxjkx1031 C Dec. 15, 2016, 10:16 a.m. OK GNU C TESTS 63 15 0 1700
22687696 849145427 C Dec. 4, 2016, 3:09 a.m. OK GNU C TESTS 63 15 0 1700
22677287 fsh317574518 C Dec. 3, 2016, 12:57 p.m. OK GNU C TESTS 63 15 0 1700
22616582 jugelizi C Nov. 30, 2016, 8:05 a.m. OK GNU C TESTS 63 15 0 1700
22615775 srijansingh C Nov. 30, 2016, 7:12 a.m. OK GNU C TESTS 63 15 0 1700
22595824 _AUR_ C Nov. 29, 2016, 10:09 a.m. OK GNU C TESTS 63 15 0 1700
22559256 yougaindra C Nov. 27, 2016, 8:04 p.m. OK GNU C TESTS 63 15 0 1700
22558283 rainboy C Nov. 27, 2016, 7:35 p.m. OK GNU C TESTS 63 15 0 1700
25702616 KinKong1 C March 22, 2017, 2:36 a.m. OK GNU C TESTS 63 15 1843200 1700
32574730 soroushsadeghi C Nov. 23, 2017, 12:20 p.m. OK GNU C++ TESTS 63 15 0 1700
32148296 vjudge3 C Nov. 8, 2017, 11:28 p.m. OK GNU C++ TESTS 63 15 0 1700
32140063 vjudge3 C Nov. 8, 2017, 12:54 p.m. OK GNU C++ TESTS 63 15 0 1700
32121188 vjudge5 C Nov. 7, 2017, 2 p.m. OK GNU C++ TESTS 63 15 0 1700
32085188 vjudge3 C Nov. 5, 2017, 11:17 p.m. OK GNU C++ TESTS 63 15 0 1700
32078754 vjudge3 C Nov. 5, 2017, 2:47 p.m. OK GNU C++ TESTS 63 15 0 1700
32071206 vjudge5 C Nov. 5, 2017, 8:32 a.m. OK GNU C++ TESTS 63 15 0 1700
32056057 vjudge5 C Nov. 4, 2017, 2:30 p.m. OK GNU C++ TESTS 63 15 0 1700
31330902 functionendless C Oct. 15, 2017, 6:43 a.m. OK GNU C++ TESTS 63 15 0 1700
30738182 sergio_delr C Sept. 26, 2017, 2:01 a.m. OK GNU C++ TESTS 63 15 0 1700
22576265 Ying_Zhixin C Nov. 28, 2016, 12:39 p.m. OK GNU C11 TESTS 63 15 0 1700
22565440 yashChandnani C Nov. 28, 2016, 6:15 a.m. OK GNU C11 TESTS 63 15 0 1700
22558851 dttzbjw C Nov. 27, 2016, 7:50 p.m. OK GNU C11 TESTS 63 15 0 1700
26758403 vjudge5 C April 30, 2017, 1:39 a.m. OK GNU C11 TESTS 63 15 1945600 1700
35751883 2017ccut_wuqishuo C Feb. 27, 2018, 5:20 a.m. OK GNU C11 TESTS 63 15 2048000 1700
22623209 somu1997 C Nov. 30, 2016, 12:26 p.m. OK GNU C11 TESTS 63 30 0 1700
45212789 vjudge1 C Nov. 2, 2018, 4:11 p.m. OK GNU C11 TESTS 63 31 0 1700
53567077 fuadul C April 30, 2019, 1:01 p.m. OK GNU C11 TESTS 63 31 0 1700
53566849 fuadul C April 30, 2019, 12:54 p.m. OK GNU C11 TESTS 63 31 0 1700
22838145 yp0701150222 C Dec. 9, 2016, 4:06 p.m. OK GNU C11 TESTS 63 31 819200 1700
30736011 UltimateSeiji C Sept. 25, 2017, 10:18 p.m. OK GNU C++11 TESTS 63 15 0 1700
32158147 alirezabgi C Nov. 9, 2017, 12:53 p.m. OK GNU C++11 TESTS 63 15 0 1700
32121170 ICEdbdbdb C Nov. 7, 2017, 1:59 p.m. OK GNU C++11 TESTS 63 15 0 1700
31127129 Quinas C Oct. 7, 2017, 7:52 p.m. OK GNU C++11 TESTS 63 15 0 1700
30746352 lerka C Sept. 26, 2017, 9:53 a.m. OK GNU C++11 TESTS 63 15 0 1700
30737313 sanchezand C Sept. 26, 2017, 12:47 a.m. OK GNU C++11 TESTS 63 15 0 1700
30736835 Arturo C Sept. 25, 2017, 11:50 p.m. OK GNU C++11 TESTS 63 15 0 1700
30736813 lewiserick C Sept. 25, 2017, 11:47 p.m. OK GNU C++11 TESTS 63 15 0 1700
30735948 anonbar C Sept. 25, 2017, 10:12 p.m. OK GNU C++11 TESTS 63 15 0 1700
30735459 anisca22 C Sept. 25, 2017, 9:32 p.m. OK GNU C++11 TESTS 63 15 0 1700
31959752 prince C Nov. 1, 2017, 6:14 p.m. OK GNU C++14 TESTS 63 15 0 1700
54564674 user909 C May 24, 2019, 3:44 p.m. OK GNU C++14 TESTS 63 15 0 1700
50255011 Even_You_Brutus... C Feb. 20, 2019, 7:10 p.m. OK GNU C++14 TESTS 63 15 0 1700
40409073 shubhu1596 C July 16, 2018, 11:30 a.m. OK GNU C++14 TESTS 63 15 0 1700
39196231 DeeaX99 C June 12, 2018, 3:56 p.m. OK GNU C++14 TESTS 63 15 0 1700
32360896 gio_bakradze C Nov. 16, 2017, 4:50 p.m. OK GNU C++14 TESTS 63 15 0 1700
32341355 EL_3AQ-Why_not C Nov. 15, 2017, 8:17 p.m. OK GNU C++14 TESTS 63 15 0 1700
32061815 NullByte C Nov. 4, 2017, 7:12 p.m. OK GNU C++14 TESTS 63 15 0 1700
32060991 Rtn_e C Nov. 4, 2017, 6:33 p.m. OK GNU C++14 TESTS 63 15 0 1700
31959926 dark_knight97 C Nov. 1, 2017, 6:22 p.m. OK GNU C++14 TESTS 63 15 0 1700
35492711 spiridonov.s.v C Feb. 19, 2018, 5:42 p.m. OK GNU C++17 TESTS 63 15 1843200 1700
36339960 vjudge5 C March 17, 2018, 2:30 a.m. OK GNU C++17 TESTS 63 15 4198400 1700
53497946 mohmahkho C April 29, 2019, 12:49 p.m. OK GNU C++17 TESTS 63 30 0 1700
53786646 sammithkanur C May 5, 2019, 10:31 a.m. OK GNU C++17 TESTS 63 30 0 1700
55694385 Micu C June 17, 2019, 8:20 p.m. OK GNU C++17 TESTS 63 30 0 1700
58042593 cse1737 C July 30, 2019, 8:30 p.m. OK GNU C++17 TESTS 63 30 0 1700
62655949 yuhta C Oct. 16, 2019, 1:37 a.m. OK GNU C++17 TESTS 63 30 0 1700
64343798 rkumar9648 C Nov. 6, 2019, 4:52 a.m. OK GNU C++17 TESTS 63 30 0 1700
65925802 Hoooly C Nov. 28, 2019, 6:14 p.m. OK GNU C++17 TESTS 63 30 0 1700
52792528 _kekus C April 15, 2019, 6:17 p.m. OK GNU C++17 TESTS 63 30 0 1700
22557055 haya14busa C Nov. 27, 2016, 7:16 p.m. OK Go TESTS 63 15 18124800 1700
22915765 Mr.Kutso C Dec. 12, 2016, 10:41 p.m. OK Go TESTS 63 31 18124800 1700
22599861 Twenty_Fifteen C Nov. 29, 2016, 1:44 p.m. OK Go TESTS 63 31 18124800 1700
22562360 miguelferreira108 C Nov. 28, 2016, 12:36 a.m. OK Haskell TESTS 63 15 8499200 1700
22562264 cynical C Nov. 28, 2016, 12:21 a.m. OK Java 8 TESTS 63 93 0 1700
29528194 Omegaxis213 C Aug. 17, 2017, 2:27 p.m. OK Java 8 TESTS 63 108 0 1700
22558517 kocko C Nov. 27, 2016, 7:41 p.m. OK Java 8 TESTS 63 108 0 1700
58984582 mennafadali C Aug. 18, 2019, 6:24 a.m. OK Java 8 TESTS 63 109 0 1700
59974273 sonusingh.nitaa C Sept. 4, 2019, 4:48 a.m. OK Java 8 TESTS 63 109 0 1700
56679974 amrfahmy_ C July 7, 2019, 5:44 p.m. OK Java 8 TESTS 63 109 0 1700
53267747 elkadymohammed01 C April 25, 2019, 3:27 a.m. OK Java 8 TESTS 63 109 0 1700
51750497 ivplay C March 23, 2019, 9:21 a.m. OK Java 8 TESTS 63 109 0 1700
31219328 ShafinKhadem C Oct. 11, 2017, 2:37 p.m. OK Java 8 TESTS 63 109 0 1700
27435410 Ajudiya_13 C May 29, 2017, 7:55 p.m. OK Java 8 TESTS 63 109 0 1700
30740053 jemsz95 C Sept. 26, 2017, 4:17 a.m. OK Kotlin TESTS 63 140 0 1700
41673563 Mickey-snow C Aug. 17, 2018, 6:46 a.m. OK Mono C# TESTS 63 46 0 1700
22559619 EvAn C Nov. 27, 2016, 8:19 p.m. OK Mono C# TESTS 63 46 102400 1700
51315090 nemars C March 14, 2019, 11 p.m. OK Mono C# TESTS 63 62 0 1700
22571089 pomjuice C Nov. 28, 2016, 10:37 a.m. OK MS C# TESTS 63 46 0 1700
30738437 JuanCarlosGI C Sept. 26, 2017, 2:21 a.m. OK MS C# TESTS 63 46 0 1700
22665988 bloodbound C Dec. 2, 2016, 8:59 p.m. OK MS C# TESTS 63 46 0 1700
22682228 supachawal.kullanansiri C Dec. 3, 2016, 5:53 p.m. OK MS C# TESTS 63 46 102400 1700
22682245 supachawal.kullanansiri C Dec. 3, 2016, 5:54 p.m. OK MS C# TESTS 63 46 102400 1700
26319906 Sorryforpartyrocking C April 12, 2017, 2:36 p.m. OK MS C# TESTS 63 46 9011200 1700
22558618 markelof C Nov. 27, 2016, 7:44 p.m. OK MS C# TESTS 63 61 102400 1700
22553261 mdarefull C Nov. 27, 2016, 6:19 p.m. OK MS C# TESTS 63 61 8806400 1700
22580569 og.kostya C Nov. 28, 2016, 3:59 p.m. OK MS C# TESTS 63 62 0 1700
27008477 xietx C May 11, 2017, 8:18 a.m. OK MS C# TESTS 63 62 2457600 1700
22640175 vjudge1 C Dec. 1, 2016, 1:13 p.m. OK MS C++ TESTS 63 15 0 1700
23001625 LyingLin0808 C Dec. 15, 2016, 9:08 a.m. OK MS C++ TESTS 63 15 0 1700
22856364 vjudge3 C Dec. 10, 2016, 1:17 p.m. OK MS C++ TESTS 63 15 0 1700
22732021 Cowboy_lee C Dec. 6, 2016, 2:05 p.m. OK MS C++ TESTS 63 15 0 1700
22726954 Jason_Lee C Dec. 6, 2016, 9:36 a.m. OK MS C++ TESTS 63 15 0 1700
22713606 RomanDisease C Dec. 5, 2016, 2:28 p.m. OK MS C++ TESTS 63 15 0 1700
22690418 vjudge2 C Dec. 4, 2016, 7:37 a.m. OK MS C++ TESTS 63 15 0 1700
22688130 VoGia C Dec. 4, 2016, 4:20 a.m. OK MS C++ TESTS 63 15 0 1700
22671055 t51645 C Dec. 3, 2016, 7:25 a.m. OK MS C++ TESTS 63 15 0 1700
22613614 JC_Kiraa C Nov. 30, 2016, 4:06 a.m. OK MS C++ TESTS 63 15 0 1700
62347611 Arhimond1998 C Oct. 11, 2019, 8:12 a.m. OK MS C++ 2017 TESTS 63 31 0 1700
55955052 bansalkanha68 C June 23, 2019, 6:25 a.m. OK MS C++ 2017 TESTS 63 31 16076800 1700
57002261 vjudge3 C July 14, 2019, 4:35 a.m. OK MS C++ 2017 TESTS 63 46 3174400 1700
22595300 mayakin C Nov. 29, 2016, 9:38 a.m. OK PHP TESTS 63 31 0 1700
22560898 Trunks C Nov. 27, 2016, 9:41 p.m. OK PyPy 2 TESTS 63 62 0 1700
22630146 bhumkong C Nov. 30, 2016, 7:05 p.m. OK PyPy 2 TESTS 63 62 0 1700
22561971 abhigupta4 C Nov. 27, 2016, 11:41 p.m. OK PyPy 2 TESTS 63 62 0 1700
22561633 aayush.shah15 C Nov. 27, 2016, 10:56 p.m. OK PyPy 2 TESTS 63 62 0 1700
22561611 aayush.shah15 C Nov. 27, 2016, 10:55 p.m. OK PyPy 2 TESTS 63 77 0 1700
22557506 GTmac C Nov. 27, 2016, 7:21 p.m. OK PyPy 2 TESTS 63 77 0 1700
22556944 SVK.Jr C Nov. 27, 2016, 7:15 p.m. OK PyPy 2 TESTS 63 77 0 1700
22781109 Yash_ C Dec. 7, 2016, 9:13 a.m. OK PyPy 2 TESTS 63 77 22016000 1700
43911049 vjudge2 C Oct. 6, 2018, 4:13 p.m. OK PyPy 2 TESTS 63 124 0 1700
37672271 kevinsogo C April 27, 2018, 9:11 p.m. OK PyPy 2 TESTS 63 140 22835200 1700
22553597 SimonR C Nov. 27, 2016, 6:21 p.m. OK PyPy 3 TESTS 63 93 23347200 1700
22557072 Vosatorp C Nov. 27, 2016, 7:16 p.m. OK PyPy 3 TESTS 63 109 0 1700
22552856 kishertka C Nov. 27, 2016, 6:16 p.m. OK PyPy 3 TESTS 63 109 23552000 1700
22602805 SirNickolas C Nov. 29, 2016, 4:03 p.m. OK PyPy 3 TESTS 63 124 0 1700
58548365 XOR-star C Aug. 10, 2019, 6:04 p.m. OK PyPy 3 TESTS 63 124 102400 1700
54994972 IngaleAnkur10 C June 2, 2019, 10:08 p.m. OK PyPy 3 TESTS 63 139 0 1700
69093003 MegaOwIer C Jan. 19, 2020, 10:55 a.m. OK PyPy 3 TESTS 63 140 0 1700
68332146 beethoven97 C Jan. 6, 2020, 7:22 p.m. OK PyPy 3 TESTS 63 140 0 1700
56171447 sawhil C June 27, 2019, 4:48 p.m. OK PyPy 3 TESTS 63 140 0 1700
22815706 _CHUCK_ C Dec. 8, 2016, 4:52 p.m. OK PyPy 3 TESTS 63 140 0 1700
22668457 ekzhang C Dec. 3, 2016, 3:31 a.m. OK Python 2 TESTS 63 46 0 1700
26279008 ethanjimenez C April 10, 2017, 6:14 p.m. OK Python 2 TESTS 63 46 4710400 1700
22725679 liwen C Dec. 6, 2016, 8:18 a.m. OK Python 2 TESTS 63 61 0 1700
22661940 SergiiKo C Dec. 2, 2016, 4:50 p.m. OK Python 2 TESTS 63 61 0 1700
22562837 muntasir C Nov. 28, 2016, 1:53 a.m. OK Python 2 TESTS 63 61 0 1700
22562722 thepotatoranch C Nov. 28, 2016, 1:34 a.m. OK Python 2 TESTS 63 61 0 1700
22561642 aayush.shah15 C Nov. 27, 2016, 10:57 p.m. OK Python 2 TESTS 63 61 0 1700
22558818 maiquynhtruong C Nov. 27, 2016, 7:49 p.m. OK Python 2 TESTS 63 61 0 1700
22806330 k1e13 C Dec. 8, 2016, 9:46 a.m. OK Python 2 TESTS 63 61 4608000 1700
22553734 fgt C Nov. 27, 2016, 6:22 p.m. OK Python 2 TESTS 63 61 4608000 1700
22590019 soto_nlp C Nov. 29, 2016, 2:44 a.m. OK Python 3 TESTS 63 46 0 1700
22557987 hikky.programming.thread C Nov. 27, 2016, 7:29 p.m. OK Python 3 TESTS 63 46 0 1700
30732696 EliasMera C Sept. 25, 2017, 4:21 p.m. OK Python 3 TESTS 63 61 0 1700
22557336 iSerya C Nov. 27, 2016, 7:19 p.m. OK Python 3 TESTS 63 61 0 1700
32506065 kuluso97 C Nov. 20, 2017, 4:34 p.m. OK Python 3 TESTS 63 62 0 1700
30738400 EduardoHi C Sept. 26, 2017, 2:18 a.m. OK Python 3 TESTS 63 62 0 1700
30735972 davila.jose23 C Sept. 25, 2017, 10:14 p.m. OK Python 3 TESTS 63 62 0 1700
30735945 julio177 C Sept. 25, 2017, 10:12 p.m. OK Python 3 TESTS 63 62 0 1700
29842595 jjgjhgjh C Aug. 28, 2017, 9:55 a.m. OK Python 3 TESTS 63 62 0 1700
29682815 MrMorning C Aug. 22, 2017, 12:41 p.m. OK Python 3 TESTS 63 62 0 1700
22592717 Xquare C Nov. 29, 2016, 7:28 a.m. OK Ruby TESTS 63 62 0 1700
22590024 TurtleShip C Nov. 29, 2016, 2:45 a.m. OK Ruby TESTS 63 62 0 1700
22560034 yury.dymov C Nov. 27, 2016, 8:41 p.m. OK Ruby TESTS 63 77 204800 1700
65469504 tuna_salad C Nov. 21, 2019, 7:46 a.m. OK Rust TESTS 63 31 0 1700
22591592 bonchi C Nov. 29, 2016, 5:55 a.m. OK Rust TESTS 63 31 102400 1700
24564573 mio_h C Feb. 10, 2017, 7:32 a.m. OK Rust TESTS 63 31 18329600 1700
22685330 Andrew.Tweddle C Dec. 3, 2016, 9:08 p.m. OK Scala TESTS 63 265 0 1700
22720558 reldan C Dec. 5, 2016, 10:50 p.m. OK Scala TESTS 63 358 0 1700

remove filters

Back to search problems