Avito Cool Challenge 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
1081 Avito Cool Challenge 2018 FINISHED False 9000 192554723 Dec. 16, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4498 ) B Farewell Party PROGRAMMING constructive algorithms implementation 1500

B'Chouti and his classmates are going to the university soon. To say goodbye to each other, the class has planned a big farewell party in which classmates, teachers and parents sang and danced. Chouti remembered that n persons took part in that party. To make the party funnier, each person wore one hat among n kinds of weird hats numbered 1, 2, ldots n . It is possible that several persons wore hats of the same kind. Some kinds of hats can remain unclaimed by anyone. After the party, the i -th person said that there were a_i persons wearing a hat differing from his own. It has been some days, so Chouti forgot all about others ' hats, but he is curious about that. Let b_i be the number of hat type the i -th person was wearing, Chouti wants you to find any possible b_1, b_2, ldots, b_n that doesn 't contradict with any person 's statement. Because some persons might have a poor memory, there could be no solution at all. The first line contains a single integer n ( 1 <= n <= 10^5 ), the number of persons in the party. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= n-1 ), the statements of people. If there is no solution, print a single line "Impossible". Otherwise, print "Possible" and then n integers b_1, b_2, ldots, b_n ( 1 <= b_i <= n ). If there are multiple answers, print any of them. In the answer to the first example, all hats are the same, so every person will say that there were no persons wearing a hat different from kind 1 . In the answer to the second example, the first and the second person wore the hat with type 1 and all other wore a hat of type 2 . So the first two persons will say there were three persons with hats differing from their own. Similarly, three last persons will say there were two persons wearing a hat different from their own. In the third example, it can be shown that no solution exists. In the fir'...

Tutorials

