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 |
1119
|
Codeforces Global Round 2 |
FINISHED |
False |
7200 |
177272699 |
April 6, 2019, 11:35 a.m. |
Problems
B"Recently Evlampy installed one interesting computer game, one of aspects of which is to split army into several groups and then fight with enemy's groups. Let us consider a simplified version of the battle. In the nearest battle Evlampy should fight an enemy army that consists of m groups, the i -th of which has hp_i health points. Evlampy's army consists of n equal soldiers. Before each battle he should split his army in exactly m groups (possibly, empty) so that the total size of the groups is n . The battle is played step-by-step. On each step each of Evlampy's groups attacks exactly one enemy group. Thus, each step is described with an array of m integers a_1, a_2, ldots, a_m , meaning that the i -th Evlampy's group attacks the a_i -th enemy group. Different groups can attack same group, on each step the array a is chosen independently. After each step the health points of each enemy group decreases by the total number of soldiers in Evlampy's groups that attacked this enemy group at this step. Enemy group is destroyed once its health points are zero or negative. Evlampy's soldiers do not lose health. Evlampy understands that the upcoming battle will take the whole night. He became sad because this way he won't have enough time to finish his homework. Now Evlampy wants you to write a program that will help him win in the smallest possible number of steps. Can you help him? In other words, find the smallest number of steps needed to destroy all enemy groups and show a possible way of doing this. Find the requires splitting of the army into m groups and the arrays a for each step. The first line contains two integers n and m ( 1 <= q m <= q n <= q 10^{6} ) -- the number of soldiers in Evlampy's army and the number of groups in enemy army. m is also equal to the maximum possible number of groups Evlampy can split the army to. The second line contains m "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
52466270 |
YangDavid |
G |
April 7, 2019, 3:50 p.m. |
OK |
GNU C++11 |
TESTS |
60 |
109 |
18841600 |
|
3000 |
54564996 |
dysyn1314 |
G |
May 24, 2019, 3:54 p.m. |
OK |
GNU C++11 |
TESTS |
60 |
156 |
18329600 |
|
3000 |
53664714 |
tkysss |
G |
May 2, 2019, 9:42 a.m. |
OK |
GNU C++11 |
TESTS |
60 |
171 |
46182400 |
|
3000 |
52671156 |
FizzyDavid |
G |
April 13, 2019, 7:36 a.m. |
OK |
GNU C++11 |
TESTS |
60 |
202 |
40652800 |
|
3000 |
52528888 |
DQS |
G |
April 9, 2019, 12:40 p.m. |
OK |
GNU C++11 |
TESTS |
60 |
311 |
12083200 |
|
3000 |
52439351 |
GGAutomaton |
G |
April 7, 2019, 5:45 a.m. |
OK |
GNU C++11 |
TESTS |
60 |
311 |
12083200 |
|
3000 |
52889142 |
ohweonfire |
G |
April 17, 2019, 7 a.m. |
OK |
GNU C++11 |
TESTS |
60 |
311 |
14336000 |
|
3000 |
52534978 |
luogu_bot4 |
G |
April 9, 2019, 3:10 p.m. |
OK |
GNU C++11 |
TESTS |
60 |
327 |
12083200 |
|
3000 |
52548142 |
luogu_bot2 |
G |
April 10, 2019, 12:30 a.m. |
OK |
GNU C++11 |
TESTS |
60 |
327 |
20070400 |
|
3000 |
52769256 |
xgzepto |
G |
April 15, 2019, 7:23 a.m. |
OK |
GNU C++11 |
TESTS |
60 |
327 |
44134400 |
|
3000 |
54505649 |
pandawei |
G |
May 23, 2019, 3:31 a.m. |
OK |
GNU C++14 |
TESTS |
60 |
155 |
46284800 |
|
3000 |
52483564 |
yasugongshang |
G |
April 8, 2019, 7:24 a.m. |
OK |
GNU C++14 |
TESTS |
60 |
171 |
35840000 |
|
3000 |
52525801 |
tokitsukaze |
G |
April 9, 2019, 11:25 a.m. |
OK |
GNU C++14 |
TESTS |
60 |
280 |
32870400 |
|
3000 |
52512487 |
mobu233 |
G |
April 9, 2019, 1:11 a.m. |
OK |
GNU C++14 |
TESTS |
60 |
342 |
16076800 |
|
3000 |
52594114 |
yybyyb |
G |
April 11, 2019, 7:50 a.m. |
OK |
GNU C++14 |
TESTS |
60 |
342 |
24064000 |
|
3000 |
52609128 |
newbiegcz |
G |
April 11, 2019, 3:13 p.m. |
OK |
GNU C++14 |
TESTS |
60 |
374 |
24064000 |
|
3000 |
52501375 |
zhy123 |
G |
April 8, 2019, 4:16 p.m. |
OK |
GNU C++14 |
TESTS |
60 |
405 |
14336000 |
|
3000 |
52445128 |
fstqaq |
G |
April 7, 2019, 7:44 a.m. |
OK |
GNU C++14 |
TESTS |
60 |
405 |
14540800 |
|
3000 |
52560391 |
schtomi97 |
G |
April 10, 2019, 10:02 a.m. |
OK |
GNU C++14 |
TESTS |
60 |
405 |
40345600 |
|
3000 |
52563062 |
dujvet |
G |
April 10, 2019, 11:23 a.m. |
OK |
GNU C++14 |
TESTS |
60 |
420 |
7987200 |
|
3000 |
54153209 |
CMXRYNP |
G |
May 15, 2019, 2:21 a.m. |
OK |
GNU C++17 |
TESTS |
60 |
108 |
19046400 |
|
3000 |
52548140 |
zqy1018 |
G |
April 10, 2019, 12:30 a.m. |
OK |
GNU C++17 |
TESTS |
60 |
342 |
20070400 |
|
3000 |
52747162 |
me_Rose_max_Always_AK |
G |
April 14, 2019, 12:14 p.m. |
OK |
GNU C++17 |
TESTS |
60 |
358 |
11980800 |
|
3000 |
66577124 |
HyscereXD |
G |
Dec. 10, 2019, 7:50 a.m. |
OK |
GNU C++17 |
TESTS |
60 |
358 |
12083200 |
|
3000 |
66746585 |
user202729_ |
G |
Dec. 13, 2019, 2:56 a.m. |
OK |
GNU C++17 |
TESTS |
60 |
420 |
11980800 |
|
3000 |
52540074 |
sheaf |
G |
April 9, 2019, 5:36 p.m. |
OK |
GNU C++17 |
TESTS |
60 |
420 |
11980800 |
|
3000 |
59241449 |
MathAlex |
G |
Aug. 21, 2019, 7:58 p.m. |
OK |
GNU C++17 |
TESTS |
60 |
420 |
14336000 |
|
3000 |
53793493 |
gyz_gyz |
G |
May 5, 2019, 2:12 p.m. |
OK |
GNU C++17 |
TESTS |
60 |
436 |
7987200 |
|
3000 |
52753610 |
dafeng |
G |
April 14, 2019, 3:27 p.m. |
OK |
GNU C++17 |
TESTS |
60 |
436 |
7987200 |
|
3000 |
52624980 |
njtech1401170211 |
G |
April 12, 2019, 2:28 a.m. |
OK |
GNU C++17 |
TESTS |
60 |
436 |
7987200 |
|
3000 |
53183173 |
dalt |
G |
April 23, 2019, 8:46 a.m. |
OK |
Java 8 |
TESTS |
60 |
311 |
59084800 |
|
3000 |
53182083 |
dalt |
G |
April 23, 2019, 8:12 a.m. |
OK |
Java 8 |
TESTS |
60 |
311 |
65843200 |
|
3000 |
52431440 |
lucasr |
G |
April 6, 2019, 11:18 p.m. |
OK |
Java 8 |
TESTS |
60 |
733 |
61337600 |
|
3000 |
remove filters
Back to search problems