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 |
---|---|---|---|---|---|---|
1697 | Educational Codeforces Round 130 (Rated for Div. 2) | FINISHED | False | 7200 | 76778699 | June 12, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 25798 ) | A | Parkway Walk | PROGRAMMING | greedy implementation |
B"You are walking through a parkway near your house. The parkway has n+1 benches in a row numbered from 1 to n+1 from left to right. The distance between the bench i and i+1 is a_i meters. Initially, you have m units of energy. To walk 1 meter of distance, you spend 1 unit of your energy. You can't walk if you have no energy. Also, you can restore your energy by sitting on benches (and this is the only way to restore the energy). When you are sitting, you can restore any integer amount of energy you want (if you sit longer, you restore more energy). Note that the amount of your energy can exceed m . Your task is to find the minimum amount of energy you have to restore (by sitting on benches) to reach the bench n+1 from the bench 1 (and end your walk). You have to answer t independent test cases. The first line of the input contains one integer t ( 1 <= t <= 100 ) -- the number of test cases. Then t test cases follow. The first line of the test case contains two integers n and m ( 1 <= n <= 100 ; 1 <= m <= 10^4 ). The second line of the test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 100 ), where a_i is the distance between benches i and i+1 . For each test case, print one integer -- the minimum amount of energy you have to restore (by sitting on benches) to reach the bench n+1 from the bench 1 (and end your walk) in the corresponding test case. In the first test case of the example, you can walk to the bench 2 , spending 1 unit of energy, then restore 2 units of energy on the second bench, walk to the bench 3 , spending 2 units of energy, restore 1 unit of energy and go to the bench 4 . In the third test case of the example, you have enough energy to just go to the bench 6 without sitting at all. "... |
103835 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
160384351 | bluemegane | A | June 12, 2022, 10:57 p.m. | OK | C# 8 | TESTS | 2 | 62 | 409600 | ||
160376353 | Andrei_Kuz | A | June 12, 2022, 7:24 p.m. | OK | Clang++17 Diagnostics | TESTS | 2 | 31 | 0 | ||
160359974 | Wazih | A | June 12, 2022, 4:39 p.m. | OK | GNU C11 | TESTS | 2 | 0 | 0 | ||
160375236 | GTrigger | A | June 12, 2022, 7:06 p.m. | OK | GNU C11 | TESTS | 2 | 0 | 0 | ||
160388519 | pavan54n | A | June 13, 2022, 2:02 a.m. | OK | GNU C11 | TESTS | 2 | 0 | 204800 | ||
160396397 | Sankalp_Bahad | A | June 13, 2022, 5:04 a.m. | OK | GNU C11 | TESTS | 2 | 15 | 0 | ||
160359969 | F._Rabbi_Rithik | A | June 12, 2022, 4:39 p.m. | OK | GNU C11 | TESTS | 2 | 15 | 0 | ||
160357304 | anindyahdec2021 | A | June 12, 2022, 4:32 p.m. | OK | GNU C11 | TESTS | 2 | 15 | 0 | ||
160366187 | noornabinoor1770 | A | June 12, 2022, 5:19 p.m. | OK | GNU C11 | TESTS | 2 | 15 | 0 | ||
160390201 | cryptobear | A | June 13, 2022, 2:48 a.m. | OK | GNU C11 | TESTS | 2 | 15 | 0 | ||
160395045 | saikot_noob | A | June 13, 2022, 4:38 a.m. | OK | GNU C11 | TESTS | 2 | 15 | 0 | ||
160394810 | Paritosh_Kabra | A | June 13, 2022, 4:33 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
160394361 | _Raihan | A | June 13, 2022, 4:24 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
160391395 | bhumireddy.noreddy.ece20 | A | June 13, 2022, 3:18 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
160398979 | Akbar_Abdurahmonov | A | June 13, 2022, 5:50 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
160398524 | Drashti03 | A | June 13, 2022, 5:42 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
160397596 | frust2020 | A | June 13, 2022, 5:25 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
160397438 | JJJJJKFKFKMF | A | June 13, 2022, 5:22 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
160396268 | tzar-21 | A | June 13, 2022, 5:01 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
160396226 | Viraj_Ashar_2001 | A | June 13, 2022, 5:01 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
160395673 | KK_1729 | A | June 13, 2022, 4:50 a.m. | OK | GNU C++14 | TESTS | 2 | 0 | 0 | ||
160398606 | vivekteja411 | A | June 13, 2022, 5:44 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
160399467 | scornmol | A | June 13, 2022, 5:58 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
160399493 | ichigo_kurosaki_ | A | June 13, 2022, 5:58 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
160399422 | surbs | A | June 13, 2022, 5:57 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
160399351 | hehe234 | A | June 13, 2022, 5:56 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
160399292 | ASHDIM | A | June 13, 2022, 5:55 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
160399051 | shivankar_123 | A | June 13, 2022, 5:51 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
160399026 | sushrut22 | A | June 13, 2022, 5:51 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
160398965 | Mizbah01 | A | June 13, 2022, 5:50 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
160398732 | Duck_sajin | A | June 13, 2022, 5:46 a.m. | OK | GNU C++17 | TESTS | 2 | 0 | 0 | ||
160395122 | Akki_D | A | June 13, 2022, 4:39 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
160399720 | Rahul9621 | A | June 13, 2022, 6:01 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
160399621 | LeeJiaHua | A | June 13, 2022, 6 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
160397719 | Pradeepbeginner | A | June 13, 2022, 5:27 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
160397167 | raghhavdturki | A | June 13, 2022, 5:17 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
160394871 | Prakhar6969 | A | June 13, 2022, 4:34 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
160394199 | k1suxu | A | June 13, 2022, 4:21 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
160390006 | HJ5623 | A | June 13, 2022, 2:43 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
160389524 | Soonic | A | June 13, 2022, 2:30 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
160388401 | 1127193030 | A | June 13, 2022, 1:58 a.m. | OK | GNU C++17 (64) | TESTS | 2 | 0 | 0 | ||
160397354 | arjun752 | A | June 13, 2022, 5:21 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
160397226 | 0winterscar0 | A | June 13, 2022, 5:19 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
160397382 | ishwarendra | A | June 13, 2022, 5:21 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
160397726 | sarveshtiwari24 | A | June 13, 2022, 5:27 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
160398138 | Syeda_Raisa_Rahman | A | June 13, 2022, 5:35 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
160398766 | Khairy__ | A | June 13, 2022, 5:46 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
160398866 | QsR11 | A | June 13, 2022, 5:48 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
160399004 | Mushfiq_Talha | A | June 13, 2022, 5:50 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
160399278 | KshmaSingh29 | A | June 13, 2022, 5:55 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
160399362 | neerajgupta0912 | A | June 13, 2022, 5:56 a.m. | OK | GNU C++20 (64) | TESTS | 2 | 0 | 0 | ||
160362933 | peakle | A | June 12, 2022, 4:55 p.m. | OK | Go | TESTS | 2 | 0 | 204800 | ||
160361586 | notposeidon | A | June 12, 2022, 4:47 p.m. | OK | Haskell | TESTS | 2 | 31 | 0 | ||
160378282 | MunirKP | A | June 12, 2022, 7:58 p.m. | OK | Java 11 | TESTS | 2 | 140 | 0 | ||
160388152 | programmingnoob69 | A | June 13, 2022, 1:50 a.m. | OK | Java 11 | TESTS | 2 | 140 | 0 | ||
160385698 | satyaa_78 | A | June 13, 2022, 12:07 a.m. | OK | Java 11 | TESTS | 2 | 140 | 0 | ||
160373511 | AnshAK_910 | A | June 12, 2022, 6:40 p.m. | OK | Java 11 | TESTS | 2 | 155 | 0 | ||
160397402 | Aditya_6174 | A | June 13, 2022, 5:21 a.m. | OK | Java 11 | TESTS | 2 | 155 | 0 | ||
160393774 | bajpaisharanya | A | June 13, 2022, 4:12 a.m. | OK | Java 11 | TESTS | 2 | 155 | 0 | ||
160392058 | swift51385 | A | June 13, 2022, 3:34 a.m. | OK | Java 11 | TESTS | 2 | 155 | 0 | ||
160388690 | enuguru_2002 | A | June 13, 2022, 2:07 a.m. | OK | Java 11 | TESTS | 2 | 155 | 0 | ||
160381267 | aggressor_ | A | June 12, 2022, 9:08 p.m. | OK | Java 11 | TESTS | 2 | 155 | 0 | ||
160380834 | Felay | A | June 12, 2022, 8:56 p.m. | OK | Java 11 | TESTS | 2 | 155 | 0 | ||
160361746 | KhadijaBadrawy | A | June 12, 2022, 4:48 p.m. | OK | Java 8 | TESTS | 2 | 61 | 0 | ||
160398354 | WrongAnswerOnTestCase2 | A | June 13, 2022, 5:39 a.m. | OK | Java 8 | TESTS | 2 | 62 | 0 | ||
160385731 | sanketmakani | A | June 13, 2022, 12:08 a.m. | OK | Java 8 | TESTS | 2 | 77 | 0 | ||
160396425 | swaggy_baba | A | June 13, 2022, 5:04 a.m. | OK | Java 8 | TESTS | 2 | 77 | 0 | ||
160360885 | Lofffy2 | A | June 12, 2022, 4:43 p.m. | OK | Java 8 | TESTS | 2 | 77 | 0 | ||
160385883 | imsd_14 | A | June 13, 2022, 12:15 a.m. | OK | Java 8 | TESTS | 2 | 78 | 0 | ||
160382875 | AbdelrahmanFathy | A | June 12, 2022, 9:57 p.m. | OK | Java 8 | TESTS | 2 | 92 | 37785600 | ||
160388834 | csdn-zhigeng | A | June 13, 2022, 2:11 a.m. | OK | Java 8 | TESTS | 2 | 93 | 0 | ||
160395882 | DylanSmith | A | June 13, 2022, 4:54 a.m. | OK | Java 8 | TESTS | 2 | 93 | 0 | ||
160359318 | CrushChase | A | June 12, 2022, 4:36 p.m. | OK | Java 8 | TESTS | 2 | 109 | 0 | ||
160393601 | __xQc__ | A | June 13, 2022, 4:09 a.m. | OK | JavaScript | TESTS | 2 | 30 | 1024000 | ||
160368150 | sirius08 | A | June 12, 2022, 5:37 p.m. | OK | Kotlin 1.6 | TESTS | 2 | 170 | 0 | ||
160358906 | Karan_Saharan | A | June 12, 2022, 4:34 p.m. | OK | MS C++ 2017 | TESTS | 2 | 0 | 0 | ||
160359875 | priyanshu1101 | A | June 12, 2022, 4:39 p.m. | OK | MS C++ 2017 | TESTS | 2 | 0 | 0 | ||
160391840 | Sanjeev_M_S_D | A | June 13, 2022, 3:29 a.m. | OK | MS C++ 2017 | TESTS | 2 | 0 | 409600 | ||
160363101 | priyanshu1101 | A | June 12, 2022, 4:56 p.m. | OK | MS C++ 2017 | TESTS | 2 | 15 | 0 | ||
160370750 | mahbodeb174 | A | June 12, 2022, 6:05 p.m. | OK | MS C++ 2017 | TESTS | 2 | 15 | 0 | ||
160369760 | mahbodeb174 | A | June 12, 2022, 5:54 p.m. | OK | MS C++ 2017 | TESTS | 2 | 15 | 0 | ||
160363202 | sigilius | A | June 12, 2022, 4:57 p.m. | OK | PyPy 3 | TESTS | 2 | 61 | 1433600 | ||
160357544 | KashishGoel | A | June 12, 2022, 4:33 p.m. | OK | PyPy 3 | TESTS | 2 | 77 | 1433600 | ||
160388521 | Agumon | A | June 13, 2022, 2:02 a.m. | OK | PyPy 3 | TESTS | 2 | 77 | 1433600 | ||
160388995 | quangltfsc0378 | A | June 13, 2022, 2:15 a.m. | OK | PyPy 3 | TESTS | 2 | 78 | 1433600 | ||
160395921 | ambs_ | A | June 13, 2022, 4:55 a.m. | OK | PyPy 3 | TESTS | 2 | 92 | 1536000 | ||
160386841 | YashNandwana | A | June 13, 2022, 1 a.m. | OK | PyPy 3 | TESTS | 2 | 109 | 4096000 | ||
160379746 | ayushgupta71011 | A | June 12, 2022, 8:29 p.m. | OK | PyPy 3 | TESTS | 2 | 109 | 6246400 | ||
160362289 | Ayushman_123 | A | June 12, 2022, 4:51 p.m. | OK | PyPy 3 | TESTS | 2 | 155 | 4608000 | ||
160380311 | aayush___agrawal | A | June 12, 2022, 8:43 p.m. | OK | PyPy 3-64 | TESTS | 2 | 46 | 2252800 | ||
160373669 | bewuwy | A | June 12, 2022, 6:42 p.m. | OK | PyPy 3-64 | TESTS | 2 | 46 | 2252800 | ||
160363281 | BjornRagnarson | A | June 12, 2022, 4:57 p.m. | OK | PyPy 3-64 | TESTS | 2 | 46 | 2355200 | ||
160376107 | r9RLx | A | June 12, 2022, 7:20 p.m. | OK | PyPy 3-64 | TESTS | 2 | 46 | 2355200 | ||
160398027 | radoan.sharkar.richi | A | June 13, 2022, 5:33 a.m. | OK | PyPy 3-64 | TESTS | 2 | 46 | 2355200 | ||
160396135 | Dhruv_Viradiya | A | June 13, 2022, 4:59 a.m. | OK | PyPy 3-64 | TESTS | 2 | 46 | 2355200 | ||
160395020 | alyystaz | A | June 13, 2022, 4:37 a.m. | OK | PyPy 3-64 | TESTS | 2 | 46 | 2355200 | ||
160383108 | ImpactPLayer | A | June 12, 2022, 10:04 p.m. | OK | PyPy 3-64 | TESTS | 2 | 46 | 2355200 | ||
160373081 | SophieHatter | A | June 12, 2022, 6:34 p.m. | OK | PyPy 3-64 | TESTS | 2 | 46 | 2355200 | ||
160370236 | zmonster8 | A | June 12, 2022, 5:59 p.m. | OK | PyPy 3-64 | TESTS | 2 | 46 | 2355200 | ||
160372583 | TheCoach | A | June 12, 2022, 6:28 p.m. | OK | Python 3 | TESTS | 2 | 15 | 0 | ||
160389245 | Israr_Ahmed | A | June 13, 2022, 2:22 a.m. | OK | Python 3 | TESTS | 2 | 30 | 0 | ||
160376297 | Rujul | A | June 12, 2022, 7:23 p.m. | OK | Python 3 | TESTS | 2 | 30 | 0 | ||
160376137 | r9RLx | A | June 12, 2022, 7:20 p.m. | OK | Python 3 | TESTS | 2 | 30 | 0 | ||
160375205 | Lagumists047 | A | June 12, 2022, 7:05 p.m. | OK | Python 3 | TESTS | 2 | 30 | 0 | ||
160371499 | shivambhagat02 | A | June 12, 2022, 6:14 p.m. | OK | Python 3 | TESTS | 2 | 30 | 0 | ||
160366806 | adit_0710 | A | June 12, 2022, 5:24 p.m. | OK | Python 3 | TESTS | 2 | 30 | 0 | ||
160360568 | kimjeongyeon | A | June 12, 2022, 4:42 p.m. | OK | Python 3 | TESTS | 2 | 30 | 0 | ||
160397190 | santhosh231299 | A | June 13, 2022, 5:18 a.m. | OK | Python 3 | TESTS | 2 | 31 | 0 | ||
160393895 | vrishabshetty | A | June 13, 2022, 4:15 a.m. | OK | Python 3 | TESTS | 2 | 31 | 0 | ||
160377817 | utkarsh | A | June 12, 2022, 7:48 p.m. | OK | Ruby 3 | TESTS | 2 | 202 | 102400 | ||
160391526 | Thallium54 | A | June 13, 2022, 3:21 a.m. | OK | Rust 2021 | TESTS | 2 | 0 | 0 | ||
160389782 | Flavanoid | A | June 13, 2022, 2:37 a.m. | OK | Rust 2021 | TESTS | 2 | 15 | 0 |
Back to search problems