Codeforces Round 857 (Div. 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
1801 Codeforces Round 857 (Div. 1) FINISHED False 10800 58911863 March 9, 2023, 9:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 612 ) F Another n-dimensional chocolate bar PROGRAMMING dp number theory

B'Vasya and his friends want to cut a chocolate bar to get at least k pieces, while Vasya wants to maximize the volume of the smallest of them. It is possible to cut the chocolate bar only at the junction of the lobules, and each incision must pass through the entire chocolate bar along some hyperplane involved in the formation of lobules. Only after making all the cuts, Vasya disassembles the chocolate into pieces. More formally, Vasya wants to choose the numbers b_1, b_2, ... , b_n ( 1 <= b_i <= a_i ) -- the number of parts into which Vasya will cut the chocolate bar along each dimension. The condition b_1 cdot b_2 cdot ldots cdot b_n ge k must be met to get at least k pieces after all cuts. It can be noted that with optimal cutting with such parameters, the minimum piece will contain lfloor frac{a_1}{b_1} rfloor ... m lfloor frac{a_n}{b_n} rfloor slices, and its volume will be equal to lfloor frac{a_1}{b_1} rfloor ... m lfloor frac{a_n}{b_n} rfloor cdot frac{1}{a_1 a_2 cdots a_n} . Vasya wants to get the maximum possible value of the volume of the minimum piece multiplied by k , that is, he wants to maximize the number of lfloor frac{a_1}{b_1} rfloor ... m lfloor frac{a_n}{b_n} rfloor cdot frac{1}{a_1 a_2 cdots a_n} cdot k . Help him with this. The first line contains two integers n and k (1 <= n <= 100 , 1 <= k <= 10^7) -- the dimension of the chocolate bar, and how many parts it needs to be divided into. The second line contains n integers a_1, a_2, ... , a_n (1 <= a_i <= 10^7) -- the number of pieces on which the chocolate is placed along each of the dimensions. Print one number -- the maximum possible volume of the smallest of the obtained pieces, multiplied by k , with an absolute or relative error of no more than 10^{-9} . If it is impossible to cut a chocolate bar into at least k pieces u'...

Tutorials

Codeforces Round #857 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
196672443 YeahPotato F March 9, 2023, 2:30 p.m. OK GNU C++14 TESTS 83 483 52224000
196735783 Skyjoy F March 10, 2023, 4:22 a.m. OK GNU C++14 TESTS 85 499 62668800
196647648 yyyyxh F March 9, 2023, 12:02 p.m. OK GNU C++14 TESTS 81 530 48128000
196626022 hos.lyric F March 9, 2023, 10:51 a.m. OK GNU C++14 TESTS 81 561 61235200
196642399 _Diu_ F March 9, 2023, 11:45 a.m. OK GNU C++14 TESTS 81 577 11980800
196649853 Isonan F March 9, 2023, 12:09 p.m. OK GNU C++14 TESTS 81 639 52224000
196726389 wythend F March 10, 2023, 12:45 a.m. OK GNU C++14 TESTS 84 670 12185600
196742049 Rotting F March 10, 2023, 5:50 a.m. OK GNU C++14 TESTS 85 779 288460800
196653373 peiwenjun F March 9, 2023, 12:20 p.m. OK GNU C++14 TESTS 81 920 55193600
196651141 Chinese_zjc_ F March 9, 2023, 12:13 p.m. OK GNU C++14 TESTS 81 920 94515200
196731685 chasedeath F March 10, 2023, 2:59 a.m. OK GNU C++17 TESTS 84 234 132915200
196732308 chasedeath F March 10, 2023, 3:12 a.m. OK GNU C++17 TESTS 84 249 132915200
196731907 chasedeath F March 10, 2023, 3:04 a.m. OK GNU C++17 TESTS 84 264 128716800
196673455 chen_zexing F March 9, 2023, 2:36 p.m. OK GNU C++17 TESTS 83 343 614400
196731474 chasedeath F March 10, 2023, 2:54 a.m. OK GNU C++17 TESTS 84 405 127897600
196653045 chinerist F March 9, 2023, 12:19 p.m. OK GNU C++17 TESTS 81 421 204800
196642394 Lightnessqwq F March 9, 2023, 11:45 a.m. OK GNU C++17 TESTS 81 592 64819200
196633301 hank55663 F March 9, 2023, 11:15 a.m. OK GNU C++17 TESTS 81 670 36044800
196737469 JosthnaBattu_28 F March 10, 2023, 4:51 a.m. OK GNU C++17 TESTS 85 732 182579200
196731102 chasedeath F March 10, 2023, 2:45 a.m. OK GNU C++17 TESTS 84 779 167936000
196666510 SSRS_ F March 9, 2023, 1:55 p.m. OK GNU C++17 (64) TESTS 81 249 45363200
196665462 DerekFeng F March 9, 2023, 1:50 p.m. OK GNU C++17 (64) TESTS 81 390 189337600
196635439 yzc2005 F March 9, 2023, 11:22 a.m. OK GNU C++17 (64) TESTS 81 451 48640000
196619644 QAQAutoMaton F March 9, 2023, 10:30 a.m. OK GNU C++17 (64) TESTS 81 483 36147200
196652971 orz F March 9, 2023, 12:19 p.m. OK GNU C++17 (64) TESTS 81 514 11059200
196628375 BeyondHeaven F March 9, 2023, 10:59 a.m. OK GNU C++17 (64) TESTS 81 546 40345600
196650653 potato167 F March 9, 2023, 12:11 p.m. OK GNU C++17 (64) TESTS 81 592 13721600
196649630 fuppy F March 9, 2023, 12:08 p.m. OK GNU C++17 (64) TESTS 81 608 50688000
196675007 Dawnq F March 9, 2023, 2:47 p.m. OK GNU C++17 (64) TESTS 83 623 69017600
196624132 orzdevinwang F March 9, 2023, 10:45 a.m. OK GNU C++17 (64) TESTS 81 624 99635200
196631833 inaFSTream F March 9, 2023, 11:10 a.m. OK GNU C++20 (64) TESTS 81 217 204800
196665144 Scintilla06 F March 9, 2023, 1:48 p.m. OK GNU C++20 (64) TESTS 81 390 51814400
196665319 fireskydd F March 9, 2023, 1:49 p.m. OK GNU C++20 (64) TESTS 81 405 189235200
196654539 AK-Dream F March 9, 2023, 12:24 p.m. OK GNU C++20 (64) TESTS 81 452 46796800
196647195 GOODer F March 9, 2023, 12:01 p.m. OK GNU C++20 (64) TESTS 81 467 12185600
196695356 fallleaves07 F March 9, 2023, 5:32 p.m. OK GNU C++20 (64) TESTS 84 467 91955200
196681894 ABhavyaSri F March 9, 2023, 3:46 p.m. OK GNU C++20 (64) TESTS 84 468 102400
196674420 platelet F March 9, 2023, 2:43 p.m. OK GNU C++20 (64) TESTS 83 468 102400
196641651 UltiMadow F March 9, 2023, 11:43 a.m. OK GNU C++20 (64) TESTS 81 483 56627200
196726321 Vercingetorix F March 10, 2023, 12:43 a.m. OK GNU C++20 (64) TESTS 84 499 11980800

remove filters

Back to search problems