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
( 10057 ) C New Year and the Sphere Transmission PROGRAMMING math number theory 1400

B"There are n people sitting in a circle, numbered from 1 to n in the order in which they are seated. That is, for all i from 1 to n-1 , the people with id i and i+1 are adjacent. People with id n and 1 are adjacent as well. The person with id 1 initially has a ball. He picks a positive integer k at most n , and passes the ball to his k -th neighbour in the direction of increasing ids, that person passes the ball to his k -th neighbour in the same direction, and so on until the person with the id 1 gets the ball back. When he gets it back, people do not pass the ball any more. For instance, if n = 6 and k = 4 , the ball is passed in order [1, 5, 3, 1] . Consider the set of all people that touched the ball. The fun value of the game is the sum of the ids of people that touched it. In the above example, the fun value would be 1 + 5 + 3 = 9 . Find and report the set of possible fun values for all choices of positive integer k . It can be shown that under the constraints of the problem, the ball always gets back to the 1 -st player after finitely many steps, and there are no more than 10^5 possible fun values for given n . The only line consists of a single integer n ( 2 <= q n <= q 10^9 ) -- the number of people playing with the ball. Suppose the set of all fun values is f_1, f_2, ... , f_m . Output a single line containing m space separated integers f_1 through f_m in increasing order. In the first sample, we've already shown that picking k = 4 yields fun value 9 , as does k = 2 . Picking k = 6 results in fun value of 1 . For k = 3 we get fun value 5 and with k = 1 or k = 5 we get 21 . In the second sample, the values 1 , 10 , 28 , 64 and 136 are achieved for instance for k = 16 , 8 , 4 , 10"...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
47777899 nilesh8757 C Dec. 31, 2018, 5:49 a.m. OK Clang++17 Diagnostics TESTS 23 46 307200 1400
49669690 Mohamad_AboDan C Feb. 9, 2019, 4:13 p.m. OK Clang++17 Diagnostics TESTS 23 46 819200 1400
47783544 slitherhiss C Dec. 31, 2018, 9:27 a.m. OK Clang++17 Diagnostics TESTS 23 46 9420800 1400
47752619 ia7ck C Dec. 30, 2018, 3:50 p.m. OK D TESTS 23 31 4198400 1400
47831502 Ahriman C Jan. 2, 2019, 7:07 a.m. OK FPC TESTS 23 30 921600 1400
47827828 Khanh_Moriaty C Jan. 2, 2019, 2:45 a.m. OK FPC TESTS 23 31 0 1400
48085041 Khanh_Moriaty C Jan. 8, 2019, 10:41 a.m. OK FPC TESTS 23 31 0 1400
47755999 khoa101003 C Dec. 30, 2018, 4:10 p.m. OK FPC TESTS 23 31 102400 1400
47755126 AHTOH._. C Dec. 30, 2018, 4:04 p.m. OK FPC TESTS 23 31 921600 1400
47749360 samau07012005 C Dec. 30, 2018, 3:35 p.m. OK FPC TESTS 23 31 921600 1400
47766759 Kostin2020 C Dec. 30, 2018, 6:35 p.m. OK FPC TESTS 23 31 7987200 1400
47757139 nmhien2605 C Dec. 30, 2018, 4:17 p.m. OK FPC TESTS 23 31 7987200 1400
48553712 luogu_bot2 C Jan. 19, 2019, 3:52 a.m. OK GNU C11 TESTS 23 15 409600 1400
47750624 Horcrux1729 C Dec. 30, 2018, 3:40 p.m. OK GNU C11 TESTS 23 30 7987200 1400
47748645 DanielixS C Dec. 30, 2018, 3:31 p.m. OK GNU C11 TESTS 23 31 0 1400
47826100 hscpy C Jan. 1, 2019, 11:15 p.m. OK GNU C11 TESTS 23 31 0 1400
69187794 mth1908 C Jan. 20, 2020, 12:32 p.m. OK GNU C11 TESTS 23 31 0 1400
47767335 kcode C Dec. 30, 2018, 6:43 p.m. OK GNU C11 TESTS 23 31 204800 1400
47886730 ShieldofZTF C Jan. 4, 2019, 12:25 a.m. OK GNU C11 TESTS 23 31 307200 1400
58830239 akash19jain C Aug. 14, 2019, 5:35 p.m. OK GNU C11 TESTS 23 31 819200 1400
61878332 kaiboy C Oct. 4, 2019, 9:23 p.m. OK GNU C11 TESTS 23 31 819200 1400
61882125 kaiboy C Oct. 5, 2019, 12:59 a.m. OK GNU C11 TESTS 23 31 819200 1400
47772446 SebasV8 C Dec. 30, 2018, 11:08 p.m. OK GNU C++11 TESTS 23 15 0 1400
47773316 OrzAM C Dec. 31, 2018, 12:43 a.m. OK GNU C++11 TESTS 23 15 0 1400
47773591 137_345_2814 C Dec. 31, 2018, 1:07 a.m. OK GNU C++11 TESTS 23 15 0 1400
47803368 20164225 C Jan. 1, 2019, 3:49 a.m. OK GNU C++11 TESTS 23 15 0 1400
47860782 Akasaransh C Jan. 3, 2019, 5:49 a.m. OK GNU C++11 TESTS 23 15 0 1400
47872336 2020.01.09_Restart C Jan. 3, 2019, 1:33 p.m. OK GNU C++11 TESTS 23 15 0 1400
47899625 jadjeem C Jan. 4, 2019, 1:15 p.m. OK GNU C++11 TESTS 23 15 0 1400
48447974 lwzzuishuai C Jan. 16, 2019, 8:34 a.m. OK GNU C++11 TESTS 23 15 0 1400
53975312 vjudge1 C May 11, 2019, 3:26 a.m. OK GNU C++11 TESTS 23 15 0 1400
54466994 SoiMae C May 22, 2019, 1:14 a.m. OK GNU C++11 TESTS 23 15 0 1400
47917353 Qing_Yang C Jan. 4, 2019, 3:12 p.m. OK GNU C++14 TESTS 23 15 0 1400
49516091 WstOne C Feb. 6, 2019, 2:58 a.m. OK GNU C++14 TESTS 23 15 0 1400
48550778 HouZAJ C Jan. 19, 2019, 1:36 a.m. OK GNU C++14 TESTS 23 15 0 1400
48133414 1.o4 C Jan. 9, 2019, 3:18 p.m. OK GNU C++14 TESTS 23 15 0 1400
48020407 xsjlmzs C Jan. 6, 2019, 5:04 a.m. OK GNU C++14 TESTS 23 15 0 1400
47944711 Ounce C Jan. 4, 2019, 6:55 p.m. OK GNU C++14 TESTS 23 15 0 1400
47897258 ujaval280498 C Jan. 4, 2019, 11:30 a.m. OK GNU C++14 TESTS 23 15 0 1400
47805113 hett C Jan. 1, 2019, 6:20 a.m. OK GNU C++14 TESTS 23 15 0 1400
47786289 arseny30 C Dec. 31, 2018, 10:54 a.m. OK GNU C++14 TESTS 23 15 0 1400
47781819 scottaran9 C Dec. 31, 2018, 8:34 a.m. OK GNU C++14 TESTS 23 15 0 1400
47746117 EncodeTalker C Dec. 30, 2018, 3:20 p.m. OK GNU C++17 TESTS 23 15 0 1400
47773251 vjudge4 C Dec. 31, 2018, 12:35 a.m. OK GNU C++17 TESTS 23 15 0 1400
47773264 luogu_bot2 C Dec. 31, 2018, 12:36 a.m. OK GNU C++17 TESTS 23 15 0 1400
47807628 k3hi C Jan. 1, 2019, 8:33 a.m. OK GNU C++17 TESTS 23 15 0 1400
47858206 MateoCV C Jan. 3, 2019, 2:34 a.m. OK GNU C++17 TESTS 23 15 0 1400
65288006 Zahidul_Islam C Nov. 18, 2019, 8:48 a.m. OK GNU C++17 TESTS 23 15 102400 1400
66248144 Noshin_1703086 C Dec. 3, 2019, 10:13 p.m. OK GNU C++17 TESTS 23 15 102400 1400
67866722 streaker_rules C Dec. 29, 2019, 9:57 a.m. OK GNU C++17 TESTS 23 15 102400 1400
67968838 matumbaman bluestorm57 C Dec. 30, 2019, 2:16 p.m. OK GNU C++17 TESTS 23 15 102400 1400
69293786 San007 C Jan. 22, 2020, 11:24 a.m. OK GNU C++17 TESTS 23 15 102400 1400
47785529 hellnoob C Dec. 31, 2018, 10:29 a.m. OK Go TESTS 23 31 0 1400
69710514 synapse C Jan. 29, 2020, 6:49 a.m. OK Go TESTS 23 46 0 1400
47763419 y.miyamoto324 C Dec. 30, 2018, 5 p.m. OK Go TESTS 23 46 0 1400
57949531 jmazon C July 29, 2019, 3:49 p.m. OK Haskell TESTS 23 15 204800 1400
47762788 gksato C Dec. 30, 2018, 4:57 p.m. OK Haskell TESTS 23 31 8396800 1400
51203188 sonowz C March 12, 2019, 2:14 a.m. OK Haskell TESTS 23 46 102400 1400
47845533 bazinga84 C Jan. 2, 2019, 2:26 p.m. OK Java 8 TESTS 23 108 0 1400
47804623 Kavi.Prajapati C Jan. 1, 2019, 5:48 a.m. OK Java 8 TESTS 23 108 0 1400
47795793 flyman3046 C Dec. 31, 2018, 4:51 p.m. OK Java 8 TESTS 23 108 0 1400
47779122 polyakoff C Dec. 31, 2018, 6:49 a.m. OK Java 8 TESTS 23 108 0 1400
66651270 Agnimandur C Dec. 11, 2019, 7:13 p.m. OK Java 8 TESTS 23 109 0 1400
61942440 derrick20 C Oct. 5, 2019, 8:34 p.m. OK Java 8 TESTS 23 109 0 1400
58372609 garnacha C Aug. 6, 2019, 7:09 a.m. OK Java 8 TESTS 23 109 0 1400
53825526 Ikari_stream C May 6, 2019, 3:50 p.m. OK Java 8 TESTS 23 109 0 1400
50530699 Morgan_Y C Feb. 26, 2019, 1:32 p.m. OK Java 8 TESTS 23 109 0 1400
50154883 donli C Feb. 19, 2019, 9:27 a.m. OK Java 8 TESTS 23 109 0 1400
47745852 zloi.timur C Dec. 30, 2018, 3:19 p.m. OK Kotlin TESTS 23 140 0 1400
47745306 elizarov C Dec. 30, 2018, 3:17 p.m. OK Kotlin TESTS 23 155 102400 1400
47749850 hi_allerria C Dec. 30, 2018, 3:37 p.m. OK Kotlin TESTS 23 155 819200 1400
47748325 mircea85 C Dec. 30, 2018, 3:30 p.m. OK Mono C# TESTS 23 46 102400 1400
49117609 nemars C Jan. 28, 2019, 5:39 p.m. OK Mono C# TESTS 23 46 3891200 1400
47747234 eki C Dec. 30, 2018, 3:25 p.m. OK Mono C# TESTS 23 61 204800 1400
47746641 Coder_D C Dec. 30, 2018, 3:22 p.m. OK Mono C# TESTS 23 61 1638400 1400
47969629 og.kostya C Jan. 5, 2019, 1:56 p.m. OK Mono C# TESTS 23 62 102400 1400
47756510 kyosuke0924 C Dec. 30, 2018, 4:13 p.m. OK Mono C# TESTS 23 62 3891200 1400
47755939 Anastasiya_Andreevna C Dec. 30, 2018, 4:10 p.m. OK Mono C# TESTS 23 77 1843200 1400
47748534 teru C Dec. 30, 2018, 3:31 p.m. OK Mono C# TESTS 23 77 3788800 1400
47752037 omikad C Dec. 30, 2018, 3:47 p.m. OK Mono C# TESTS 23 77 3891200 1400
47746043 keymoon C Dec. 30, 2018, 3:20 p.m. OK Mono C# TESTS 23 78 3993600 1400
47889194 vjudge4 C Jan. 4, 2019, 4:29 a.m. OK MS C++ TESTS 23 15 0 1400
50052196 vjudge3 C Feb. 17, 2019, 8:37 a.m. OK MS C++ TESTS 23 15 2457600 1400
47777875 TimeVShow C Dec. 31, 2018, 5:48 a.m. OK MS C++ TESTS 23 15 24064000 1400
47798384 Gladius_Smerch C Dec. 31, 2018, 7:17 p.m. OK MS C++ TESTS 23 30 0 1400
51684726 vjudge4 C March 22, 2019, 2:05 p.m. OK MS C++ TESTS 23 30 0 1400
47845499 vjudge2 C Jan. 2, 2019, 2:25 p.m. OK MS C++ TESTS 23 30 819200 1400
59384285 vjudge3 C Aug. 24, 2019, 5:33 a.m. OK MS C++ TESTS 23 30 819200 1400
47784663 vjudge3 C Dec. 31, 2018, 10 a.m. OK MS C++ TESTS 23 30 819200 1400
47840353 is_ffacs C Jan. 2, 2019, 11:31 a.m. OK MS C++ TESTS 23 30 819200 1400
50055020 vjudge4 C Feb. 17, 2019, 9:51 a.m. OK MS C++ TESTS 23 30 921600 1400
50569034 Kosmonaft C Feb. 27, 2019, 2:28 p.m. OK MS C++ 2017 TESTS 23 31 0 1400
56169741 petko_mitkov C June 27, 2019, 3:56 p.m. OK MS C++ 2017 TESTS 23 31 0 1400
65392817 Uj_employee C Nov. 19, 2019, 5:58 p.m. OK MS C++ 2017 TESTS 23 31 0 1400
50578348 dslom C Feb. 27, 2019, 7:24 p.m. OK MS C++ 2017 TESTS 23 31 102400 1400
67350222 vjudge4 C Dec. 21, 2019, 12:01 p.m. OK MS C++ 2017 TESTS 23 31 1638400 1400
69084777 vjudge5 C Jan. 19, 2020, 7:53 a.m. OK MS C++ 2017 TESTS 23 46 0 1400
67154836 vjudge1 C Dec. 18, 2019, 12:08 p.m. OK MS C++ 2017 TESTS 23 46 1228800 1400
47768360 sk0 C Dec. 30, 2018, 7:08 p.m. OK Ocaml TESTS 23 15 204800 1400
47750582 OpKos C Dec. 30, 2018, 3:40 p.m. OK PascalABC.NET TESTS 23 46 0 1400
47800876 Aparichit_Vyavasthapak C Dec. 31, 2018, 10:38 p.m. OK PyPy 2 TESTS 23 124 204800 1400
47752475 akifpatel C Dec. 30, 2018, 3:50 p.m. OK PyPy 2 TESTS 23 124 716800 1400
47745791 gedymin C Dec. 30, 2018, 3:19 p.m. OK PyPy 2 TESTS 23 140 512000 1400
47768788 tastymath75025 C Dec. 30, 2018, 7:22 p.m. OK PyPy 2 TESTS 23 140 614400 1400
47757536 kbagoli1999 C Dec. 30, 2018, 4:20 p.m. OK PyPy 2 TESTS 23 140 614400 1400
47756284 figdan C Dec. 30, 2018, 4:12 p.m. OK PyPy 2 TESTS 23 140 614400 1400
47753089 wanderer163 C Dec. 30, 2018, 3:53 p.m. OK PyPy 2 TESTS 23 140 1126400 1400
47778163 water C Dec. 31, 2018, 6:03 a.m. OK PyPy 2 TESTS 23 140 1536000 1400
47745575 wangkan2001 C Dec. 30, 2018, 3:18 p.m. OK PyPy 2 TESTS 23 156 716800 1400
47800799 Aparichit_Vyavasthapak C Dec. 31, 2018, 10:32 p.m. OK PyPy 2 TESTS 23 156 716800 1400
47756772 Dmitriy_Ab C Dec. 30, 2018, 4:15 p.m. OK PyPy 3 TESTS 23 124 307200 1400
47754228 problem_solved C Dec. 30, 2018, 3:59 p.m. OK PyPy 3 TESTS 23 124 307200 1400
47747607 diveshuttam C Dec. 30, 2018, 3:27 p.m. OK PyPy 3 TESTS 23 140 512000 1400
47747130 ploffer11 C Dec. 30, 2018, 3:25 p.m. OK PyPy 3 TESTS 23 140 512000 1400
54652619 Aidos C May 26, 2019, 6:25 a.m. OK PyPy 3 TESTS 23 140 819200 1400
47820396 adshin21 C Jan. 1, 2019, 5:17 p.m. OK PyPy 3 TESTS 23 140 819200 1400
47768160 nikeshthapa255 C Dec. 30, 2018, 7:03 p.m. OK PyPy 3 TESTS 23 140 921600 1400
47761307 III_Wolverine_III C Dec. 30, 2018, 4:47 p.m. OK PyPy 3 TESTS 23 140 921600 1400
51128142 CodeMaster C March 10, 2019, 12:36 p.m. OK PyPy 3 TESTS 23 140 1024000 1400
47892757 adityaramesh C Jan. 4, 2019, 8 a.m. OK PyPy 3 TESTS 23 140 1024000 1400
47754658 SoSooding C Dec. 30, 2018, 4:01 p.m. OK Python 2 TESTS 23 171 0 1400
47746430 m.raszyk C Dec. 30, 2018, 3:21 p.m. OK Python 2 TESTS 23 171 0 1400
47774125 biltharesatyendra C Dec. 31, 2018, 1:50 a.m. OK Python 2 TESTS 23 171 102400 1400
47758370 yvzdrmzksr C Dec. 30, 2018, 4:26 p.m. OK Python 2 TESTS 23 171 102400 1400
47773469 tastymath75025 C Dec. 31, 2018, 12:57 a.m. OK Python 2 TESTS 23 171 512000 1400
47768840 kingmoshe C Dec. 30, 2018, 7:23 p.m. OK Python 2 TESTS 23 171 512000 1400
47943938 noob77777 C Jan. 4, 2019, 6:14 p.m. OK Python 2 TESTS 23 171 614400 1400
48536931 th3_5had0w C Jan. 18, 2019, 2:44 p.m. OK Python 2 TESTS 23 186 0 1400
47799992 nealzane C Dec. 31, 2018, 9:18 p.m. OK Python 2 TESTS 23 186 102400 1400
47763726 wunder9l C Dec. 30, 2018, 5:02 p.m. OK Python 2 TESTS 23 186 102400 1400
47779898 strint C Dec. 31, 2018, 7:21 a.m. OK Python 3 TESTS 23 108 102400 1400
48022311 Raban7 C Jan. 6, 2019, 6:40 a.m. OK Python 3 TESTS 23 109 0 1400
47970232 Raban7 C Jan. 5, 2019, 2:16 p.m. OK Python 3 TESTS 23 109 0 1400
47888631 KaiTheJunior C Jan. 4, 2019, 3:41 a.m. OK Python 3 TESTS 23 109 0 1400
47848205 Zhadnost C Jan. 2, 2019, 4:01 p.m. OK Python 3 TESTS 23 109 0 1400
47839363 74TrAkToR C Jan. 2, 2019, 10:50 a.m. OK Python 3 TESTS 23 109 0 1400
47771244 eugalt C Dec. 30, 2018, 9:26 p.m. OK Python 3 TESTS 23 109 0 1400
47760501 john21 C Dec. 30, 2018, 4:41 p.m. OK Python 3 TESTS 23 109 0 1400
47753031 shade33 C Dec. 30, 2018, 3:53 p.m. OK Python 3 TESTS 23 109 0 1400
47752021 saku7 C Dec. 30, 2018, 3:47 p.m. OK Python 3 TESTS 23 109 0 1400
48390017 corvvs_ C Jan. 14, 2019, 2:51 p.m. OK Ruby TESTS 23 77 307200 1400
47765170 megachuhancer C Dec. 30, 2018, 5:12 p.m. OK Ruby TESTS 23 77 307200 1400
47759262 wh317706 C Dec. 30, 2018, 4:32 p.m. OK Rust TESTS 23 31 102400 1400
47760799 Dx18 C Dec. 30, 2018, 4:43 p.m. OK Rust TESTS 23 31 819200 1400
47854433 gazaan C Jan. 2, 2019, 8:15 p.m. OK Scala TESTS 23 452 0 1400

remove filters

Back to search problems