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 |
---|---|---|---|---|---|---|
1799 | Codeforces Round 854 by cybercats (Div. 1 + Div. 2) | FINISHED | False | 10800 | 54314699 | Feb. 27, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4587 ) | D1 | Hot Start Up (easy version) | PROGRAMMING | dp |
B'This is an easy version of the problem. The constraints of t , n , k are the only difference between versions. You have a device with two CPUs. You also have k programs, numbered 1 through k , that you can run on the CPUs. The i -th program ( 1 <= i <= k ) takes cold_i seconds to run on some CPU. However, if the last program we ran on this CPU was also program i , it only takes hot_i seconds ( hot_i <= cold_i ). Note that this only applies if we run program i multiple times consecutively -- if we run program i , then some different program, then program i again, it will take cold_i seconds the second time. You are given a sequence a_1, a_2, ldots, a_n of length n , consisting of integers from 1 to k . You need to use your device to run programs a_1, a_2, ldots, a_n in sequence. For all 2 <= i <= n , you cannot start running program a_i until program a_{i - 1} has completed. Find the minimum amount of time needed to run all programs a_1, a_2, ldots, a_n in sequence. Input consists of multiple test cases. The first line contains a single integer t , the number of test cases ( 1 <= t <= 5000 ). The first line of each test case contains n and k ( 1 <= n, k <= 5000 ). The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= k ). The third line of each test case contains k integers cold_1, cold_2, ldots, cold_k ( 1 <= cold_i <= 10^9 ). The fourth line of each test case contains k integers hot_1, hot_2, ldots, hot_k ( 1 <= hot_i <= cold_i ). It is guaranteed the sum of n and the sum of k over all test cases do not exceed 5000 . For each test case, print the minimum time needed to run all programs in the given order. In the first test case, we can do the following: In total, we need $'... |
Codeforces Round #854 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
195179507 | Tdyx | D1 | Feb. 27, 2023, 4:49 p.m. | OK | C# 10 | TESTS | 28 | 61 | 3584000 | ||
195178374 | DmitriyAnikeyev | D1 | Feb. 27, 2023, 4:44 p.m. | OK | C# 10 | TESTS | 28 | 249 | 203878400 | ||
195197024 | rainboy | D1 | Feb. 27, 2023, 6:37 p.m. | OK | GNU C11 | TESTS | 28 | 46 | 6041600 | ||
195188318 | HeapUser.He | D1 | Feb. 27, 2023, 5:29 p.m. | OK | GNU C11 | TESTS | 28 | 436 | 401100800 | ||
195174243 | dancho | D1 | Feb. 27, 2023, 4:26 p.m. | OK | GNU C++14 | TESTS | 28 | 15 | 204800 | ||
195193529 | Molu | D1 | Feb. 27, 2023, 6:09 p.m. | OK | GNU C++14 | TESTS | 28 | 15 | 307200 | ||
195219690 | my_name_is_handsome | D1 | Feb. 28, 2023, 1:14 a.m. | OK | GNU C++14 | TESTS | 28 | 15 | 15872000 | ||
195224713 | 2000032139cse | D1 | Feb. 28, 2023, 3:25 a.m. | OK | GNU C++14 | TESTS | 28 | 15 | 20070400 | ||
195189872 | LBRhhhh | D1 | Feb. 27, 2023, 5:34 p.m. | OK | GNU C++14 | TESTS | 28 | 15 | 25292800 | ||
195178327 | DCH233 | D1 | Feb. 27, 2023, 4:43 p.m. | OK | GNU C++14 | TESTS | 28 | 15 | 26419200 | ||
195217717 | OccDreamer | D1 | Feb. 28, 2023, 12:11 a.m. | OK | GNU C++14 | TESTS | 28 | 15 | 62156800 | ||
195175274 | The_thought_of_fallout | D1 | Feb. 27, 2023, 4:30 p.m. | OK | GNU C++14 | TESTS | 28 | 15 | 132300800 | ||
195232821 | JoesSR | D1 | Feb. 28, 2023, 5:53 a.m. | OK | GNU C++14 | TESTS | 28 | 30 | 6041600 | ||
195219244 | Chinese_zjc_ | D1 | Feb. 28, 2023, 12:58 a.m. | OK | GNU C++14 | TESTS | 28 | 30 | 6041600 | ||
195226040 | ventusliberum | D1 | Feb. 28, 2023, 3:47 a.m. | OK | GNU C++17 | TESTS | 28 | 15 | 102400 | ||
195220535 | andyseve | D1 | Feb. 28, 2023, 1:40 a.m. | OK | GNU C++17 | TESTS | 28 | 15 | 102400 | ||
195178891 | bnu20DT | D1 | Feb. 27, 2023, 4:46 p.m. | OK | GNU C++17 | TESTS | 28 | 15 | 204800 | ||
195201202 | dmikhalin | D1 | Feb. 27, 2023, 7:19 p.m. | OK | GNU C++17 | TESTS | 28 | 15 | 204800 | ||
195181051 | igz | D1 | Feb. 27, 2023, 4:56 p.m. | OK | GNU C++17 | TESTS | 28 | 15 | 204800 | ||
195176069 | ssamt | D1 | Feb. 27, 2023, 4:34 p.m. | OK | GNU C++17 | TESTS | 28 | 15 | 307200 | ||
195195638 | yongdori | D1 | Feb. 27, 2023, 6:24 p.m. | OK | GNU C++17 | TESTS | 28 | 15 | 307200 | ||
195224175 | Jlyfish | D1 | Feb. 28, 2023, 3:13 a.m. | OK | GNU C++17 | TESTS | 28 | 15 | 4812800 | ||
195187004 | stoic_ | D1 | Feb. 27, 2023, 5:23 p.m. | OK | GNU C++17 | TESTS | 28 | 15 | 7475200 | ||
195228058 | Rockey | D1 | Feb. 28, 2023, 4:29 a.m. | OK | GNU C++17 | TESTS | 28 | 15 | 8396800 | ||
195192552 | FredYourMind | D1 | Feb. 27, 2023, 6:04 p.m. | OK | GNU C++17 (64) | TESTS | 28 | 15 | 102400 | ||
195179847 | PRXMS | D1 | Feb. 27, 2023, 4:50 p.m. | OK | GNU C++17 (64) | TESTS | 28 | 15 | 204800 | ||
195218551 | hopsfb | D1 | Feb. 28, 2023, 12:36 a.m. | OK | GNU C++17 (64) | TESTS | 28 | 15 | 204800 | ||
195220831 | Superposition | D1 | Feb. 28, 2023, 1:48 a.m. | OK | GNU C++17 (64) | TESTS | 28 | 15 | 204800 | ||
195221875 | narrowkind | D1 | Feb. 28, 2023, 2:19 a.m. | OK | GNU C++17 (64) | TESTS | 28 | 15 | 409600 | ||
195175134 | mattagar6 | D1 | Feb. 27, 2023, 4:30 p.m. | OK | GNU C++17 (64) | TESTS | 28 | 15 | 2252800 | ||
195222165 | TheOneYouWant | D1 | Feb. 28, 2023, 2:26 a.m. | OK | GNU C++17 (64) | TESTS | 28 | 15 | 2560000 | ||
195182634 | chennengkuan | D1 | Feb. 27, 2023, 5:03 p.m. | OK | GNU C++17 (64) | TESTS | 28 | 15 | 6041600 | ||
195173660 | IsaacMoris | D1 | Feb. 27, 2023, 4:24 p.m. | OK | GNU C++17 (64) | TESTS | 28 | 15 | 10342400 | ||
195221561 | lqx2005 | D1 | Feb. 28, 2023, 2:11 a.m. | OK | GNU C++17 (64) | TESTS | 28 | 15 | 13209600 | ||
195187521 | N1KlTA | D1 | Feb. 27, 2023, 5:25 p.m. | OK | GNU C++20 (64) | TESTS | 28 | 15 | 102400 | ||
195173443 | an23 | D1 | Feb. 27, 2023, 4:23 p.m. | OK | GNU C++20 (64) | TESTS | 28 | 15 | 102400 | ||
195221908 | wujiawei111 | D1 | Feb. 28, 2023, 2:20 a.m. | OK | GNU C++20 (64) | TESTS | 28 | 15 | 204800 | ||
195230177 | shaosy | D1 | Feb. 28, 2023, 5:07 a.m. | OK | GNU C++20 (64) | TESTS | 28 | 15 | 204800 | ||
195227966 | -Victory | D1 | Feb. 28, 2023, 4:27 a.m. | OK | GNU C++20 (64) | TESTS | 28 | 15 | 204800 | ||
195201455 | FelixArg | D1 | Feb. 27, 2023, 7:22 p.m. | OK | GNU C++20 (64) | TESTS | 28 | 15 | 204800 | ||
195200352 | cosenza | D1 | Feb. 27, 2023, 7:10 p.m. | OK | GNU C++20 (64) | TESTS | 28 | 15 | 204800 | ||
195197669 | cosenza | D1 | Feb. 27, 2023, 6:42 p.m. | OK | GNU C++20 (64) | TESTS | 28 | 15 | 204800 | ||
195179768 | vgtcross | D1 | Feb. 27, 2023, 4:50 p.m. | OK | GNU C++20 (64) | TESTS | 28 | 15 | 204800 | ||
195173724 | ethening | D1 | Feb. 27, 2023, 4:24 p.m. | OK | GNU C++20 (64) | TESTS | 28 | 15 | 204800 | ||
195173278 | profchi | D1 | Feb. 27, 2023, 4:22 p.m. | OK | Java 11 | TESTS | 28 | 514 | 271564800 | ||
195179657 | kamranm | D1 | Feb. 27, 2023, 4:50 p.m. | OK | Java 11 | TESTS | 28 | 951 | 406016000 | ||
195173520 | earl_of_byteland | D1 | Feb. 27, 2023, 4:23 p.m. | OK | Java 17 | TESTS | 28 | 436 | 268697600 | ||
195189064 | warks | D1 | Feb. 27, 2023, 5:32 p.m. | OK | Java 17 | TESTS | 28 | 529 | 921600 | ||
195183394 | Restricted | D1 | Feb. 27, 2023, 5:07 p.m. | OK | Java 17 | TESTS | 28 | 639 | 266035200 | ||
195198873 | harshsingla06 | D1 | Feb. 27, 2023, 6:54 p.m. | OK | Java 8 | TESTS | 28 | 670 | 0 | ||
195215584 | shahpppp | D1 | Feb. 27, 2023, 11:07 p.m. | OK | Java 8 | TESTS | 28 | 794 | 265420800 | ||
195215553 | shahpppp | D1 | Feb. 27, 2023, 11:06 p.m. | OK | Java 8 | TESTS | 28 | 795 | 265113600 | ||
195175288 | Aabhas99 | D1 | Feb. 27, 2023, 4:30 p.m. | OK | Java 8 | TESTS | 28 | 950 | 275558400 | ||
195175713 | Virendra115 | D1 | Feb. 27, 2023, 4:32 p.m. | OK | Java 8 | TESTS | 28 | 998 | 275660800 | ||
195181039 | tranquility | D1 | Feb. 27, 2023, 4:56 p.m. | OK | MS C++ 2017 | TESTS | 28 | 46 | 24268800 | ||
195194634 | aadrito | D1 | Feb. 27, 2023, 6:16 p.m. | OK | MS C++ 2017 | TESTS | 28 | 171 | 204800 | ||
195202291 | reversir | D1 | Feb. 27, 2023, 7:32 p.m. | OK | MS C++ 2017 | TESTS | 28 | 982 | 401817600 | ||
195192680 | bvf | D1 | Feb. 27, 2023, 6:05 p.m. | OK | PyPy 3 | TESTS | 28 | 155 | 5632000 | ||
195230962 | bvf | D1 | Feb. 28, 2023, 5:20 a.m. | OK | PyPy 3 | TESTS | 28 | 171 | 5427200 | ||
195178398 | Lyle0711 | D1 | Feb. 27, 2023, 4:44 p.m. | OK | PyPy 3 | TESTS | 28 | 405 | 7577600 | ||
195192706 | hulahula3247 | D1 | Feb. 27, 2023, 6:05 p.m. | OK | PyPy 3-64 | TESTS | 28 | 124 | 6758400 | ||
195180830 | FlakeLCR | D1 | Feb. 27, 2023, 4:55 p.m. | OK | PyPy 3-64 | TESTS | 28 | 124 | 8908800 | ||
195184906 | zz_zye | D1 | Feb. 27, 2023, 5:14 p.m. | OK | PyPy 3-64 | TESTS | 28 | 155 | 7270400 | ||
195193948 | mathiaswk | D1 | Feb. 27, 2023, 6:12 p.m. | OK | PyPy 3-64 | TESTS | 28 | 187 | 10444800 | ||
195192164 | jwkim1 | D1 | Feb. 27, 2023, 6:02 p.m. | OK | PyPy 3-64 | TESTS | 28 | 202 | 9625600 | ||
195192626 | oadey89 | D1 | Feb. 27, 2023, 6:04 p.m. | OK | PyPy 3-64 | TESTS | 28 | 202 | 11673600 | ||
195208025 | 1_2_3_4_5_9 | D1 | Feb. 27, 2023, 8:47 p.m. | OK | PyPy 3-64 | TESTS | 28 | 202 | 24166400 | ||
195176961 | huikang | D1 | Feb. 27, 2023, 4:37 p.m. | OK | PyPy 3-64 | TESTS | 28 | 217 | 11776000 | ||
195222753 | hxu10 | D1 | Feb. 28, 2023, 2:41 a.m. | OK | PyPy 3-64 | TESTS | 28 | 249 | 10547200 | ||
195220452 | RobinFromTheHood | D1 | Feb. 28, 2023, 1:38 a.m. | OK | PyPy 3-64 | TESTS | 28 | 249 | 11059200 | ||
195185669 | Unwise | D1 | Feb. 27, 2023, 5:17 p.m. | OK | Rust 2021 | TESTS | 28 | 15 | 204800 | ||
195193483 | God_Man | D1 | Feb. 27, 2023, 6:09 p.m. | OK | Rust 2021 | TESTS | 28 | 15 | 512000 |
Back to search problems