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 |
---|---|---|---|---|---|---|
1749 | Educational Codeforces Round 138 (Rated for Div. 2) | FINISHED | False | 7200 | 70989863 | Oct. 20, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 21297 ) | B | Death's Blessing | PROGRAMMING | greedy |
B'You are playing a computer game. To pass the current level, you have to kill a big horde of monsters. In this horde, there are n monsters standing in the row, numbered from 1 to n . The i -th monster has a_i health and a special "Death 's Blessing" spell of strength b_i attached to it. You are going to kill all of them one by one. It takes exactly h seconds to kill a monster with health h . When the i -th monster dies, it casts its spell that increases the health of its neighbors by b_i (the neighbors of the j -th monster in the row are the monsters on places j - 1 and j + 1 . The first and the last monsters have only one neighbor each). After each monster is killed, the row shrinks, so its former neighbors become adjacent to each other (so if one of them dies, the other one is affected by its spell). For example, imagine a situation with 4 monsters with health a = [2, 6, 7, 3] and spells b = [3, 6, 0, 5] . One of the ways to get rid of the monsters is shown below: As a result, we can kill all monsters in 6 + 13 + 8 + 6 = 33 seconds. Note that it 's only an example and may not be the fastest way to get rid of the monsters. What is the minimum time required to kill all monsters in the row? The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of monsters in the row. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ) -- the initial health of corresponding monsters. The third line contains n integers b_1, b_2, ... , b_n ( 0 <= b_i <= 10^9 ), where b_i is the strength of the spell for the i -th monster. It 's guaranteed that the sum of n doesn 't exceed 2 cdot 10^5 . For each test case, print one integer xe2'... |
108269 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
177258248 | AutumnMist | B | Oct. 21, 2022, 4:38 a.m. | OK | C# 10 | TESTS | 3 | 233 | 28057600 | ||
177222150 | ansergeyg | B | Oct. 20, 2022, 5:50 p.m. | OK | C# 8 | TESTS | 3 | 218 | 31744000 | ||
177264187 | NAVYA_30710 | B | Oct. 21, 2022, 5:59 a.m. | OK | Clang++17 Diagnostics | TESTS | 3 | 1949 | 2457600 | ||
177255814 | Wlf0000 | B | Oct. 21, 2022, 3:56 a.m. | OK | Clang++20 Diagnostics | TESTS | 3 | 1949 | 3686400 | ||
177218752 | auroraaaa | B | Oct. 20, 2022, 5:21 p.m. | OK | GNU C11 | TESTS | 3 | 78 | 1228800 | ||
177228959 | namanpahwa20 | B | Oct. 20, 2022, 7:02 p.m. | OK | GNU C11 | TESTS | 3 | 78 | 1228800 | ||
177218830 | rakhi41237 | B | Oct. 20, 2022, 5:22 p.m. | OK | GNU C11 | TESTS | 3 | 78 | 1228800 | ||
177207395 | zl17 | B | Oct. 20, 2022, 4:27 p.m. | OK | GNU C11 | TESTS | 3 | 93 | 1228800 | ||
177205621 | Daddy_is_here | B | Oct. 20, 2022, 4:22 p.m. | OK | GNU C11 | TESTS | 3 | 93 | 2355200 | ||
177203755 | SaifullahMnsur | B | Oct. 20, 2022, 4:17 p.m. | OK | GNU C11 | TESTS | 3 | 108 | 1228800 | ||
177220356 | meh.reen | B | Oct. 20, 2022, 5:34 p.m. | OK | GNU C11 | TESTS | 3 | 109 | 1126400 | ||
177209478 | 1294101739 | B | Oct. 20, 2022, 4:31 p.m. | OK | GNU C11 | TESTS | 3 | 109 | 3174400 | ||
177252062 | xsdjg | B | Oct. 21, 2022, 2:51 a.m. | OK | GNU C++14 | TESTS | 3 | 15 | 1638400 | ||
177246949 | Leasier | B | Oct. 21, 2022, 1:02 a.m. | OK | GNU C++14 | TESTS | 3 | 61 | 0 | ||
177212161 | tripplet | B | Oct. 20, 2022, 4:39 p.m. | OK | GNU C++14 | TESTS | 3 | 93 | 0 | ||
177204222 | mc_hyuse202 | B | Oct. 20, 2022, 4:18 p.m. | OK | GNU C++14 | TESTS | 3 | 93 | 614400 | ||
177204811 | halfway_there1 | B | Oct. 20, 2022, 4:20 p.m. | OK | GNU C++14 | TESTS | 3 | 93 | 614400 | ||
177223513 | Essa2006 | B | Oct. 20, 2022, 6:03 p.m. | OK | GNU C++14 | TESTS | 3 | 93 | 1228800 | ||
177254701 | Sumon_ali_ | B | Oct. 21, 2022, 3:38 a.m. | OK | GNU C++14 | TESTS | 3 | 93 | 1228800 | ||
177211847 | yxy252425 | B | Oct. 20, 2022, 4:38 p.m. | OK | GNU C++14 | TESTS | 3 | 93 | 1638400 | ||
177243633 | JoesSR | B | Oct. 20, 2022, 11:33 p.m. | OK | GNU C++14 | TESTS | 3 | 93 | 1638400 | ||
177209379 | keatszhu | B | Oct. 20, 2022, 4:31 p.m. | OK | GNU C++14 | TESTS | 3 | 93 | 1638400 | ||
177244041 | XiaoWhy | B | Oct. 20, 2022, 11:46 p.m. | OK | GNU C++17 | TESTS | 3 | 61 | 0 | ||
177248196 | love147love | B | Oct. 21, 2022, 1:30 a.m. | OK | GNU C++17 | TESTS | 3 | 62 | 1638400 | ||
177209340 | whker_kzc | B | Oct. 20, 2022, 4:31 p.m. | OK | GNU C++17 | TESTS | 3 | 78 | 1536000 | ||
177213890 | NikanGh | B | Oct. 20, 2022, 4:48 p.m. | OK | GNU C++17 | TESTS | 3 | 78 | 1638400 | ||
177243938 | XiaoWhy | B | Oct. 20, 2022, 11:43 p.m. | OK | GNU C++17 | TESTS | 3 | 78 | 3174400 | ||
177220809 | singham_20 | B | Oct. 20, 2022, 5:38 p.m. | OK | GNU C++17 | TESTS | 3 | 78 | 3891200 | ||
177209098 | yyYyYyy_ | B | Oct. 20, 2022, 4:31 p.m. | OK | GNU C++17 | TESTS | 3 | 78 | 15974400 | ||
177248686 | yaozhuojiang | B | Oct. 21, 2022, 1:42 a.m. | OK | GNU C++17 | TESTS | 3 | 92 | 0 | ||
177257302 | Janardhan_03 | B | Oct. 21, 2022, 4:22 a.m. | OK | GNU C++17 | TESTS | 3 | 92 | 0 | ||
177227192 | Jafar_Emad_Almjersah | B | Oct. 20, 2022, 6:42 p.m. | OK | GNU C++17 | TESTS | 3 | 93 | 0 | ||
177228958 | ehsjisc | B | Oct. 20, 2022, 7:02 p.m. | OK | GNU C++17 (64) | TESTS | 3 | 46 | 2457600 | ||
177246661 | Awesome3.14 | B | Oct. 21, 2022, 12:55 a.m. | OK | GNU C++17 (64) | TESTS | 3 | 61 | 0 | ||
177252495 | PurpleCrayon | B | Oct. 21, 2022, 2:58 a.m. | OK | GNU C++17 (64) | TESTS | 3 | 61 | 0 | ||
177211832 | importlogic | B | Oct. 20, 2022, 4:38 p.m. | OK | GNU C++17 (64) | TESTS | 3 | 61 | 2457600 | ||
177215522 | Omja | B | Oct. 20, 2022, 4:57 p.m. | OK | GNU C++17 (64) | TESTS | 3 | 62 | 0 | ||
177250983 | Fan_zf | B | Oct. 21, 2022, 2:31 a.m. | OK | GNU C++17 (64) | TESTS | 3 | 62 | 0 | ||
177242945 | sandoval | B | Oct. 20, 2022, 11:09 p.m. | OK | GNU C++17 (64) | TESTS | 3 | 62 | 0 | ||
177235115 | enslaved | B | Oct. 20, 2022, 8:27 p.m. | OK | GNU C++17 (64) | TESTS | 3 | 62 | 1228800 | ||
177246001 | hhh3 | B | Oct. 21, 2022, 12:38 a.m. | OK | GNU C++17 (64) | TESTS | 3 | 62 | 1228800 | ||
177254632 | Messywind | B | Oct. 21, 2022, 3:37 a.m. | OK | GNU C++17 (64) | TESTS | 3 | 62 | 2457600 | ||
177222388 | _uzumaki | B | Oct. 20, 2022, 5:52 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 30 | 2457600 | ||
177225336 | nilesh070802 | B | Oct. 20, 2022, 6:22 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 30 | 2457600 | ||
177206071 | Elias_Obeid | B | Oct. 20, 2022, 4:23 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 31 | 0 | ||
177221113 | nirmalgovindaraj | B | Oct. 20, 2022, 5:41 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 31 | 0 | ||
177249979 | zacharychao | B | Oct. 21, 2022, 2:11 a.m. | OK | GNU C++20 (64) | TESTS | 3 | 31 | 0 | ||
177261257 | imtiyazrasool92 | B | Oct. 21, 2022, 5:23 a.m. | OK | GNU C++20 (64) | TESTS | 3 | 31 | 1228800 | ||
177228172 | pOintoNepErcent | B | Oct. 20, 2022, 6:52 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 31 | 1228800 | ||
177221901 | Hamboli_ | B | Oct. 20, 2022, 5:48 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 31 | 1228800 | ||
177202874 | czhang2718 | B | Oct. 20, 2022, 4:15 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 31 | 1228800 | ||
177242372 | TainelDreik | B | Oct. 20, 2022, 10:53 p.m. | OK | GNU C++20 (64) | TESTS | 3 | 31 | 2457600 | ||
177249862 | thevan96 | B | Oct. 21, 2022, 2:08 a.m. | OK | Go | TESTS | 3 | 249 | 7782400 | ||
177212854 | Spidey2182 | B | Oct. 20, 2022, 4:43 p.m. | OK | Java 11 | TESTS | 3 | 186 | 0 | ||
177228784 | princeayush04 | B | Oct. 20, 2022, 7 p.m. | OK | Java 11 | TESTS | 3 | 233 | 1638400 | ||
177257121 | kowai_ | B | Oct. 21, 2022, 4:19 a.m. | OK | Java 11 | TESTS | 3 | 248 | 40345600 | ||
177245995 | the_unseen | B | Oct. 21, 2022, 12:38 a.m. | OK | Java 11 | TESTS | 3 | 249 | 0 | ||
177260875 | T_PAVAN_NAGARAJU | B | Oct. 21, 2022, 5:17 a.m. | OK | Java 11 | TESTS | 3 | 264 | 2150400 | ||
177243618 | peiyeliu | B | Oct. 20, 2022, 11:33 p.m. | OK | Java 11 | TESTS | 3 | 264 | 2150400 | ||
177238359 | doomhammer. | B | Oct. 20, 2022, 9:19 p.m. | OK | Java 11 | TESTS | 3 | 265 | 2355200 | ||
177219433 | g_square | B | Oct. 20, 2022, 5:27 p.m. | OK | Java 11 | TESTS | 3 | 280 | 0 | ||
177245471 | jhariharan99official | B | Oct. 21, 2022, 12:23 a.m. | OK | Java 11 | TESTS | 3 | 280 | 1433600 | ||
177229018 | rachita2597 | B | Oct. 20, 2022, 7:02 p.m. | OK | Java 11 | TESTS | 3 | 280 | 1638400 | ||
177212410 | ItsZaki | B | Oct. 20, 2022, 4:40 p.m. | OK | Java 17 | TESTS | 3 | 233 | 2969600 | ||
177246785 | IceWolf898 | B | Oct. 21, 2022, 12:58 a.m. | OK | Java 17 | TESTS | 3 | 296 | 0 | ||
177212022 | Eslam_Ahmed | B | Oct. 20, 2022, 4:39 p.m. | OK | Java 17 | TESTS | 3 | 296 | 409600 | ||
177259826 | sharadtandale2878 | B | Oct. 21, 2022, 5:03 a.m. | OK | Java 17 | TESTS | 3 | 311 | 2764800 | ||
177263098 | anuragkr898 | B | Oct. 21, 2022, 5:46 a.m. | OK | Java 17 | TESTS | 3 | 358 | 3072000 | ||
177236633 | shubhamojha1 | B | Oct. 20, 2022, 8:50 p.m. | OK | Java 17 | TESTS | 3 | 717 | 921600 | ||
177235317 | viserion_tv | B | Oct. 20, 2022, 8:30 p.m. | OK | Java 17 | TESTS | 3 | 810 | 6963200 | ||
177246518 | wzdycxy | B | Oct. 21, 2022, 12:52 a.m. | OK | Java 17 | TESTS | 3 | 857 | 921600 | ||
177231115 | adi_7861 | B | Oct. 20, 2022, 7:30 p.m. | OK | Java 8 | TESTS | 3 | 139 | 2150400 | ||
177212885 | ikillmyself | B | Oct. 20, 2022, 4:43 p.m. | OK | Java 8 | TESTS | 3 | 155 | 0 | ||
177253614 | kausanubhav2018 | B | Oct. 21, 2022, 3:19 a.m. | OK | Java 8 | TESTS | 3 | 155 | 7372800 | ||
177241551 | OmarKenawi | B | Oct. 20, 2022, 10:30 p.m. | OK | Java 8 | TESTS | 3 | 171 | 6553600 | ||
177214813 | Otepbergen | B | Oct. 20, 2022, 4:53 p.m. | OK | Java 8 | TESTS | 3 | 171 | 16384000 | ||
177221132 | jkslyk | B | Oct. 20, 2022, 5:41 p.m. | OK | Java 8 | TESTS | 3 | 186 | 9318400 | ||
177213723 | liomsv | B | Oct. 20, 2022, 4:47 p.m. | OK | Java 8 | TESTS | 3 | 187 | 3993600 | ||
177230998 | TheMasterOfSuspense | B | Oct. 20, 2022, 7:29 p.m. | OK | Java 8 | TESTS | 3 | 187 | 7372800 | ||
177203035 | Parimal | B | Oct. 20, 2022, 4:15 p.m. | OK | Java 8 | TESTS | 3 | 202 | 7372800 | ||
177214846 | Swapniltri | B | Oct. 20, 2022, 4:53 p.m. | OK | Java 8 | TESTS | 3 | 202 | 8806400 | ||
177233047 | RottenCup | B | Oct. 20, 2022, 7:56 p.m. | OK | MS C++ 2017 | TESTS | 3 | 358 | 0 | ||
177213546 | hot_chert | B | Oct. 20, 2022, 4:46 p.m. | OK | MS C++ 2017 | TESTS | 3 | 358 | 307200 | ||
177212329 | Pata_Tail | B | Oct. 20, 2022, 4:40 p.m. | OK | MS C++ 2017 | TESTS | 3 | 389 | 0 | ||
177250844 | X.Gan | B | Oct. 21, 2022, 2:28 a.m. | OK | MS C++ 2017 | TESTS | 3 | 390 | 1228800 | ||
177209743 | Vitru | B | Oct. 20, 2022, 4:32 p.m. | OK | MS C++ 2017 | TESTS | 3 | 421 | 2355200 | ||
177249813 | wddas | B | Oct. 21, 2022, 2:07 a.m. | OK | MS C++ 2017 | TESTS | 3 | 421 | 48128000 | ||
177202154 | k_bhayan | B | Oct. 20, 2022, 4:13 p.m. | OK | MS C++ 2017 | TESTS | 3 | 499 | 10854400 | ||
177214775 | yeling | B | Oct. 20, 2022, 4:53 p.m. | OK | Node.js | TESTS | 3 | 249 | 30412800 | ||
177219155 | rsFalse | B | Oct. 20, 2022, 5:24 p.m. | OK | Perl | TESTS | 3 | 530 | 47411200 | ||
177247637 | hxu10 | B | Oct. 21, 2022, 1:18 a.m. | OK | PyPy 3 | TESTS | 3 | 217 | 24780800 | ||
177206078 | aneesh2002 | B | Oct. 20, 2022, 4:23 p.m. | OK | PyPy 3 | TESTS | 3 | 265 | 25600000 | ||
177216086 | manishjha91 | B | Oct. 20, 2022, 5:01 p.m. | OK | PyPy 3 | TESTS | 3 | 498 | 17203200 | ||
177212477 | gyul | B | Oct. 20, 2022, 4:41 p.m. | OK | PyPy 3 | TESTS | 3 | 607 | 15974400 | ||
177245693 | mathor | B | Oct. 21, 2022, 12:29 a.m. | OK | PyPy 3 | TESTS | 3 | 607 | 17305600 | ||
177220362 | zenith_007 | B | Oct. 20, 2022, 5:34 p.m. | OK | PyPy 3 | TESTS | 3 | 608 | 16896000 | ||
177217751 | gyul | B | Oct. 20, 2022, 5:13 p.m. | OK | PyPy 3 | TESTS | 3 | 624 | 17920000 | ||
177230496 | tushar_2658 | B | Oct. 20, 2022, 7:21 p.m. | OK | PyPy 3 | TESTS | 3 | 639 | 16896000 | ||
177240861 | SeuT | B | Oct. 20, 2022, 10:12 p.m. | OK | PyPy 3 | TESTS | 3 | 655 | 16896000 | ||
177213242 | tamim.abdullah | B | Oct. 20, 2022, 4:45 p.m. | OK | PyPy 3 | TESTS | 3 | 670 | 16691200 | ||
177219885 | deepaklaksman | B | Oct. 20, 2022, 5:30 p.m. | OK | PyPy 3-64 | TESTS | 3 | 139 | 25907200 | ||
177246700 | samchen123 | B | Oct. 21, 2022, 12:56 a.m. | OK | PyPy 3-64 | TESTS | 3 | 155 | 25088000 | ||
177209878 | SoleProprietor | B | Oct. 20, 2022, 4:32 p.m. | OK | PyPy 3-64 | TESTS | 3 | 156 | 23347200 | ||
177223195 | biglunchdude | B | Oct. 20, 2022, 6 p.m. | OK | PyPy 3-64 | TESTS | 3 | 186 | 25088000 | ||
177229222 | govindp47 | B | Oct. 20, 2022, 7:05 p.m. | OK | PyPy 3-64 | TESTS | 3 | 202 | 23756800 | ||
177261723 | fan_of_tourist | B | Oct. 21, 2022, 5:29 a.m. | OK | PyPy 3-64 | TESTS | 3 | 202 | 36966400 | ||
177257422 | riroan | B | Oct. 21, 2022, 4:24 a.m. | OK | PyPy 3-64 | TESTS | 3 | 218 | 23654400 | ||
177241724 | ASawe2.6Main | B | Oct. 20, 2022, 10:35 p.m. | OK | PyPy 3-64 | TESTS | 3 | 218 | 25088000 | ||
177255318 | abhijeet.panihar.cse20 | B | Oct. 21, 2022, 3:47 a.m. | OK | PyPy 3-64 | TESTS | 3 | 233 | 31129600 | ||
177216933 | 2Ululu | B | Oct. 20, 2022, 5:07 p.m. | OK | PyPy 3-64 | TESTS | 3 | 249 | 38707200 | ||
177212738 | sravansainath7980 | B | Oct. 20, 2022, 4:42 p.m. | OK | Python 3 | TESTS | 3 | 202 | 15462400 | ||
177260453 | Vishal_maha | B | Oct. 21, 2022, 5:12 a.m. | OK | Python 3 | TESTS | 3 | 217 | 14848000 | ||
177263166 | abhipandey9315 | B | Oct. 21, 2022, 5:47 a.m. | OK | Python 3 | TESTS | 3 | 217 | 14950400 | ||
177254271 | Sami.S_SundarSTEM | B | Oct. 21, 2022, 3:31 a.m. | OK | Python 3 | TESTS | 3 | 217 | 14950400 | ||
177228700 | itsnotfunwhenyouareez | B | Oct. 20, 2022, 6:58 p.m. | OK | Python 3 | TESTS | 3 | 217 | 15257600 | ||
177220927 | jEROME_jOSEPH | B | Oct. 20, 2022, 5:39 p.m. | OK | Python 3 | TESTS | 3 | 218 | 11980800 | ||
177254455 | Sami.S_SundarSTEM | B | Oct. 21, 2022, 3:34 a.m. | OK | Python 3 | TESTS | 3 | 218 | 14950400 | ||
177203603 | Ruslan0275 | B | Oct. 20, 2022, 4:17 p.m. | OK | Python 3 | TESTS | 3 | 218 | 21913600 | ||
177220816 | gosueep | B | Oct. 20, 2022, 5:38 p.m. | OK | Python 3 | TESTS | 3 | 233 | 14848000 | ||
177254562 | Sami.S_SundarSTEM | B | Oct. 21, 2022, 3:36 a.m. | OK | Python 3 | TESTS | 3 | 233 | 14950400 | ||
177252749 | Sempr | B | Oct. 21, 2022, 3:03 a.m. | OK | Rust 2021 | TESTS | 3 | 15 | 7372800 |
Back to search problems