COMPFEST 15 - Preliminary Online Mirror (Unrated, ICPC Rules, Teams Preferred)

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
1866 COMPFEST 15 - Preliminary Online Mirror (Unrated, ICPC Rules, Teams Preferred) FINISHED False 18000 38080499 Sept. 3, 2023, 12:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 727 ) L Lihmuf Balling PROGRAMMING brute force math

B'After working at a factory (Lihmuf Sorting), Lihmuf wants to play a game with his good friend, Pak Chanek. There are N boxes numbered from 1 to N . The i -th box contains i balls. Pak Chanek and Lihmuf will play a game using those boxes. There will be N turns numbered from 1 to N . On each turn, Pak Chanek chooses one box and takes all balls from that box, then Lihmuf does the same thing for one box he chooses (it is possible that the two chosen boxes are the same). Given an integer M . Before the game begins, Lihmuf must choose an integer K satisfying 1 <= q K <= q M . It is known that on the j -th turn, Pak Chanek will choose the j -th box, while Lihmuf will choose the y -th box, with y=((j x K - 1) bmod N) + 1 . Help Lihmuf choose the correct value of K so that he will get as many balls as possible! If there are more than one possible values of K that result in the maximum total balls, find the minimum such value of K . Keep in mind that each box can be chosen more than once, but after a box is chosen for the first time, the box becomes empty. The only line contains two integers N and M ( 1 <= q N <= q 10^9 ; 1 <= q M <= q 2000 ) -- the number of boxes and the maximum limit for the value of K . An integer representing the value of K that will make Lihmuf get as many balls as possible. If there are more than one possible value of K that result in the maximum total balls, find the minimum such value of K . In the first example, if Lihmuf chooses K=1 , the game will go as follows: In total, Lihmuf gets 0+0+0=0 balls. The maximum total balls that can be earned by Lihmuf is 0 because he can only choose K=1 . Therefore, K=1 is the minimum possible value of K that results in the maximum total balls. In the second example, if Lihmuf chooses K=3 , the game will go as follows: '...

Tutorials

