VK Cup 2018 - Round 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
923 VK Cup 2018 - Round 1 FINISHED False 7200 211127099 March 10, 2018, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5038 ) A Primal Sport PROGRAMMING math number theory 1700

B"Alice and Bob begin their day with a quick game. They first choose a starting number X0 xe2 x80 x89 xe2 x89 xa5 xe2 x80 x893 and try to reach one million by the process described below. Alice goes first and then they take alternating turns. In the i-th turn, the player whose turn it is selects a prime number smaller than the current number, and announces the smallest multiple of this prime number that is not smaller than the current number. Formally, he or she selects a prime p xe2 x80 x89< xe2 x80 x89Xi xe2 x80 x89- xe2 x80 x891 and then finds the minimum Xi xe2 x80 x89 xe2 x89 xa5 xe2 x80 x89Xi xe2 x80 x89- xe2 x80 x891 such that p divides Xi. Note that if the selected prime p already divides Xi xe2 x80 x89- xe2 x80 x891, then the number does not change. Eve has witnessed the state of the game after two turns. Given X2, help her determine what is the smallest possible starting number X0. Note that the players don't necessarily play optimally. You should consider all possible game evolutions. The input contains a single integer X2 (4 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89X2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106). It is guaranteed that the integer X2 is composite, that is, is not prime. Output a single integer -- the minimum possible X0. In the first test, the smallest possible starting number is X0 xe2 x80 x89= xe2 x80 x896. One possible course of the game is as follows: In the second case, let X0 xe2 x80 x89= xe2 x80 x8915. "...

Tutorials

VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2) editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
36169849 Slonik AHTOH._. A March 10, 2018, 5:04 p.m. OK FPC TESTS 50 30 1638400 1700
36176444 NikNag A March 10, 2018, 7:19 p.m. OK FPC TESTS 50 109 5734400 1700
36351041 OpKos A March 17, 2018, 10:35 a.m. OK FPC TESTS 50 202 4096000 1700
36170587 PazaMaza slavik228 A March 10, 2018, 5:08 p.m. OK FPC TESTS 50 436 71475200 1700
36171589 nightcrowler vassabbi A March 10, 2018, 5:15 p.m. OK FPC TESTS 50 670 11673600 1700
36179022 RccHD A March 10, 2018, 8:39 p.m. OK GNU C TESTS 50 31 5836800 1700
36535112 vjudge4 A March 23, 2018, 3:30 p.m. OK GNU C TESTS 50 31 7372800 1700
36171427 Igor_1 A March 10, 2018, 5:14 p.m. OK GNU C++ TESTS 50 15 2048000 1700
36159415 hamlet A March 10, 2018, 3:58 p.m. OK GNU C++ TESTS 50 15 3072000 1700
36273691 Carl___P A March 14, 2018, 11:47 a.m. OK GNU C++ TESTS 50 15 5836800 1700
36213484 X_o_r A March 12, 2018, 2:04 a.m. OK GNU C++ TESTS 50 15 5836800 1700
36210285 mhmazidi4 A March 11, 2018, 8:41 p.m. OK GNU C++ TESTS 50 15 6041600 1700
36247796 vjudge2 A March 13, 2018, 12:23 p.m. OK GNU C++ TESTS 50 15 6041600 1700
36211590 lmageste A March 11, 2018, 10:31 p.m. OK GNU C++ TESTS 50 30 5836800 1700
36277732 vjudge1 A March 14, 2018, 1:45 p.m. OK GNU C++ TESTS 50 30 6041600 1700
36165627 belesprit 0xFED A March 10, 2018, 4:35 p.m. OK GNU C++ TESTS 50 31 3072000 1700
40380105 Siyuan A July 15, 2018, 1:30 p.m. OK GNU C++ TESTS 50 31 3788800 1700
47650849 vjudge1 A Dec. 28, 2018, 4:16 p.m. OK GNU C11 TESTS 50 31 3993600 1700
43379363 dalek_cos A Sept. 24, 2018, 5:41 p.m. OK GNU C11 TESTS 50 31 3993600 1700
47442873 vjudge2 A Dec. 24, 2018, 3:35 a.m. OK GNU C11 TESTS 50 31 3993600 1700
47453481 vjudge1 A Dec. 24, 2018, 11:12 a.m. OK GNU C11 TESTS 50 31 3993600 1700
47453497 vjudge3 A Dec. 24, 2018, 11:13 a.m. OK GNU C11 TESTS 50 31 3993600 1700
36199325 shoroh_cmc A March 11, 2018, 12:30 p.m. OK GNU C11 TESTS 50 31 6860800 1700
37437278 vjudge4 A April 18, 2018, 1:06 p.m. OK GNU C11 TESTS 50 31 7372800 1700
37505152 vjudge3 A April 21, 2018, 6:31 a.m. OK GNU C11 TESTS 50 31 7577600 1700
47795349 vjudge4 A Dec. 31, 2018, 4:29 p.m. OK GNU C11 TESTS 50 31 7987200 1700
47815608 vjudge1 A Jan. 1, 2019, 2:12 p.m. OK GNU C11 TESTS 50 31 7987200 1700
36159222 Neodym Mogby A March 10, 2018, 3:57 p.m. OK GNU C++11 TESTS 50 15 2048000 1700
36168855 Polynom gol9 A March 10, 2018, 4:57 p.m. OK GNU C++11 TESTS 50 15 2048000 1700
36221572 AlexKats A March 12, 2018, 11:19 a.m. OK GNU C++11 TESTS 50 15 3174400 1700
36159348 afedor trilis A March 10, 2018, 3:58 p.m. OK GNU C++11 TESTS 50 15 6041600 1700
36242177 zby1051284776 A March 13, 2018, 8:21 a.m. OK GNU C++11 TESTS 50 15 6041600 1700
47459795 Silencer_A A Dec. 24, 2018, 2:28 p.m. OK GNU C++11 TESTS 50 30 3993600 1700
36717512 FuckKrydom A March 29, 2018, 11:29 a.m. OK GNU C++11 TESTS 50 30 4608000 1700
36182831 Godiswithme A March 11, 2018, 2:01 a.m. OK GNU C++11 TESTS 50 30 5836800 1700
36246240 MudCoal A March 13, 2018, 11:36 a.m. OK GNU C++11 TESTS 50 30 5836800 1700
36170887 wy2ka4 Kaum A March 10, 2018, 5:10 p.m. OK GNU C++11 TESTS 50 30 6041600 1700
36174779 wilcot A March 10, 2018, 5:33 p.m. OK GNU C++14 TESTS 50 15 3993600 1700
36160514 ELDAN Sabo A March 10, 2018, 4:04 p.m. OK GNU C++14 TESTS 50 15 5836800 1700
36183760 Mirbek_aka A March 11, 2018, 3:01 a.m. OK GNU C++14 TESTS 50 15 5939200 1700
36157815 teleport A March 10, 2018, 3:51 p.m. OK GNU C++14 TESTS 50 15 5939200 1700
36228798 NewBie0000 A March 12, 2018, 3:41 p.m. OK GNU C++14 TESTS 50 15 5939200 1700
36190722 sanjay.gidwani A March 11, 2018, 7:39 a.m. OK GNU C++14 TESTS 50 15 5939200 1700
36157811 Akel A March 10, 2018, 3:51 p.m. OK GNU C++14 TESTS 50 15 12390400 1700
36171994 Catmoonlight AliceG A March 10, 2018, 5:18 p.m. OK GNU C++14 TESTS 50 30 2048000 1700
36173214 eriksa Lana01 A March 10, 2018, 5:25 p.m. OK GNU C++14 TESTS 50 30 2867200 1700
36169862 Mr.Nobody43 dimdem A March 10, 2018, 5:04 p.m. OK GNU C++14 TESTS 50 30 2867200 1700
36231927 Vest. A March 12, 2018, 6:06 p.m. OK GNU C++17 TESTS 50 15 5939200 1700
36218582 DorMouse_Rui A March 12, 2018, 9:03 a.m. OK GNU C++17 TESTS 50 15 6041600 1700
43394064 darfeikus A Sept. 25, 2018, 3:50 a.m. OK GNU C++17 TESTS 50 30 0 1700
36174615 Wert48 vmos1999 A March 10, 2018, 5:32 p.m. OK GNU C++17 TESTS 50 30 3993600 1700
36178801 Astana_enu A March 10, 2018, 8:29 p.m. OK GNU C++17 TESTS 50 30 5939200 1700
36243560 _Knight_ A March 13, 2018, 9:34 a.m. OK GNU C++17 TESTS 50 30 9011200 1700
51842642 luogu_bot5 A March 26, 2019, 12:17 a.m. OK GNU C++17 TESTS 50 31 1433600 1700
36171920 KostasKostil A March 10, 2018, 5:17 p.m. OK GNU C++17 TESTS 50 31 2048000 1700
36157263 khadaev A March 10, 2018, 3:48 p.m. OK GNU C++17 TESTS 50 31 2867200 1700
69056626 binhtranit A Jan. 18, 2020, 2:45 p.m. OK GNU C++17 TESTS 50 31 3993600 1700
36276179 sodagreenmario A March 14, 2018, 12:56 p.m. OK GNU C++17 Diagnostics TESTS 50 1013 104857600 1700
36510092 kostyanf14 A March 22, 2018, 4:54 p.m. OK Go TESTS 50 108 28262400 1700
36509642 kostyanf14 A March 22, 2018, 4:37 p.m. OK Go TESTS 50 108 28364800 1700
58672556 hasan5788 A Aug. 12, 2019, 3:01 p.m. OK Java 8 TESTS 50 124 5836800 1700
36355373 beroul A March 17, 2018, 1:32 p.m. OK Java 8 TESTS 50 139 20684800 1700
36161715 vlad107 vadimmm A March 10, 2018, 4:11 p.m. OK Java 8 TESTS 50 140 20684800 1700
36663067 chandan5284 A March 27, 2018, 9:23 a.m. OK Java 8 TESTS 50 140 20684800 1700
36276666 Musin A March 14, 2018, 1:11 p.m. OK Java 8 TESTS 50 140 20684800 1700
36218372 warrior_c A March 12, 2018, 8:52 a.m. OK Java 8 TESTS 50 140 20684800 1700
36170747 dmd161100 safiullinzufar A March 10, 2018, 5:09 p.m. OK Java 8 TESTS 50 140 20684800 1700
36166562 nepoklonov ark1 A March 10, 2018, 4:41 p.m. OK Java 8 TESTS 50 140 20684800 1700
36159266 iakovlev.zakhar Pennyroyal_Tea A March 10, 2018, 3:57 p.m. OK Java 8 TESTS 50 140 20684800 1700
36162651 tmwilliamlin168 RockyB A March 10, 2018, 4:16 p.m. OK Java 8 TESTS 50 140 20787200 1700
43414295 TheTeraBlitz A Sept. 25, 2018, 2:47 p.m. OK JavaScript TESTS 50 670 1433600 1700
43391047 TheTeraBlitz A Sept. 25, 2018, 1:08 a.m. OK JavaScript TESTS 50 670 1433600 1700
43391011 ludovic.cyril A Sept. 25, 2018, 1:06 a.m. OK JavaScript TESTS 50 686 1433600 1700
36162888 AdMiRaLL emelyan A March 10, 2018, 4:18 p.m. OK MS C# TESTS 50 1435 20684800 1700
36161080 kumino ilita1337 A March 10, 2018, 4:07 p.m. OK MS C++ TESTS 50 30 6041600 1700
36169864 DimonK Naduxa A March 10, 2018, 5:04 p.m. OK MS C++ TESTS 50 31 3788800 1700
57915313 vjudge2 A July 29, 2019, 12:45 a.m. OK MS C++ TESTS 50 31 3993600 1700
43393089 AMadBaby A Sept. 25, 2018, 3:04 a.m. OK MS C++ TESTS 50 31 3993600 1700
43391404 yoplo15 A Sept. 25, 2018, 1:30 a.m. OK MS C++ TESTS 50 31 3993600 1700
43383427 JimHolguin A Sept. 24, 2018, 7:01 p.m. OK MS C++ TESTS 50 31 3993600 1700
38584773 vjudge5 A May 24, 2018, 11:36 a.m. OK MS C++ TESTS 50 31 3993600 1700
36242524 chopsticksmemset A March 13, 2018, 8:44 a.m. OK MS C++ TESTS 50 31 6041600 1700
36242543 chopsticksmemset A March 13, 2018, 8:45 a.m. OK MS C++ TESTS 50 31 6041600 1700
36162872 Pavel231299 Ivan_Bondarev A March 10, 2018, 4:18 p.m. OK MS C++ TESTS 50 31 6041600 1700
64484824 Hapsidra A Nov. 7, 2019, 5:20 p.m. OK MS C++ 2017 TESTS 50 46 3993600 1700
64483967 Hapsidra A Nov. 7, 2019, 5 p.m. OK MS C++ 2017 TESTS 50 998 5324800 1700
43393064 joaquinrios A Sept. 25, 2018, 3:03 a.m. OK PyPy 2 TESTS 50 156 4198400 1700
43391537 duncanista A Sept. 25, 2018, 1:40 a.m. OK PyPy 2 TESTS 50 171 4198400 1700
36644480 vjudge4 A March 26, 2018, 1:54 p.m. OK PyPy 3 TESTS 50 155 29798400 1700
36193402 shoroh_cmc A March 11, 2018, 9:05 a.m. OK PyPy 3 TESTS 50 155 33280000 1700
36230593 Marble1 A March 12, 2018, 5:02 p.m. OK PyPy 3 TESTS 50 156 32256000 1700
43415496 pmp360 A Sept. 25, 2018, 3:18 p.m. OK PyPy 3 TESTS 50 187 8806400 1700
42381006 ilya_ust A Sept. 2, 2018, 3:13 p.m. OK PyPy 3 TESTS 50 217 6758400 1700
62229892 alexanderanchishkin A Oct. 9, 2019, 8:14 p.m. OK PyPy 3 TESTS 50 233 13721600 1700
43390037 TRS A Sept. 25, 2018, 12:01 a.m. OK PyPy 3 TESTS 50 342 21811200 1700
36178949 zvv A March 10, 2018, 8:36 p.m. OK PyPy 3 TESTS 50 748 21504000 1700
54666430 Sevlll A May 26, 2019, 1:38 p.m. OK PyPy 3 TESTS 50 1122 5120000 1700
36431934 vjudge3 A March 20, 2018, 12:07 p.m. OK PyPy 3 TESTS 50 1294 22323200 1700
43393612 Daniel64 A Sept. 25, 2018, 3:30 a.m. OK Python 2 TESTS 50 670 32665600 1700
43389911 luisalcantara A Sept. 24, 2018, 11:52 p.m. OK Python 2 TESTS 50 826 28467200 1700
43391723 r7perezyera A Sept. 25, 2018, 1:50 a.m. OK Python 2 TESTS 50 857 28467200 1700
42365066 ilya_ust A Sept. 2, 2018, 2:07 p.m. OK Python 3 TESTS 50 608 3993600 1700
43395235 GustavoDLRA A Sept. 25, 2018, 4:48 a.m. OK Python 3 TESTS 50 764 5939200 1700
43382481 EliasMera A Sept. 24, 2018, 6:41 p.m. OK Python 3 TESTS 50 764 6041600 1700
42380636 ilya_ust A Sept. 2, 2018, 3:11 p.m. OK Python 3 TESTS 50 904 6246400 1700
36503562 s_p A March 22, 2018, 1:15 p.m. OK Python 3 TESTS 50 951 12083200 1700
43395401 luis_palomino A Sept. 25, 2018, 4:55 a.m. OK Python 3 TESTS 50 951 29184000 1700
37793994 yclrz A May 1, 2018, 9:38 a.m. OK Python 3 TESTS 50 966 12083200 1700
36172096 nkorobkov A March 10, 2018, 5:18 p.m. OK Python 3 TESTS 50 982 9113600 1700
43390061 luislucatero21 A Sept. 25, 2018, 12:03 a.m. OK Python 3 TESTS 50 1029 29388800 1700
43391992 RamonRomeroTec A Sept. 25, 2018, 2:04 a.m. OK Python 3 TESTS 50 1060 6041600 1700

remove filters

Back to search problems