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 |
---|---|---|---|---|---|---|
1612 | Educational Codeforces Round 117 (Rated for Div. 2) | FINISHED | False | 7200 | 99692663 | Nov. 22, 2021, 9:35 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 629 ) | F | Armor and Weapons | PROGRAMMING | brute force dp greedy shortest paths |
B"Monocarp plays a computer game. There are n different sets of armor and m different weapons in this game. If a character equips the i -th set of armor and wields the j -th weapon, their power is usually equal to i + j ; but some combinations of armor and weapons synergize well. Formally, there is a list of q ordered pairs, and if the pair (i, j) belongs to this list, the power of the character equipped with the i -th set of armor and wielding the j -th weapon is not i + j , but i + j + 1 . Initially, Monocarp's character has got only the 1 -st armor set and the 1 -st weapon. Monocarp can obtain a new weapon or a new set of armor in one hour. If he wants to obtain the k -th armor set or the k -th weapon, he must possess a combination of an armor set and a weapon that gets his power to k or greater. Of course, after Monocarp obtains a weapon or an armor set, he can use it to obtain new armor sets or weapons, but he can go with any of the older armor sets and/or weapons as well. Monocarp wants to obtain the n -th armor set and the m -th weapon. What is the minimum number of hours he has to spend on it? The first line contains two integers n and m ( 2 <= n, m <= 2 cdot 10^5 ) -- the number of armor sets and the number of weapons, respectively. The second line contains one integer q ( 0 <= q <= min(2 cdot 10^5, nm) ) -- the number of combinations that synergize well. Then q lines follow, the i -th line contains two integers a_i and b_i ( 1 <= a_i <= n ; 1 <= b_i <= m ) meaning that the a_i -th armor set synergizes well with the b_i -th weapon. All pairs (a_i, b_i) are distinct. Print one integer -- the minimum number of hours Monocarp has to spend to obtain both the n -th armor set and the m -th weapon. In the first example, Monocarp can obtain the strongest armor set an"... |
97164 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
136528428 | eecs | F | Nov. 22, 2021, 2:49 p.m. | OK | GNU C++14 | TESTS | 110 | 156 | 6348800 | ||
136504237 | IsaacMoris | F | Nov. 22, 2021, 1:08 p.m. | OK | GNU C++14 | TESTS | 110 | 171 | 11468800 | ||
136567481 | CharlesWuQiushi | F | Nov. 23, 2021, 4:43 a.m. | OK | GNU C++14 | TESTS | 110 | 202 | 6656000 | ||
136485431 | AlexWangr | F | Nov. 22, 2021, 12:50 p.m. | OK | GNU C++14 | TESTS | 110 | 202 | 13004800 | ||
136560285 | luogu_bot0 | F | Nov. 23, 2021, 1:32 a.m. | OK | GNU C++14 | TESTS | 110 | 218 | 24473600 | ||
136561327 | DataStructures | F | Nov. 23, 2021, 2:10 a.m. | OK | GNU C++14 | TESTS | 110 | 234 | 77107200 | ||
136560072 | luogu_bot0 | F | Nov. 23, 2021, 1:24 a.m. | OK | GNU C++14 | TESTS | 110 | 280 | 49766400 | ||
136558311 | luogu_bot0 | F | Nov. 23, 2021, 12:10 a.m. | OK | GNU C++14 | TESTS | 110 | 296 | 48844800 | ||
136524599 | ButterCake | F | Nov. 22, 2021, 2:10 p.m. | OK | GNU C++14 | TESTS | 110 | 296 | 71680000 | ||
136559417 | ddd. | F | Nov. 23, 2021, 1 a.m. | OK | GNU C++14 | TESTS | 110 | 327 | 13516800 | ||
136468347 | HS90R | F | Nov. 22, 2021, 11:28 a.m. | OK | GNU C++17 | TESTS | 110 | 124 | 8294400 | ||
136470454 | TheScrasse | F | Nov. 22, 2021, 11:33 a.m. | OK | GNU C++17 | TESTS | 110 | 139 | 3993600 | ||
136469170 | HS90R | F | Nov. 22, 2021, 11:30 a.m. | OK | GNU C++17 | TESTS | 110 | 155 | 8601600 | ||
136509295 | oipotato | F | Nov. 22, 2021, 1:11 p.m. | OK | GNU C++17 | TESTS | 110 | 171 | 27238400 | ||
136518491 | maomao90 | F | Nov. 22, 2021, 1:29 p.m. | OK | GNU C++17 | TESTS | 110 | 202 | 7372800 | ||
136481574 | T500 | F | Nov. 22, 2021, 12:13 p.m. | OK | GNU C++17 | TESTS | 110 | 202 | 10956800 | ||
136522666 | T500 | F | Nov. 22, 2021, 1:51 p.m. | OK | GNU C++17 | TESTS | 110 | 217 | 7372800 | ||
136480782 | kaikey | F | Nov. 22, 2021, 12:06 p.m. | OK | GNU C++17 | TESTS | 110 | 217 | 29900800 | ||
136483233 | LipArcanjo | F | Nov. 22, 2021, 12:29 p.m. | OK | GNU C++17 | TESTS | 110 | 218 | 9523200 | ||
136569160 | ZcqLovesWyr | F | Nov. 23, 2021, 5:18 a.m. | OK | GNU C++17 | TESTS | 110 | 249 | 16179200 | ||
136557980 | basic_string | F | Nov. 22, 2021, 11:57 p.m. | OK | GNU C++17 (64) | TESTS | 110 | 140 | 22016000 | ||
136557684 | ysysys | F | Nov. 22, 2021, 11:41 p.m. | OK | GNU C++17 (64) | TESTS | 110 | 155 | 22016000 | ||
136468778 | realskc | F | Nov. 22, 2021, 11:29 a.m. | OK | GNU C++17 (64) | TESTS | 110 | 171 | 10649600 | ||
136562215 | Blondie | F | Nov. 23, 2021, 2:35 a.m. | OK | GNU C++17 (64) | TESTS | 110 | 202 | 11264000 | ||
136560207 | QwQcOrZ | F | Nov. 23, 2021, 1:29 a.m. | OK | GNU C++17 (64) | TESTS | 110 | 233 | 69836800 | ||
136562160 | Blondie | F | Nov. 23, 2021, 2:33 a.m. | OK | GNU C++17 (64) | TESTS | 110 | 234 | 11264000 | ||
136562113 | Blondie | F | Nov. 23, 2021, 2:32 a.m. | OK | GNU C++17 (64) | TESTS | 110 | 234 | 11264000 | ||
136483893 | FatihSolak | F | Nov. 22, 2021, 12:35 p.m. | OK | GNU C++17 (64) | TESTS | 110 | 264 | 43417600 | ||
136468282 | FatihSolak | F | Nov. 22, 2021, 11:28 a.m. | OK | GNU C++17 (64) | TESTS | 110 | 264 | 43417600 | ||
136559573 | hjqiusl | F | Nov. 23, 2021, 1:06 a.m. | OK | GNU C++17 (64) | TESTS | 110 | 280 | 23040000 | ||
136482785 | alek0618 | F | Nov. 22, 2021, 12:25 p.m. | OK | GNU C++20 (64) | TESTS | 110 | 109 | 10956800 | ||
136481771 | alek0618 | F | Nov. 22, 2021, 12:15 p.m. | OK | GNU C++20 (64) | TESTS | 110 | 109 | 11673600 | ||
136562335 | lmnopqrst | F | Nov. 23, 2021, 2:38 a.m. | OK | GNU C++20 (64) | TESTS | 110 | 140 | 21708800 | ||
136562101 | lmnopqrst | F | Nov. 23, 2021, 2:31 a.m. | OK | GNU C++20 (64) | TESTS | 110 | 140 | 21708800 | ||
136486267 | zglicz | F | Nov. 22, 2021, 12:57 p.m. | OK | GNU C++20 (64) | TESTS | 110 | 202 | 61849600 | ||
136494253 | achvanov | F | Nov. 22, 2021, 1:06 p.m. | OK | GNU C++20 (64) | TESTS | 110 | 217 | 11264000 | ||
136561983 | lmnopqrst | F | Nov. 23, 2021, 2:28 a.m. | OK | GNU C++20 (64) | TESTS | 110 | 217 | 22630400 | ||
136483568 | java. | F | Nov. 22, 2021, 12:32 p.m. | OK | GNU C++20 (64) | TESTS | 110 | 249 | 11264000 | ||
136482273 | cppmaster228 | F | Nov. 22, 2021, 12:20 p.m. | OK | GNU C++20 (64) | TESTS | 110 | 249 | 11264000 | ||
136562409 | wasa855 | F | Nov. 23, 2021, 2:40 a.m. | OK | GNU C++20 (64) | TESTS | 110 | 249 | 34406400 | ||
136531690 | OLOGY | F | Nov. 22, 2021, 3:27 p.m. | OK | PyPy 2 | TESTS | 110 | 311 | 29388800 | ||
136531602 | OLOGY | F | Nov. 22, 2021, 3:26 p.m. | OK | PyPy 2 | TESTS | 110 | 1248 | 17510400 | ||
136548854 | NecroSean38 | F | Nov. 22, 2021, 7:40 p.m. | OK | PyPy 3 | TESTS | 110 | 1840 | 66150400 | ||
136548652 | NecroSean38 | F | Nov. 22, 2021, 7:36 p.m. | OK | PyPy 3 | TESTS | 110 | 1980 | 69120000 | ||
136531730 | OLOGY | F | Nov. 22, 2021, 3:27 p.m. | OK | Python 2 | TESTS | 110 | 935 | 29900800 | ||
136549540 | sansen | F | Nov. 22, 2021, 7:55 p.m. | OK | Rust | TESTS | 110 | 46 | 7680000 |
Back to search problems