COMPFEST 15 Preliminary — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
221716113 ItsJerr sidaaaaa NHiL L Sept. 3, 2023, 3:48 p.m. OK GNU C++14 TESTS 39 62 0
221699050 PEIMUDA bilibilitdasc Error_Yuan L Sept. 3, 2023, 2:04 p.m. OK GNU C++14 TESTS 39 62 0
221694677 zihouzhong ttklwxx Arraiter L Sept. 3, 2023, 1:41 p.m. OK GNU C++14 TESTS 39 78 0
221717899 Kaitokid AboAbdoMC Naseem17 L Sept. 3, 2023, 4 p.m. OK GNU C++14 TESTS 39 93 0
221718069 slenbol XZC__Bobby leexzq L Sept. 3, 2023, 4:02 p.m. OK GNU C++14 TESTS 39 109 0
221714661 Sanat Ryshi yuvrajKharayat L Sept. 3, 2023, 3:38 p.m. OK GNU C++14 TESTS 39 109 204800
221705866 StarSilk L Sept. 3, 2023, 2:41 p.m. OK GNU C++14 TESTS 39 124 307200
221712804 realskc User_Carrot N_z__ L Sept. 3, 2023, 3:25 p.m. OK GNU C++14 TESTS 39 140 0
221760232 stoWhaleAtcolaorz L Sept. 4, 2023, 1:08 a.m. OK GNU C++14 TESTS 39 343 0
221772176 Sai_Rohit-30021 L Sept. 4, 2023, 5:04 a.m. OK GNU C++14 TESTS 39 358 0
221769146 a757403 L Sept. 4, 2023, 4:12 a.m. OK GNU C++17 TESTS 39 46 0
221691755 potato167 L Sept. 3, 2023, 1:26 p.m. OK GNU C++17 TESTS 39 46 0
221764130 marcOS L Sept. 4, 2023, 2:44 a.m. OK GNU C++17 TESTS 39 62 0
221731863 gdryrp L Sept. 3, 2023, 5:52 p.m. OK GNU C++17 TESTS 39 62 0
221722726 Potassium L Sept. 3, 2023, 4:36 p.m. OK GNU C++17 TESTS 39 62 0
221704931 Rewenix tkacper Amtek L Sept. 3, 2023, 2:36 p.m. OK GNU C++17 TESTS 39 62 204800
221699292 sapphire15 tokusakurai torisasami L Sept. 3, 2023, 2:05 p.m. OK GNU C++17 TESTS 39 62 512000
221775208 Pyqe L Sept. 4, 2023, 5:48 a.m. OK GNU C++17 TESTS 39 78 0
221712763 aymanrasheed7 serotonin Alpha_Q L Sept. 3, 2023, 3:25 p.m. OK GNU C++17 TESTS 39 78 0
221773439 Micchon L Sept. 4, 2023, 5:23 a.m. OK GNU C++17 TESTS 39 218 0
221699827 kotatsugame L Sept. 3, 2023, 2:08 p.m. OK GNU C++17 (64) TESTS 39 46 0
221699534 red-stone LXH-cat wsyear L Sept. 3, 2023, 2:06 p.m. OK GNU C++17 (64) TESTS 39 46 0
221753633 wwdd L Sept. 3, 2023, 10:03 p.m. OK GNU C++17 (64) TESTS 39 62 0
221720812 YocyCraft L Sept. 3, 2023, 4:23 p.m. OK GNU C++17 (64) TESTS 39 62 0
221700597 K-H ttcwws CodingJellyfish L Sept. 3, 2023, 2:12 p.m. OK GNU C++17 (64) TESTS 39 62 0
221708843 SmartBamboo Misono_Mika Suiji_SUI L Sept. 3, 2023, 3 p.m. OK GNU C++17 (64) TESTS 39 62 102400
221715017 zhangjianjuncd Imakf -14 L Sept. 3, 2023, 3:41 p.m. OK GNU C++17 (64) TESTS 39 78 0
221703982 crescent_yhw TheAshenWitch yuanhaowei L Sept. 3, 2023, 2:30 p.m. OK GNU C++17 (64) TESTS 39 78 102400
221713920 BARBARIANNNNN Hank2019 EasonTAO L Sept. 3, 2023, 3:33 p.m. OK GNU C++17 (64) TESTS 39 93 102400
221697858 Morphymorphymorphy L Sept. 3, 2023, 1:57 p.m. OK GNU C++17 (64) TESTS 39 109 0
221729864 hardstucknewbie L Sept. 3, 2023, 5:33 p.m. OK GNU C++20 (64) TESTS 39 46 0
221726841 1459007298 L Sept. 3, 2023, 5:06 p.m. OK GNU C++20 (64) TESTS 39 46 0
221712772 TKT_YI L Sept. 3, 2023, 3:25 p.m. OK GNU C++20 (64) TESTS 39 46 0
221703347 Heltion L Sept. 3, 2023, 2:26 p.m. OK GNU C++20 (64) TESTS 39 46 0
221702600 ayingna L Sept. 3, 2023, 2:23 p.m. OK GNU C++20 (64) TESTS 39 46 0
221699174 user202729_ nvmdava rama_pang L Sept. 3, 2023, 2:04 p.m. OK GNU C++20 (64) TESTS 39 46 0
221771253 BuddhaBarFans L Sept. 4, 2023, 4:50 a.m. OK GNU C++20 (64) TESTS 39 62 0
221767504 36champ L Sept. 4, 2023, 3:45 a.m. OK GNU C++20 (64) TESTS 39 62 0
221728745 LeXuanBeo L Sept. 3, 2023, 5:23 p.m. OK GNU C++20 (64) TESTS 39 62 0
221724444 doudouille raphaelp L Sept. 3, 2023, 4:49 p.m. OK GNU C++20 (64) TESTS 39 62 0
221709835 arvindf232 L Sept. 3, 2023, 3:06 p.m. OK Kotlin 1.6 TESTS 39 623 0
221718098 misorin L Sept. 3, 2023, 4:02 p.m. OK PyPy 3-64 TESTS 39 623 3072000

remove filters

Back to search problems