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 |
|---|---|---|---|---|---|---|
| 2029 | Refact.ai Match 1 (Codeforces Round 985) | FINISHED | False | 10800 | 45242723 | Nov. 9, 2024, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 255 ) | G | Balanced Problem | PROGRAMMING | data structures dp |
There is an array (a) consisting of (n) integers. Initially, all elements of (a) are equal to (0). Kevin can perform several operations on the array. Each operation is one of the following two types: Prefix addition — Kevin first selects an index (x) ((1\le x\le n)), and then for each (1\le j\le x), increases (a_j) by (1); Suffix addition — Kevin first selects an index (x) ((1\le x\le n)), and then for each (x\le j\le n), increases (a_j) by (1). In the country of KDOI, people think that the integer (v) is balanced. Thus, Iris gives Kevin an array (c) consisting of (n) integers and defines the beauty of the array (a) as follows: Initially, set (b=0); For each (1\le i\le n), if (a_i=v), add (c_i) to (b); The beauty of (a) is the final value of (b). Kevin wants to maximize the beauty of (a) after all the operations. However, he had already performed (m) operations when he was sleepy. Now, he can perform an arbitrary number (possibly zero) of new operations. You have to help Kevin find the maximum possible beauty if he optimally performs the new operations. However, to make sure that you are not just rolling the dice, Kevin gives you an integer (V), and you need to solve the problem for each (1\le v\le V). Each test contains multiple test cases. The first line of the input contains a single integer (t) ((1\le t\le 1000)) — the number of test cases. The description of test cases follows. The first line of each test case contains three integers (n), (m), and (V) ((1\le n, m\le 2\cdot 10^5), (1\le V\le 2000)) — the length of the array (a), the number of initial operations, and the number that Kevin gives you. The second line contains (n) integers (c_1, c_2, \ldots, c_n) ((1\le c_i\le 10^9)) — the elements in the array (c). Then (m) lines follow, the (i)-th line containing a character (op) a |
| Refact.ai Match 1 (Codeforces Round 985) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 290758433 | 244mhq | G | Nov. 9, 2024, 5:02 p.m. | OK | C++17 (GCC 7-32) | TESTS | 25 | 187 | 35532800 | ||
| 290754876 | Endagorion | G | Nov. 9, 2024, 4:48 p.m. | OK | C++17 (GCC 7-32) | TESTS | 25 | 452 | 37888000 | ||
| 290771089 | StellarSpecter | G | Nov. 9, 2024, 6:17 p.m. | OK | C++17 (GCC 7-32) | TESTS | 25 | 609 | 71065600 | ||
| 290770663 | liumohan | G | Nov. 9, 2024, 6:14 p.m. | OK | C++17 (GCC 7-32) | TESTS | 25 | 609 | 71065600 | ||
| 290767555 | ko_osaga | G | Nov. 9, 2024, 5:34 p.m. | OK | C++17 (GCC 7-32) | TESTS | 25 | 718 | 64512000 | ||
| 290771480 | hos.lyric | G | Nov. 9, 2024, 6:20 p.m. | OK | C++17 (GCC 7-32) | TESTS | 25 | 905 | 130457600 | ||
| 290761989 | potato167 | G | Nov. 9, 2024, 5:16 p.m. | OK | C++17 (GCC 7-32) | TESTS | 25 | 1030 | 33382400 | ||
| 290765892 | Rewinding | G | Nov. 9, 2024, 5:30 p.m. | OK | C++17 (GCC 7-32) | TESTS | 25 | 1327 | 676556800 | ||
| 290763226 | ksun48 | G | Nov. 9, 2024, 5:21 p.m. | OK | C++20 (GCC 13-64) | TESTS | 25 | 156 | 36044800 | ||
| 290755809 | bashkort | G | Nov. 9, 2024, 4:52 p.m. | OK | C++20 (GCC 13-64) | TESTS | 25 | 186 | 68403200 | ||
| 290771459 | PinkieRabbit | G | Nov. 9, 2024, 6:19 p.m. | OK | C++20 (GCC 13-64) | TESTS | 25 | 202 | 66867200 | ||
| 290753504 | Szoboszlai10 | G | Nov. 9, 2024, 4:43 p.m. | OK | C++20 (GCC 13-64) | TESTS | 25 | 218 | 201011200 | ||
| 290763314 | kizen | G | Nov. 9, 2024, 5:21 p.m. | OK | C++20 (GCC 13-64) | TESTS | 25 | 249 | 130150400 | ||
| 290770699 | BurnedChicken | G | Nov. 9, 2024, 6:14 p.m. | OK | C++20 (GCC 13-64) | TESTS | 25 | 311 | 64512000 | ||
| 290760841 | Kapt | G | Nov. 9, 2024, 5:12 p.m. | OK | C++20 (GCC 13-64) | TESTS | 25 | 358 | 285593600 | ||
| 290771462 | BurnedChicken | G | Nov. 9, 2024, 6:19 p.m. | OK | C++20 (GCC 13-64) | TESTS | 25 | 359 | 64512000 | ||
| 290801240 | qwerasdfzxcl | G | Nov. 10, 2024, 3:35 a.m. | OK | C++20 (GCC 13-64) | TESTS | 25 | 375 | 63180800 | ||
| 290759813 | PinkieRabbit | G | Nov. 9, 2024, 5:08 p.m. | OK | C++20 (GCC 13-64) | TESTS | 25 | 421 | 66867200 | ||
| 290751252 | maroonrk | G | Nov. 9, 2024, 4:40 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 25 | 203 | 67993600 | ||
| 290773992 | Ion_Gravirei | G | Nov. 9, 2024, 6:40 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 25 | 358 | 71065600 | ||
| 290751668 | jiangbowen | G | Nov. 9, 2024, 4:41 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 25 | 687 | 132915200 | ||
| 290759898 | ppavic | G | Nov. 9, 2024, 5:08 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 25 | 702 | 137523200 | ||
| 290765183 | dreamoon_love_AA | G | Nov. 9, 2024, 5:28 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 25 | 843 | 112435200 | ||
| 290792393 | Rubikun | G | Nov. 9, 2024, 11:58 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 25 | 2921 | 395673600 | ||
| 290784531 | rainboy | G | Nov. 9, 2024, 8:44 p.m. | OK | GNU C11 | TESTS | 25 | 468 | 33792000 | ||
| 290747990 | arvindf232 | G | Nov. 9, 2024, 4:27 p.m. | OK | Kotlin 1.7 | TESTS | 25 | 2280 | 296960000 | ||
| 290788810 | Tlatoani | G | Nov. 9, 2024, 10:03 p.m. | OK | Kotlin 1.9 | TESTS | 25 | 1734 | 247091200 | ||
| 290776707 | Maksim1744 | G | Nov. 9, 2024, 7:06 p.m. | OK | Rust 2021 | TESTS | 25 | 2077 | 261632000 | ||
| 290773006 | Maksim1744 | G | Nov. 9, 2024, 6:31 p.m. | OK | Rust 2021 | TESTS | 25 | 2484 | 261632000 | ||
| 290787915 | Tlatoani | G | Nov. 9, 2024, 9:43 p.m. | OK | Rust 2021 | TESTS | 25 | 2812 | 80076800 |
Back to search problems