63888

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50521295 Mcccree B Feb. 26, 2019, 9:32 a.m. OK Clang++17 Diagnostics TESTS 69 779 18636800 1500
57134497 LaSWeeG B July 16, 2019, 8:24 a.m. OK Delphi TESTS 69 61 2048000 1500
51382216 ruban B March 16, 2019, 4:53 p.m. OK Delphi TESTS 69 93 200601600 1500
47225503 DKezik B Dec. 18, 2018, 4:33 p.m. OK FPC TESTS 69 312 1228800 1500
47126421 CallBoy B Dec. 16, 2018, 3:46 p.m. OK FPC TESTS 69 343 1228800 1500
47140572 DanielixS B Dec. 16, 2018, 7:49 p.m. OK GNU C11 TESTS 69 343 1228800 1500
47115763 zysbzddsj B Dec. 16, 2018, 2:52 p.m. OK GNU C11 TESTS 69 343 1638400 1500
47396067 tonychoper27 B Dec. 23, 2018, 11:16 a.m. OK GNU C11 TESTS 69 358 819200 1500
47360972 sakshi1811 B Dec. 22, 2018, 8:42 a.m. OK GNU C11 TESTS 69 358 819200 1500
47122686 sansen B Dec. 16, 2018, 3:23 p.m. OK GNU C11 TESTS 69 358 1228800 1500
47121612 akshat_goyal B Dec. 16, 2018, 3:18 p.m. OK GNU C11 TESTS 69 358 1228800 1500
47150145 vikr_182 B Dec. 17, 2018, 6:18 a.m. OK GNU C11 TESTS 69 358 126668800 1500
47124095 Kakalinn B Dec. 16, 2018, 3:32 p.m. OK GNU C11 TESTS 69 373 1228800 1500
47121342 STYX_HELIX B Dec. 16, 2018, 3:16 p.m. OK GNU C11 TESTS 69 639 1228800 1500
47118003 freyes B Dec. 16, 2018, 3:01 p.m. OK GNU C11 TESTS 69 639 1228800 1500
47142645 Zechariah_2001 B Dec. 16, 2018, 9:19 p.m. OK GNU C++11 TESTS 69 31 2048000 1500
47452882 LJC00118 B Dec. 24, 2018, 10:53 a.m. OK GNU C++11 TESTS 69 31 3788800 1500
47184299 wxyww B Dec. 18, 2018, 2:17 a.m. OK GNU C++11 TESTS 69 46 1228800 1500
47122363 Tgiwx B Dec. 16, 2018, 3:22 p.m. OK GNU C++11 TESTS 69 46 1228800 1500
47119968 Tgotp B Dec. 16, 2018, 3:10 p.m. OK GNU C++11 TESTS 69 46 1228800 1500
47116853 Destinies B Dec. 16, 2018, 2:56 p.m. OK GNU C++11 TESTS 69 46 1228800 1500
47113526 orzwaz B Dec. 16, 2018, 2:44 p.m. OK GNU C++11 TESTS 69 46 1228800 1500
47112956 Gloid B Dec. 16, 2018, 2:42 p.m. OK GNU C++11 TESTS 69 46 1228800 1500
67600022 Jimmy_Liu B Dec. 25, 2019, 11:34 a.m. OK GNU C++11 TESTS 69 46 1228800 1500
47156672 xymtxdy B Dec. 17, 2018, 7:18 a.m. OK GNU C++11 TESTS 69 46 1228800 1500
47304244 buko B Dec. 20, 2018, 3:50 p.m. OK GNU C++14 TESTS 69 46 1228800 1500
47249722 zjB_shadow B Dec. 19, 2018, 7:41 a.m. OK GNU C++14 TESTS 69 46 1638400 1500
47140792 tinca_matei B Dec. 16, 2018, 7:57 p.m. OK GNU C++14 TESTS 69 46 1638400 1500
47113150 _h_ B Dec. 16, 2018, 2:42 p.m. OK GNU C++14 TESTS 69 46 1638400 1500
47165303 _Shravann_ B Dec. 17, 2018, 12:13 p.m. OK GNU C++14 TESTS 69 46 1843200 1500
47113098 1021839 B Dec. 16, 2018, 2:42 p.m. OK GNU C++14 TESTS 69 46 2150400 1500
62966212 Mynesis B Oct. 20, 2019, 4:43 a.m. OK GNU C++14 TESTS 69 46 2252800 1500
47118761 knshnb B Dec. 16, 2018, 3:04 p.m. OK GNU C++14 TESTS 69 46 2560000 1500
48497192 dvjsm B Jan. 17, 2019, 1:28 p.m. OK GNU C++14 TESTS 69 46 2969600 1500
49386715 Kirito B Feb. 3, 2019, 7:21 a.m. OK GNU C++14 TESTS 69 46 3072000 1500
47117482 mai B Dec. 16, 2018, 2:59 p.m. OK GNU C++17 TESTS 69 31 1843200 1500
47113586 Laggay B Dec. 16, 2018, 2:44 p.m. OK GNU C++17 TESTS 69 46 1433600 1500
47118400 omeravci372742 B Dec. 16, 2018, 3:03 p.m. OK GNU C++17 TESTS 69 46 1638400 1500
67413913 airad B Dec. 22, 2019, 9:13 a.m. OK GNU C++17 TESTS 69 46 1638400 1500
47662547 mohmahkho B Dec. 28, 2018, 8:03 p.m. OK GNU C++17 TESTS 69 46 2252800 1500
47261071 vjudge3 B Dec. 19, 2018, 12:24 p.m. OK GNU C++17 TESTS 69 46 2457600 1500
47288410 KillReal B Dec. 20, 2018, 7:42 a.m. OK GNU C++17 TESTS 69 46 3174400 1500
50780182 ecjtu18-xiazhengran B March 4, 2019, 10:58 a.m. OK GNU C++17 TESTS 69 46 3174400 1500
63862439 flashmt B Oct. 30, 2019, 4:50 p.m. OK GNU C++17 TESTS 69 46 3174400 1500
47266258 vjudge4 B Dec. 19, 2018, 2:27 p.m. OK GNU C++17 TESTS 69 46 3174400 1500
47600291 davidguandev B Dec. 27, 2018, 9:42 p.m. OK Go TESTS 69 78 9830400 1500
47115713 caidodo0_0 B Dec. 16, 2018, 2:52 p.m. OK Go TESTS 69 109 5324800 1500
47172742 stefan.sakalik B Dec. 17, 2018, 3:53 p.m. OK Go TESTS 69 109 9728000 1500
47131979 upvas B Dec. 16, 2018, 4:29 p.m. OK Go TESTS 69 733 121241600 1500
47280352 danielfleischman B Dec. 19, 2018, 11:39 p.m. OK Haskell TESTS 69 483 28569600 1500
47189563 sinapusu2002 B Dec. 18, 2018, 11:31 a.m. OK Haskell TESTS 69 686 31744000 1500
49656831 revanthreddy85 B Feb. 9, 2019, 10:23 a.m. OK Java 8 TESTS 69 140 0 1500
47366656 Pratik_Rajani B Dec. 22, 2018, 11:51 a.m. OK Java 8 TESTS 69 140 0 1500
47183403 SpargelTarzan B Dec. 18, 2018, 12:34 a.m. OK Java 8 TESTS 69 140 0 1500
47149451 bhautik_77 B Dec. 17, 2018, 5:48 a.m. OK Java 8 TESTS 69 140 0 1500
47149424 typedef_2000 B Dec. 17, 2018, 5:47 a.m. OK Java 8 TESTS 69 140 0 1500
47132638 KharYusuf B Dec. 16, 2018, 4:34 p.m. OK Java 8 TESTS 69 140 0 1500
47117601 Musin B Dec. 16, 2018, 2:59 p.m. OK Java 8 TESTS 69 140 4096000 1500
47142715 PrakharJain B Dec. 16, 2018, 9:22 p.m. OK Java 8 TESTS 69 140 4300800 1500
47155531 amolpratap007 B Dec. 17, 2018, 6:32 a.m. OK Java 8 TESTS 69 140 4710400 1500
50253864 Harbin B Feb. 20, 2019, 6:35 p.m. OK Java 8 TESTS 69 155 0 1500
47116683 Sergey.Bankevich B Dec. 16, 2018, 2:55 p.m. OK Kotlin TESTS 69 202 5632000 1500
50822112 cyansea B March 5, 2019, 1:58 p.m. OK Kotlin TESTS 69 311 18534400 1500
47120170 konvpalto B Dec. 16, 2018, 3:11 p.m. OK Kotlin TESTS 69 342 13414400 1500
47119240 zloi.timur B Dec. 16, 2018, 3:06 p.m. OK Kotlin TESTS 69 546 1740800 1500
50821503 cyansea B March 5, 2019, 1:44 p.m. OK Kotlin TESTS 69 577 18534400 1500
47121496 T-D-K B Dec. 16, 2018, 3:17 p.m. OK Mono C# TESTS 69 62 4505600 1500
56543391 og.kostya B July 5, 2019, 6:29 a.m. OK Mono C# TESTS 69 93 7577600 1500
50271157 Mosyagin B Feb. 21, 2019, 7:21 a.m. OK Mono C# TESTS 69 124 17408000 1500
50271245 Mosyagin B Feb. 21, 2019, 7:24 a.m. OK Mono C# TESTS 69 124 18329600 1500
47160702 Mem B Dec. 17, 2018, 9:41 a.m. OK Mono C# TESTS 69 124 19353600 1500
47117496 Coder_D B Dec. 16, 2018, 2:59 p.m. OK Mono C# TESTS 69 124 27443200 1500
47133616 omikad B Dec. 16, 2018, 4:43 p.m. OK Mono C# TESTS 69 202 33792000 1500
47122996 eki B Dec. 16, 2018, 3:25 p.m. OK Mono C# TESTS 69 405 13824000 1500
49355157 scorpiowf B Feb. 2, 2019, 10:41 a.m. OK MS C++ TESTS 69 46 1638400 1500
47353648 vjudge1 B Dec. 22, 2018, 4:53 a.m. OK MS C++ TESTS 69 46 1638400 1500
49080732 vjudge4 B Jan. 28, 2019, 6:03 a.m. OK MS C++ TESTS 69 61 3686400 1500
50317545 vjudge5 B Feb. 22, 2019, 12:58 p.m. OK MS C++ TESTS 69 62 819200 1500
50717900 vjudge4 B March 3, 2019, 8:04 a.m. OK MS C++ TESTS 69 62 1228800 1500
47353700 vjudge3 B Dec. 22, 2018, 4:56 a.m. OK MS C++ TESTS 69 62 1638400 1500
47358973 npu2017302459 B Dec. 22, 2018, 7:41 a.m. OK MS C++ TESTS 69 62 2048000 1500
47120466 claus_spb B Dec. 16, 2018, 3:12 p.m. OK MS C++ TESTS 69 62 3686400 1500
48699408 vjudge1 B Jan. 22, 2019, 1:43 a.m. OK MS C++ TESTS 69 62 3788800 1500
54647050 vjudge2 B May 26, 2019, 1:56 a.m. OK MS C++ TESTS 69 77 2457600 1500
50681805 REBerserker B March 2, 2019, 11:50 a.m. OK MS C++ 2017 TESTS 69 77 1228800 1500
50686047 REBerserker B March 2, 2019, 1:42 p.m. OK MS C++ 2017 TESTS 69 78 1228800 1500
50686126 REBerserker B March 2, 2019, 1:44 p.m. OK MS C++ 2017 TESTS 69 155 1228800 1500
47141307 sk0 B Dec. 16, 2018, 8:15 p.m. OK Ocaml TESTS 69 156 9318400 1500
47139916 rsFalse B Dec. 16, 2018, 7:31 p.m. OK Perl TESTS 69 248 37171200 1500
47118469 rsFalse B Dec. 16, 2018, 3:03 p.m. OK Perl TESTS 69 295 37478400 1500
47114019 pajenegod B Dec. 16, 2018, 2:45 p.m. OK PyPy 2 TESTS 69 156 10649600 1500
47117076 aeternalis1 B Dec. 16, 2018, 2:57 p.m. OK PyPy 2 TESTS 69 171 11878400 1500
47119694 pavankatta B Dec. 16, 2018, 3:09 p.m. OK PyPy 2 TESTS 69 187 10649600 1500
50471907 cherry_su B Feb. 25, 2019, 1:49 a.m. OK PyPy 2 TESTS 69 187 12902400 1500
47127600 Mukundan314 B Dec. 16, 2018, 3:55 p.m. OK PyPy 2 TESTS 69 202 14233600 1500
47130127 c1729 B Dec. 16, 2018, 4:14 p.m. OK PyPy 2 TESTS 69 202 16384000 1500
47130264 figdan B Dec. 16, 2018, 4:15 p.m. OK PyPy 2 TESTS 69 811 11878400 1500
48269893 knight-erraunt B Jan. 12, 2019, 12:46 a.m. OK PyPy 3 TESTS 69 218 14233600 1500
47126288 dizballanze B Dec. 16, 2018, 3:45 p.m. OK PyPy 3 TESTS 69 248 12083200 1500
47177754 sustech_plus B Dec. 17, 2018, 6:31 p.m. OK PyPy 3 TESTS 69 264 18022400 1500
47127306 Paixao B Dec. 16, 2018, 3:53 p.m. OK PyPy 3 TESTS 69 280 14438400 1500
65049855 Felerius B Nov. 15, 2019, 2:09 p.m. OK PyPy 3 TESTS 69 296 14848000 1500
47116652 quandum B Dec. 16, 2018, 2:55 p.m. OK PyPy 3 TESTS 69 311 14643200 1500
47116495 titia B Dec. 16, 2018, 2:55 p.m. OK PyPy 3 TESTS 69 327 13107200 1500
60188085 Sevlll B Sept. 6, 2019, 7:35 p.m. OK PyPy 3 TESTS 69 327 14848000 1500
47115595 r57shell B Dec. 16, 2018, 2:51 p.m. OK PyPy 3 TESTS 69 405 11980800 1500
47141457 Praxis B Dec. 16, 2018, 8:21 p.m. OK PyPy 3 TESTS 69 420 13107200 1500
47115097 nwi B Dec. 16, 2018, 2:49 p.m. OK Python 2 TESTS 69 265 5632000 1500
47161248 alessandrosolbiati B Dec. 17, 2018, 10:01 a.m. OK Python 2 TESTS 69 280 12697600 1500
47130825 realG B Dec. 16, 2018, 4:20 p.m. OK Python 2 TESTS 69 295 9523200 1500
47135440 saladtoes1 B Dec. 16, 2018, 4:58 p.m. OK Python 2 TESTS 69 296 18739200 1500
47165286 elistark B Dec. 17, 2018, 12:13 p.m. OK Python 2 TESTS 69 311 9728000 1500
47518905 tajirhas9 B Dec. 26, 2018, 11:49 a.m. OK Python 2 TESTS 69 327 10240000 1500
47118752 Derzeed B Dec. 16, 2018, 3:04 p.m. OK Python 2 TESTS 69 343 7168000 1500
47159312 alessandrosolbiati B Dec. 17, 2018, 8:52 a.m. OK Python 2 TESTS 69 358 17510400 1500
47533104 nealzane B Dec. 26, 2018, 9:06 p.m. OK Python 2 TESTS 69 374 9318400 1500
47135855 alessandrosolbiati B Dec. 16, 2018, 5:01 p.m. OK Python 2 TESTS 69 374 17510400 1500
47381334 figure0907 B Dec. 22, 2018, 9:36 p.m. OK Python 3 TESTS 69 218 7475200 1500
47120538 potpath B Dec. 16, 2018, 3:12 p.m. OK Python 3 TESTS 69 234 10240000 1500
47157742 parasmehan123 B Dec. 17, 2018, 7:58 a.m. OK Python 3 TESTS 69 280 7884800 1500
47126078 Chanto B Dec. 16, 2018, 3:44 p.m. OK Python 3 TESTS 69 280 10035200 1500
47131271 JoeGun B Dec. 16, 2018, 4:23 p.m. OK Python 3 TESTS 69 280 12902400 1500
47125722 tiandrey B Dec. 16, 2018, 3:42 p.m. OK Python 3 TESTS 69 296 10240000 1500
47503787 Felerius B Dec. 25, 2018, 8:11 p.m. OK Python 3 TESTS 69 311 10547200 1500
47497882 nowyyz B Dec. 25, 2018, 4:02 p.m. OK Python 3 TESTS 69 311 10649600 1500
47129118 arikpamnani B Dec. 16, 2018, 4:06 p.m. OK Python 3 TESTS 69 312 18432000 1500
47113737 justinz2018 B Dec. 16, 2018, 2:45 p.m. OK Python 3 TESTS 69 327 13721600 1500
47140937 Jumnast B Dec. 16, 2018, 8:01 p.m. OK Ruby TESTS 69 405 35737600 1500
47133521 kamil_hism B Dec. 16, 2018, 4:42 p.m. OK Ruby TESTS 69 733 18636800 1500
47119701 yakamoto B Dec. 16, 2018, 3:09 p.m. OK Scala TESTS 69 561 11776000 1500
47163198 limed B Dec. 17, 2018, 11:09 a.m. OK Scala TESTS 69 623 10137600 1500
47163718 limed B Dec. 17, 2018, 11:25 a.m. OK Scala TESTS 69 967 41369600 1500
47114754 limed B Dec. 16, 2018, 2:48 p.m. OK Scala TESTS 69 997 40857600 1500
47163744 limed B Dec. 17, 2018, 11:26 a.m. OK Scala TESTS 69 997 41369600 1500

remove filters

Back to search problems