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 |
1346
|
Kotlin Heroes: Episode 4 |
FINISHED |
False |
9000 |
153674660 |
May 29, 2020, 2:35 p.m. |
Problems
B'Polycarp is developing a new version of an old video game "Pac-Man". Though he really enjoyed playing the original game, he didn 't like some aspects of it, so he decided to alter the rules a bit. In Polycarp 's version, you play as Pac-Man and you have to collect pellets scattered over the game world while avoiding dangerous ghosts (no difference from the original yet). Polycarp didn 't like the fact that there was no escape from the ghosts in the original, so, in his version, the game world is divided into n safe zones with m one-directional pathways between them -- and it is guaranteed that Pac-Man can reach any safe zone from any other. Since safe zones are safe, the ghosts cannot attack Pac-Man while it is there, it is in danger only while traversing the pathways. Pac-Man starts the game in the safe zone s . All pellets are scattered over the safe zones; initially, the i -th safe zone contains a_i pellets (and if Pac-Man is in a safe zone, it may freely collect all the pellets in it). The pellets disappear after being collected, but after the last pellet in the game world is collected, new pellets spawn in the safe zones in the same quantity as before ( a_i new pellets spawn in the i -th zone). The pellets can be respawned any number of times, so the game is essentially infinite. Polycarp has already determined the structure of the game world and the number of pellets in each safe zone. Now he is trying to find out if the game is difficult enough. There are q goals in the game, the i -th goal is to collect at least C_i pellets from the beginning of the game. Polycarp denotes the difficulty of the i -th goal as the minimum number of times the player has to traverse a one-directional pathway in order to collect C_i pellets (since only traversing a pathway puts Pac-Man in danger). If some pathway is traversed multiple times while Pac-Man is collecting the pellets, it is included in the answe'... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
81989304 |
Beta_R |
I |
May 30, 2020, 6:33 p.m. |
OK |
Kotlin |
TESTS |
128 |
483 |
36966400 |
|
2900 |
81912215 |
eatmore |
I |
May 29, 2020, 4:50 p.m. |
OK |
Kotlin |
TESTS |
128 |
499 |
37068800 |
|
2900 |
81907156 |
tourist |
I |
May 29, 2020, 4:04 p.m. |
OK |
Kotlin |
TESTS |
128 |
623 |
41984000 |
|
2900 |
82178400 |
yongwhan |
I |
June 1, 2020, 5:07 a.m. |
OK |
Kotlin |
TESTS |
128 |
670 |
41984000 |
|
2900 |
82112318 |
Hydra_Mafiaa |
I |
May 31, 2020, 3:46 p.m. |
OK |
Kotlin |
TESTS |
128 |
670 |
41984000 |
|
2900 |
82153189 |
Benq |
I |
May 31, 2020, 6:43 p.m. |
OK |
Kotlin |
TESTS |
128 |
686 |
716800 |
|
2900 |
82000709 |
ll931110 |
I |
May 30, 2020, 11:46 p.m. |
OK |
Kotlin |
TESTS |
128 |
1435 |
16588800 |
|
2900 |
81917499 |
Shajib_ |
I |
May 29, 2020, 5:53 p.m. |
OK |
Kotlin |
TESTS |
128 |
1715 |
261017600 |
|
2900 |
81915036 |
TadijaSebez |
I |
May 29, 2020, 5:20 p.m. |
OK |
Kotlin |
TESTS |
128 |
1794 |
261017600 |
|
2900 |
81913990 |
Egor |
I |
May 29, 2020, 5:08 p.m. |
OK |
Kotlin |
TESTS |
128 |
2246 |
55808000 |
|
2900 |
remove filters
Back to search problems