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 |
---|---|---|---|---|---|---|
1474 | Codeforces Round 696 (Div. 2) | FINISHED | False | 7200 | 126113063 | Jan. 19, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4052 ) | D | Cleaning | PROGRAMMING | data structures dp greedy implementation |
B"During cleaning the coast, Alice found n piles of stones. The i -th pile has a_i stones. Piles i and i + 1 are neighbouring for all 1 <= q i <= q n - 1 . If pile i becomes empty, piles i - 1 and i + 1 doesn't become neighbouring. Alice is too lazy to remove these stones, so she asked you to take this duty. She allowed you to do only the following operation: Alice understands that sometimes it's impossible to remove all stones with the given operation, so she allowed you to use the following superability: Determine, if it is possible to remove all stones using the superability not more than once. The first line contains a single integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The first line of each test case contains the single integer n ( 2 <= q n <= q 2 cdot 10^5 ) -- the number of piles. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 1 <= q a_i <= q 10^9 ) -- the number of stones in each pile. It is guaranteed that the total sum of n over all test cases doesn't exceed 2 cdot 10^5 . For each test case, print YES or NO -- is it possible to remove all stones using the superability not more than once or not. In the first test case, you can remove all stones without using a superability: [1, 2, 1] rightarrow [1, 1, 0] rightarrow [0, 0, 0] . In the second test case, you can apply superability to the second and the third piles and then act like in the first testcase. In the third test case, you can apply superability to the fourth and the fifth piles, thus getting a = [2, 2, 2, 3, 1] . In the fourth test case, you can apply superability to the first and the second piles, thus getting a = [1900, 2100, 1600, 3000, 1600] . "... |
Codeforces Round #696 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
104833605 | Gassa | D | Jan. 19, 2021, 4:29 p.m. | OK | D | TESTS | 52 | 78 | 13516800 | ||
104835578 | rainboy | D | Jan. 19, 2021, 4:33 p.m. | OK | GNU C11 | TESTS | 52 | 62 | 819200 | ||
104860970 | william555 | D | Jan. 20, 2021, 1:10 a.m. | OK | GNU C++11 | TESTS | 57 | 31 | 2560000 | ||
104869681 | lwhlwh | D | Jan. 20, 2021, 4:44 a.m. | OK | GNU C++11 | TESTS | 57 | 31 | 6451200 | ||
104838752 | 8178541919 | D | Jan. 19, 2021, 5:17 p.m. | OK | GNU C++11 | TESTS | 52 | 31 | 19251200 | ||
104833071 | eudanip | D | Jan. 19, 2021, 4:28 p.m. | OK | GNU C++11 | TESTS | 52 | 46 | 2252800 | ||
104863097 | qdnoip | D | Jan. 20, 2021, 2:16 a.m. | OK | GNU C++11 | TESTS | 57 | 46 | 2457600 | ||
104833739 | Hany02 | D | Jan. 19, 2021, 4:29 p.m. | OK | GNU C++11 | TESTS | 52 | 46 | 2457600 | ||
104872937 | wakaka123411 | D | Jan. 20, 2021, 5:35 a.m. | OK | GNU C++11 | TESTS | 57 | 46 | 2457600 | ||
104831675 | sleep__ | D | Jan. 19, 2021, 4:24 p.m. | OK | GNU C++11 | TESTS | 52 | 46 | 3788800 | ||
104869562 | hoin | D | Jan. 20, 2021, 4:41 a.m. | OK | GNU C++11 | TESTS | 57 | 46 | 5324800 | ||
104839893 | myx12345 | D | Jan. 19, 2021, 5:24 p.m. | OK | GNU C++11 | TESTS | 52 | 46 | 7987200 | ||
104840557 | 0wuming0 | D | Jan. 19, 2021, 5:30 p.m. | OK | GNU C++14 | TESTS | 52 | 62 | 1638400 | ||
104859453 | orangecalculator | D | Jan. 20, 2021, 12:13 a.m. | OK | GNU C++14 | TESTS | 57 | 62 | 3993600 | ||
104865814 | _Nice | D | Jan. 20, 2021, 3:22 a.m. | OK | GNU C++14 | TESTS | 57 | 62 | 12083200 | ||
104843501 | newbie379 | D | Jan. 19, 2021, 5:57 p.m. | OK | GNU C++14 | TESTS | 52 | 77 | 2662400 | ||
104834200 | PerfectIdiot | D | Jan. 19, 2021, 4:30 p.m. | OK | GNU C++14 | TESTS | 52 | 77 | 3174400 | ||
104850934 | rusty-tooth | D | Jan. 19, 2021, 7:49 p.m. | OK | GNU C++14 | TESTS | 54 | 77 | 3276800 | ||
104831876 | S_Aditya | D | Jan. 19, 2021, 4:25 p.m. | OK | GNU C++14 | TESTS | 52 | 77 | 3993600 | ||
104834469 | Sixpathsguy | D | Jan. 19, 2021, 4:31 p.m. | OK | GNU C++14 | TESTS | 52 | 77 | 3993600 | ||
104856566 | coder_pulkit_c | D | Jan. 19, 2021, 10:21 p.m. | OK | GNU C++14 | TESTS | 54 | 77 | 4812800 | ||
104866298 | marcOS | D | Jan. 20, 2021, 3:32 a.m. | OK | GNU C++14 | TESTS | 57 | 77 | 4812800 | ||
104840759 | chen_zexing | D | Jan. 19, 2021, 5:31 p.m. | OK | GNU C++17 | TESTS | 52 | 62 | 1638400 | ||
104862040 | CrazyDiamond | D | Jan. 20, 2021, 1:45 a.m. | OK | GNU C++17 | TESTS | 57 | 62 | 2457600 | ||
104873360 | teng | D | Jan. 20, 2021, 5:41 a.m. | OK | GNU C++17 | TESTS | 57 | 62 | 3993600 | ||
104873753 | LZFeng | D | Jan. 20, 2021, 5:47 a.m. | OK | GNU C++17 | TESTS | 57 | 62 | 5632000 | ||
104838176 | yukihana0416 | D | Jan. 19, 2021, 5:14 p.m. | OK | GNU C++17 | TESTS | 52 | 62 | 20070400 | ||
104844219 | Suru007 | D | Jan. 19, 2021, 6:05 p.m. | OK | GNU C++17 | TESTS | 52 | 77 | 2355200 | ||
104872192 | MaTb3aa | D | Jan. 20, 2021, 5:24 a.m. | OK | GNU C++17 | TESTS | 57 | 77 | 2457600 | ||
104870598 | ZRTMRH | D | Jan. 20, 2021, 5 a.m. | OK | GNU C++17 | TESTS | 57 | 77 | 2457600 | ||
104862500 | gemini_man | D | Jan. 20, 2021, 1:59 a.m. | OK | GNU C++17 | TESTS | 57 | 77 | 2457600 | ||
104858469 | Tiagodfs | D | Jan. 19, 2021, 11:32 p.m. | OK | GNU C++17 | TESTS | 56 | 77 | 2457600 | ||
104847239 | DougNobrega | D | Jan. 19, 2021, 6:46 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 46 | 2457600 | ||
104847764 | Omkar | D | Jan. 19, 2021, 6:54 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 46 | 2560000 | ||
104832436 | ScarletS | D | Jan. 19, 2021, 4:26 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 46 | 3993600 | ||
104835215 | FatihSolak | D | Jan. 19, 2021, 4:33 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 46 | 4812800 | ||
104855180 | clam | D | Jan. 19, 2021, 9:31 p.m. | OK | GNU C++17 (64) | TESTS | 54 | 46 | 4812800 | ||
104842632 | Anish1712 | D | Jan. 19, 2021, 5:48 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 46 | 4915200 | ||
104871969 | dysyn1314 | D | Jan. 20, 2021, 5:21 a.m. | OK | GNU C++17 (64) | TESTS | 57 | 46 | 9830400 | ||
104835579 | thiago_bastos | D | Jan. 19, 2021, 4:33 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 61 | 2457600 | ||
104835685 | border | D | Jan. 19, 2021, 4:33 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 61 | 3276800 | ||
104830796 | Scano | D | Jan. 19, 2021, 4:22 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 61 | 3276800 | ||
104863304 | sarthakmanna | D | Jan. 20, 2021, 2:22 a.m. | OK | Java 11 | TESTS | 57 | 187 | 0 | ||
104842611 | hakr_2104 | D | Jan. 19, 2021, 5:48 p.m. | OK | Java 11 | TESTS | 52 | 202 | 0 | ||
104862919 | kusomushi | D | Jan. 20, 2021, 2:12 a.m. | OK | Java 11 | TESTS | 57 | 218 | 0 | ||
104832370 | saptarshi1729 | D | Jan. 19, 2021, 4:26 p.m. | OK | Java 11 | TESTS | 52 | 233 | 4403200 | ||
104845151 | Okhair | D | Jan. 19, 2021, 6:16 p.m. | OK | Java 11 | TESTS | 52 | 234 | 716800 | ||
104831538 | bobib | D | Jan. 19, 2021, 4:24 p.m. | OK | Java 11 | TESTS | 52 | 249 | 1331200 | ||
104837879 | amnsng | D | Jan. 19, 2021, 5:13 p.m. | OK | Java 11 | TESTS | 52 | 265 | 0 | ||
104841632 | anhpp | D | Jan. 19, 2021, 5:38 p.m. | OK | Java 11 | TESTS | 52 | 405 | 259891200 | ||
104841856 | anhpp | D | Jan. 19, 2021, 5:40 p.m. | OK | Java 11 | TESTS | 52 | 436 | 259891200 | ||
104860772 | jamesfan961101 | D | Jan. 20, 2021, 1:03 a.m. | OK | Java 11 | TESTS | 57 | 452 | 0 | ||
104848458 | ManchesterCityFC | D | Jan. 19, 2021, 7:05 p.m. | OK | Java 8 | TESTS | 52 | 155 | 0 | ||
104858799 | flyman3046 | D | Jan. 19, 2021, 11:46 p.m. | OK | Java 8 | TESTS | 57 | 171 | 5120000 | ||
104858346 | flyman3046 | D | Jan. 19, 2021, 11:27 p.m. | OK | Java 8 | TESTS | 56 | 171 | 5120000 | ||
104859745 | 2020akadaver | D | Jan. 20, 2021, 12:24 a.m. | OK | Java 8 | TESTS | 57 | 171 | 5222400 | ||
104870695 | Akmal_developer | D | Jan. 20, 2021, 5:01 a.m. | OK | Java 8 | TESTS | 57 | 171 | 5324800 | ||
104846530 | AdhmMohamed | D | Jan. 19, 2021, 6:35 p.m. | OK | Java 8 | TESTS | 52 | 171 | 8806400 | ||
104856870 | hu_tao | D | Jan. 19, 2021, 10:32 p.m. | OK | Java 8 | TESTS | 54 | 202 | 7987200 | ||
104852450 | subhamdtu | D | Jan. 19, 2021, 8:20 p.m. | OK | Java 8 | TESTS | 54 | 233 | 15974400 | ||
104866021 | Spheniscine | D | Jan. 20, 2021, 3:27 a.m. | OK | Kotlin | TESTS | 57 | 155 | 0 | ||
104864431 | Spheniscine | D | Jan. 20, 2021, 2:47 a.m. | OK | Kotlin | TESTS | 57 | 155 | 0 | ||
104848862 | arvindf232 | D | Jan. 19, 2021, 7:11 p.m. | OK | Kotlin | TESTS | 53 | 171 | 819200 | ||
104865229 | VClZ | D | Jan. 20, 2021, 3:09 a.m. | OK | MS C++ | TESTS | 57 | 62 | 2457600 | ||
104833637 | tarattata1 | D | Jan. 19, 2021, 4:29 p.m. | OK | MS C++ 2017 | TESTS | 52 | 78 | 5017600 | ||
104838735 | youx | D | Jan. 19, 2021, 5:17 p.m. | OK | MS C++ 2017 | TESTS | 52 | 78 | 6656000 | ||
104857718 | wjli | D | Jan. 19, 2021, 11:03 p.m. | OK | MS C++ 2017 | TESTS | 54 | 202 | 6451200 | ||
104845383 | grey | D | Jan. 19, 2021, 6:20 p.m. | OK | MS C++ 2017 | TESTS | 52 | 234 | 3174400 | ||
104844557 | babaiserror | D | Jan. 19, 2021, 6:09 p.m. | OK | PyPy 2 | TESTS | 52 | 171 | 21913600 | ||
104846315 | Gaurav1 | D | Jan. 19, 2021, 6:32 p.m. | OK | PyPy 2 | TESTS | 52 | 187 | 21094400 | ||
104851069 | kisszots | D | Jan. 19, 2021, 7:52 p.m. | OK | PyPy 3 | TESTS | 54 | 233 | 19456000 | ||
104854949 | silvertint | D | Jan. 19, 2021, 9:24 p.m. | OK | PyPy 3 | TESTS | 54 | 326 | 18227200 | ||
104839592 | nehan_der_thal | D | Jan. 19, 2021, 5:22 p.m. | OK | PyPy 3 | TESTS | 52 | 327 | 17817600 | ||
104853992 | silvertint | D | Jan. 19, 2021, 8:58 p.m. | OK | PyPy 3 | TESTS | 54 | 327 | 18534400 | ||
104840966 | jimm89 | D | Jan. 19, 2021, 5:33 p.m. | OK | PyPy 3 | TESTS | 52 | 420 | 23654400 | ||
104852472 | Satwik_Tiwari | D | Jan. 19, 2021, 8:20 p.m. | OK | PyPy 3 | TESTS | 54 | 451 | 23654400 | ||
104837984 | vegetable_chicken1234567 | D | Jan. 19, 2021, 5:13 p.m. | OK | PyPy 3 | TESTS | 52 | 498 | 32153600 | ||
104839595 | eepsilon | D | Jan. 19, 2021, 5:22 p.m. | OK | PyPy 3 | TESTS | 52 | 498 | 40960000 | ||
104854454 | akshitm16 | D | Jan. 19, 2021, 9:11 p.m. | OK | PyPy 3 | TESTS | 54 | 498 | 47411200 | ||
104859600 | dominator1234 | D | Jan. 20, 2021, 12:18 a.m. | OK | PyPy 3 | TESTS | 57 | 686 | 43212800 | ||
104849748 | sh1194 | D | Jan. 19, 2021, 7:28 p.m. | OK | Python 3 | TESTS | 54 | 249 | 17100800 | ||
104849523 | sh1194 | D | Jan. 19, 2021, 7:24 p.m. | OK | Python 3 | TESTS | 54 | 592 | 33689600 | ||
104849663 | sh1194 | D | Jan. 19, 2021, 7:26 p.m. | OK | Python 3 | TESTS | 54 | 607 | 33894400 |
Back to search problems