Good Bye 2018

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
1091 Good Bye 2018 FINISHED False 9600 185642699 Dec. 30, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1012 ) E New Year and the Acquaintance Estimation PROGRAMMING binary search data structures graphs greedy implementation math sortings 2400

B'Bob is an active user of the social network Faithbug. On this network, people are able to engage in a mutual friendship. That is, if a is a friend of b , then b is also a friend of a . Each user thus has a non-negative amount of friends. This morning, somebody anonymously sent Bob the following link: graph realization problem and Bob wants to know who that was. In order to do that, he first needs to know how the social network looks like. He investigated the profile of every other person on the network and noted down the number of his friends. However, he neglected to note down the number of his friends. Help him find out how many friends he has. Since there may be many possible answers, print all of them. The first line contains one integer n ( 1 <= q n <= q 5 cdot 10^5 ), the number of people on the network excluding Bob. The second line contains n numbers a_1,a_2, ... , a_n ( 0 <= q a_i <= q n ), with a_i being the number of people that person i is a friend of. Print all possible values of a_{n+1} -- the amount of people that Bob can be friend of, in increasing order. If no solution exists, output -1 . In the first test case, the only solution is that everyone is friends with everyone. That is why Bob should have 3 friends. In the second test case, there are three possible solutions (apart from symmetries): The third case is impossible to solve, as the second person needs to be a friend with everybody, but the first one is a complete stranger. '...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
48654522 ReaLNero1 E Jan. 21, 2019, 1:36 a.m. OK GNU C11 TESTS 62 46 10035200 2400
47804390 libra9z E Jan. 1, 2019, 5:31 a.m. OK GNU C11 TESTS 62 46 10035200 2400
47804426 libra9z E Jan. 1, 2019, 5:34 a.m. OK GNU C11 TESTS 62 46 10035200 2400
47804549 libra9z E Jan. 1, 2019, 5:44 a.m. OK GNU C11 TESTS 62 46 10035200 2400
47804574 libra9z E Jan. 1, 2019, 5:46 a.m. OK GNU C11 TESTS 62 46 10035200 2400
47804567 libra9z E Jan. 1, 2019, 5:45 a.m. OK GNU C11 TESTS 62 62 10035200 2400
47773015 rainboy E Dec. 31, 2018, 12:08 a.m. OK GNU C11 TESTS 62 1014 10035200 2400
47763866 rainboy E Dec. 30, 2018, 5:03 p.m. OK GNU C11 TESTS 62 1231 38092800 2400
47803387 sjc_fan E Jan. 1, 2019, 3:51 a.m. OK GNU C++11 TESTS 62 46 10240000 2400
47803375 sjc_fan E Jan. 1, 2019, 3:50 a.m. OK GNU C++11 TESTS 62 62 8192000 2400
47781694 libra9z E Dec. 31, 2018, 8:30 a.m. OK GNU C++11 TESTS 62 62 11776000 2400
47805002 orzwaz E Jan. 1, 2019, 6:13 a.m. OK GNU C++11 TESTS 62 77 13824000 2400
47777020 ohweonfire E Dec. 31, 2018, 4:58 a.m. OK GNU C++11 TESTS 62 78 10035200 2400
47803325 sjc_fan E Jan. 1, 2019, 3:45 a.m. OK GNU C++11 TESTS 62 108 18534400 2400
47776971 ohweonfire E Dec. 31, 2018, 4:55 a.m. OK GNU C++11 TESTS 62 109 7987200 2400
47803330 vjudge1 E Jan. 1, 2019, 3:46 a.m. OK GNU C++11 TESTS 62 109 18534400 2400
47748562 _rqy E Dec. 30, 2018, 3:31 p.m. OK GNU C++11 TESTS 62 109 21811200 2400
47807291 2016wudi E Jan. 1, 2019, 8:24 a.m. OK GNU C++11 TESTS 62 124 5836800 2400
47958586 177013 E Jan. 5, 2019, 7:58 a.m. OK GNU C++14 TESTS 62 155 10035200 2400
47777059 shdut E Dec. 31, 2018, 5:01 a.m. OK GNU C++14 TESTS 62 171 9625600 2400
47866830 consecutivelimit E Jan. 3, 2019, 10:19 a.m. OK GNU C++14 TESTS 62 171 20275200 2400
47748794 yhx-12243 E Dec. 30, 2018, 3:32 p.m. OK GNU C++14 TESTS 62 186 6144000 2400
47759909 oipotato E Dec. 30, 2018, 4:37 p.m. OK GNU C++14 TESTS 62 186 7577600 2400
47815052 Myrcella E Jan. 1, 2019, 1:52 p.m. OK GNU C++14 TESTS 62 186 7987200 2400
47808113 namai E Jan. 1, 2019, 8:56 a.m. OK GNU C++14 TESTS 62 187 3993600 2400
47750321 aid E Dec. 30, 2018, 3:39 p.m. OK GNU C++14 TESTS 62 187 7577600 2400
47814055 akaMagdyaka E Jan. 1, 2019, 1:16 p.m. OK GNU C++14 TESTS 62 187 9625600 2400
47813900 akaMagdyaka E Jan. 1, 2019, 1:10 p.m. OK GNU C++14 TESTS 62 187 9625600 2400
47900067 OMG_wc E Jan. 4, 2019, 1:32 p.m. OK GNU C++17 TESTS 62 171 6246400 2400
47770168 dorijanlendvaj E Dec. 30, 2018, 8:21 p.m. OK GNU C++17 TESTS 62 186 17203200 2400
47770225 dorijanlendvaj E Dec. 30, 2018, 8:24 p.m. OK GNU C++17 TESTS 62 187 17203200 2400
47752700 SirShokoladina E Dec. 30, 2018, 3:51 p.m. OK GNU C++17 TESTS 62 202 3584000 2400
53849852 Liwj E May 7, 2019, 12:55 p.m. OK GNU C++17 TESTS 62 202 6041600 2400
47779028 vjudge4 E Dec. 31, 2018, 6:44 a.m. OK GNU C++17 TESTS 62 202 6246400 2400
47899420 OMG_wc E Jan. 4, 2019, 1:07 p.m. OK GNU C++17 TESTS 62 202 6246400 2400
47790013 liqi2017 E Dec. 31, 2018, 12:50 p.m. OK GNU C++17 TESTS 62 202 7987200 2400
47755856 Elegia E Dec. 30, 2018, 4:09 p.m. OK GNU C++17 TESTS 62 202 7987200 2400
47781977 luogu_bot2 E Dec. 31, 2018, 8:40 a.m. OK GNU C++17 TESTS 62 202 9625600 2400
63254238 beginner1010 E Oct. 23, 2019, 5:01 p.m. OK Java 11 TESTS 62 935 18944000 2400
47760465 eatmore E Dec. 30, 2018, 4:41 p.m. OK Java 8 TESTS 62 311 0 2400
47749180 Petr E Dec. 30, 2018, 3:34 p.m. OK Java 8 TESTS 62 311 24780800 2400
47764398 iakovlev.zakhar E Dec. 30, 2018, 5:07 p.m. OK Java 8 TESTS 62 358 22937600 2400
47747945 uwi E Dec. 30, 2018, 3:28 p.m. OK Java 8 TESTS 62 389 3072000 2400
47848745 polyakoff E Jan. 2, 2019, 4:21 p.m. OK Java 8 TESTS 62 389 14438400 2400
47773016 Dukkha E Dec. 31, 2018, 12:08 a.m. OK Java 8 TESTS 62 390 11366400 2400
50477345 donli E Feb. 25, 2019, 6:51 a.m. OK Java 8 TESTS 62 420 14540800 2400
47887510 iamavalon E Jan. 4, 2019, 1:59 a.m. OK Java 8 TESTS 62 561 32768000 2400
47766902 dusty.and.rusty E Dec. 30, 2018, 6:36 p.m. OK Java 8 TESTS 62 608 49971200 2400
47770392 mbrc E Dec. 30, 2018, 8:34 p.m. OK Java 8 TESTS 62 608 68198400 2400
50549381 wjfwjfwjf E Feb. 27, 2019, 2:17 a.m. OK MS C++ TESTS 62 358 16076800 2400
47966346 Hellia E Jan. 5, 2019, 12:19 p.m. OK Python 2 TESTS 62 1855 70246400 2400
47862292 whatshisbucket E Jan. 3, 2019, 7:04 a.m. OK Python 3 TESTS 62 1918 69324800 2400
47861507 whatshisbucket E Jan. 3, 2019, 6:24 a.m. OK Python 3 TESTS 62 1965 71270400 2400

remove filters

Back to search problems