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 |
1488
|
Kotlin Heroes: Episode 6 |
FINISHED |
False |
9000 |
122052311 |
March 9, 2021, 2:35 p.m. |
Problems
B"Dalaran is a flying city of magic. It consists of n floating islands connected by m bridges (each bridge can be traversed in both directions). Every island is reachable from every other along these bridges. It would be a shame if some magic experiment went horribly wrong and this magnificent city got destroyed, right? Well, just guess what happened. A portal to demons' realm was opened at the island 1 . This is the start of day 1 of the catastrophe, and all k mages have gathered at the island 1 (they were trying to close the portal, but found out that it was impossible). At the start of day 2 , a gigantic horde of demons will emerge from the portal, capture the island 1 and kill every mage staying at that island. During each day i , if the island v was captured by demons by the start of the day, the horde of demons will travel across all bridges connected directly to v , capture every island they reach, and kill every mage they meet along the way. Each bridge contains exactly one magic stone. Each mage at the start of the day can do one of the following actions: Each magic stone decays in 2 days, so if is picked up in the middle of day i , it decays in the middle of day i + 2 . Decayed stones cannot be used in teleportation ritual. Calculate the maximum number of mages that can get to safety. The first line contains three integers n , m and k ( 2 <= n <= 10^5 ; n - 1 <= m <= 10^5 ; 1 <= k <= 10^5 ) -- the number of islands, the number of bridges and the number of mages. Then m lines follow, the i -th line contains two integers x_i and y_i ( 1 <= x_i, y_i <= n ; x_i ne y_i ) denoting a bridge between the islands x_i and y_i . Each pair of islands has at most one bridge connecting them. Every island is reachable from every other island along the bridges. Print one integer -- the maximum number of m"... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
109501219 |
tourist |
I |
March 9, 2021, 4:03 p.m. |
OK |
Kotlin |
TESTS |
83 |
1216 |
91340800 |
|
|
109521390 |
TadijaSebez |
I |
March 9, 2021, 11:08 p.m. |
OK |
Kotlin |
TESTS |
83 |
1419 |
50483200 |
|
|
109502947 |
eatmore |
I |
March 9, 2021, 4:23 p.m. |
OK |
Kotlin |
TESTS |
83 |
1762 |
31948800 |
|
|
109518340 |
receed |
I |
March 9, 2021, 8:49 p.m. |
OK |
Kotlin |
TESTS |
83 |
2308 |
77516800 |
|
|
109516500 |
receed |
I |
March 9, 2021, 7:59 p.m. |
OK |
Kotlin |
TESTS |
83 |
2402 |
77107200 |
|
|
109517495 |
receed |
I |
March 9, 2021, 8:24 p.m. |
OK |
Kotlin |
TESTS |
83 |
2636 |
77516800 |
|
|
109518439 |
receed |
I |
March 9, 2021, 8:52 p.m. |
OK |
Kotlin |
TESTS |
83 |
2948 |
84275200 |
|
|
109519191 |
receed |
I |
March 9, 2021, 9:20 p.m. |
OK |
Kotlin |
TESTS |
83 |
3229 |
84889600 |
|
|
109506229 |
uwi |
I |
March 9, 2021, 5:04 p.m. |
OK |
Kotlin |
TESTS |
83 |
3883 |
62054400 |
|
|
109505819 |
Tlatoani |
I |
March 9, 2021, 4:59 p.m. |
OK |
Kotlin |
TESTS |
83 |
4898 |
75161600 |
|
|
remove filters
Back to search problems