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 |
---|---|---|---|---|---|---|
1467 | Codeforces Round 695 (Div. 2) | FINISHED | False | 7200 | 127236311 | Jan. 8, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3741 ) | D | Sum of Paths | PROGRAMMING | combinatorics dp math | 2200 |
B"There are n cells, numbered 1,2, ... , n from left to right. You have to place a robot at any cell initially. The robot must make exactly k moves. In one move, the robot must move one cell to the left or right, provided that it doesn't move out of bounds. In other words, if the robot was in the cell i , it must move to either the cell i-1 or the cell i+1 , as long as it lies between 1 and n (endpoints inclusive). The cells, in the order they are visited (including the cell the robot is placed), together make a good path. Each cell i has a value a_i associated with it. Let c_0, c_1, ... , c_k be the sequence of cells in a good path in the order they are visited ( c_0 is the cell robot is initially placed, c_1 is the cell where the robot is after its first move, and so on; more formally, c_i is the cell that the robot is at after i moves). Then the value of the path is calculated as a_{c_0} + a_{c_1} + ... + a_{c_k} . Your task is to calculate the sum of values over all possible good paths. Since this number can be very large, output it modulo 10^9 + 7 . Two good paths are considered different if the starting cell differs or there exists an integer i in [1, k] such that the current cell of the robot after exactly i moves is different in those paths. You must process q updates to a and print the updated sum each time. Each update changes the value of exactly one cell. See the input format and the sample input-output for more details. The first line of the input contains three space-separated integers n , k and q ( 2 <= n <= 5000 ; 1 <= k <= 5000 ; 1 <= q <= 2 cdot 10^5 ). The second line of the input contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ). q lines follow. Each line contains two space-separated integers i and x ( 1 <= i <= n ; 1 <= "... |
Codeforces Round #695 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
103810949 | Beku.sh | D | Jan. 8, 2021, 5:04 p.m. | OK | GNU C11 | TESTS | 10 | 1169 | 100249600 | 2200 | |
103836963 | ramvenkat98 | D | Jan. 9, 2021, 12:34 a.m. | OK | GNU C11 | TESTS | 10 | 1513 | 202137600 | 2200 | |
103830370 | Protagonist | D | Jan. 8, 2021, 8:57 p.m. | OK | GNU C++11 | TESTS | 10 | 327 | 100249600 | 2200 | |
103838244 | zkyAKIOI | D | Jan. 9, 2021, 1:19 a.m. | OK | GNU C++11 | TESTS | 10 | 389 | 200704000 | 2200 | |
103840882 | Grealish10 | D | Jan. 9, 2021, 2:49 a.m. | OK | GNU C++11 | TESTS | 10 | 467 | 108441600 | 2200 | |
103811560 | calabashgirl | D | Jan. 8, 2021, 5:07 p.m. | OK | GNU C++11 | TESTS | 10 | 561 | 100454400 | 2200 | |
103842787 | 74Nanashi | D | Jan. 9, 2021, 3:39 a.m. | OK | GNU C++11 | TESTS | 10 | 577 | 100454400 | 2200 | |
103802643 | xajd1906 | D | Jan. 8, 2021, 4:24 p.m. | OK | GNU C++11 | TESTS | 10 | 608 | 100556800 | 2200 | |
103847281 | DevourThemAll | D | Jan. 9, 2021, 5:22 a.m. | OK | GNU C++11 | TESTS | 10 | 654 | 209100800 | 2200 | |
103819817 | architkarandikar | D | Jan. 8, 2021, 6:18 p.m. | OK | GNU C++11 | TESTS | 10 | 655 | 100454400 | 2200 | |
103815561 | sleep__ | D | Jan. 8, 2021, 5:37 p.m. | OK | GNU C++11 | TESTS | 10 | 701 | 200704000 | 2200 | |
103808245 | niveton | D | Jan. 8, 2021, 4:34 p.m. | OK | GNU C++11 | TESTS | 10 | 732 | 204492800 | 2200 | |
103833523 | urururu | D | Jan. 8, 2021, 10:19 p.m. | OK | GNU C++14 | TESTS | 10 | 421 | 100659200 | 2200 | |
103839969 | tu-na | D | Jan. 9, 2021, 2:21 a.m. | OK | GNU C++14 | TESTS | 10 | 545 | 200908800 | 2200 | |
103815184 | huangxiaohua | D | Jan. 8, 2021, 5:34 p.m. | OK | GNU C++14 | TESTS | 10 | 545 | 204492800 | 2200 | |
103803693 | God_think_un | D | Jan. 8, 2021, 4:26 p.m. | OK | GNU C++14 | TESTS | 10 | 545 | 401612800 | 2200 | |
103825656 | Spanta | D | Jan. 8, 2021, 7:29 p.m. | OK | GNU C++14 | TESTS | 10 | 592 | 100249600 | 2200 | |
103814460 | S_Aditya | D | Jan. 8, 2021, 5:27 p.m. | OK | GNU C++14 | TESTS | 10 | 623 | 100249600 | 2200 | |
103849015 | NIGULASIOUYANG | D | Jan. 9, 2021, 5:52 a.m. | OK | GNU C++14 | TESTS | 10 | 670 | 742092800 | 2200 | |
103815182 | arjitkansal | D | Jan. 8, 2021, 5:34 p.m. | OK | GNU C++14 | TESTS | 10 | 685 | 100454400 | 2200 | |
103816861 | KhaledFarhat | D | Jan. 8, 2021, 5:49 p.m. | OK | GNU C++14 | TESTS | 10 | 717 | 100659200 | 2200 | |
103844333 | zhangxiao | D | Jan. 9, 2021, 4:16 a.m. | OK | GNU C++14 | TESTS | 10 | 717 | 201318400 | 2200 | |
103836025 | JaroslavUrban | D | Jan. 8, 2021, 11:54 p.m. | OK | GNU C++17 | TESTS | 10 | 342 | 102502400 | 2200 | |
103833489 | peterr | D | Jan. 8, 2021, 10:18 p.m. | OK | GNU C++17 | TESTS | 10 | 390 | 100249600 | 2200 | |
103813225 | outline | D | Jan. 8, 2021, 5:17 p.m. | OK | GNU C++17 | TESTS | 10 | 421 | 100249600 | 2200 | |
103823047 | DenOMINATOR | D | Jan. 8, 2021, 6:54 p.m. | OK | GNU C++17 | TESTS | 10 | 452 | 100454400 | 2200 | |
103832509 | DXTsT | D | Jan. 8, 2021, 9:50 p.m. | OK | GNU C++17 | TESTS | 10 | 467 | 125542400 | 2200 | |
103811744 | sotanishy | D | Jan. 8, 2021, 5:08 p.m. | OK | GNU C++17 | TESTS | 10 | 483 | 100659200 | 2200 | |
103818505 | VivekUchiha | D | Jan. 8, 2021, 6:05 p.m. | OK | GNU C++17 | TESTS | 10 | 483 | 100659200 | 2200 | |
103848879 | _comfortably_numb | D | Jan. 9, 2021, 5:49 a.m. | OK | GNU C++17 | TESTS | 10 | 483 | 204492800 | 2200 | |
103803412 | Lain | D | Jan. 8, 2021, 4:25 p.m. | OK | GNU C++17 | TESTS | 10 | 498 | 100249600 | 2200 | |
103812496 | Skybytskyi.Nikita | D | Jan. 8, 2021, 5:12 p.m. | OK | GNU C++17 | TESTS | 10 | 530 | 102195200 | 2200 | |
103818690 | _Backl1ght | D | Jan. 8, 2021, 6:07 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 202 | 101478400 | 2200 | |
103804633 | HuaShanLunJian | D | Jan. 8, 2021, 4:28 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 233 | 100249600 | 2200 | |
103811108 | thiago_bastos | D | Jan. 8, 2021, 5:04 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 249 | 100556800 | 2200 | |
103825034 | sjay05 | D | Jan. 8, 2021, 7:20 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 280 | 100556800 | 2200 | |
103813100 | Coki628 | D | Jan. 8, 2021, 5:16 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 296 | 100556800 | 2200 | |
103813843 | Skybytskyi.Nikita | D | Jan. 8, 2021, 5:22 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 296 | 102195200 | 2200 | |
103824522 | sjay05 | D | Jan. 8, 2021, 7:13 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 311 | 100556800 | 2200 | |
103837880 | shenmadongdong | D | Jan. 9, 2021, 1:06 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 311 | 201420800 | 2200 | |
103813075 | Anila9007 | D | Jan. 8, 2021, 5:16 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 327 | 200908800 | 2200 | |
103837895 | shenmadongdong | D | Jan. 9, 2021, 1:06 a.m. | OK | GNU C++17 (64) | TESTS | 10 | 327 | 201318400 | 2200 | |
103832233 | dauom | D | Jan. 8, 2021, 9:43 p.m. | OK | Java 11 | TESTS | 10 | 1153 | 148684800 | 2200 | |
103812212 | anhpp | D | Jan. 8, 2021, 5:10 p.m. | OK | Java 11 | TESTS | 10 | 1419 | 264908800 | 2200 | |
103804226 | uwi | D | Jan. 8, 2021, 4:27 p.m. | OK | Java 11 | TESTS | 10 | 1419 | 265113600 | 2200 | |
103837669 | puzink | D | Jan. 9, 2021, 12:59 a.m. | OK | Java 11 | TESTS | 10 | 1669 | 262144000 | 2200 | |
103830323 | Restricted | D | Jan. 8, 2021, 8:56 p.m. | OK | Java 11 | TESTS | 10 | 1715 | 250470400 | 2200 | |
103841984 | tusharjape007 | D | Jan. 9, 2021, 3:19 a.m. | OK | Java 11 | TESTS | 10 | 1996 | 265113600 | 2200 | |
103833229 | Okhair | D | Jan. 8, 2021, 10:09 p.m. | OK | Java 11 | TESTS | 10 | 2027 | 265728000 | 2200 | |
103811391 | bobib | D | Jan. 8, 2021, 5:06 p.m. | OK | Java 11 | TESTS | 10 | 2074 | 261939200 | 2200 | |
103841886 | tusharjape007 | D | Jan. 9, 2021, 3:17 a.m. | OK | Java 11 | TESTS | 10 | 2589 | 265523200 | 2200 | |
103810172 | Garrus | D | Jan. 8, 2021, 5 p.m. | OK | Java 11 | TESTS | 10 | 2823 | 263372800 | 2200 | |
103830889 | robinz62 | D | Jan. 8, 2021, 9:10 p.m. | OK | Java 8 | TESTS | 10 | 1512 | 264192000 | 2200 | |
103819667 | pulkit1411 | D | Jan. 8, 2021, 6:17 p.m. | OK | Java 8 | TESTS | 10 | 1559 | 274432000 | 2200 | |
103826638 | wphsucf | D | Jan. 8, 2021, 7:44 p.m. | OK | Java 8 | TESTS | 10 | 1840 | 501964800 | 2200 | |
103849151 | mufaddalnaya | D | Jan. 9, 2021, 5:53 a.m. | OK | Java 8 | TESTS | 10 | 2137 | 264499200 | 2200 | |
103832614 | Akram-Adel | D | Jan. 8, 2021, 9:53 p.m. | OK | Java 8 | TESTS | 10 | 2261 | 276275200 | 2200 | |
103810509 | godxpunk | D | Jan. 8, 2021, 5:02 p.m. | OK | Java 8 | TESTS | 10 | 2355 | 274636800 | 2200 | |
103832575 | NatInTheHat | D | Jan. 8, 2021, 9:51 p.m. | OK | Java 8 | TESTS | 10 | 2386 | 473395200 | 2200 | |
103807208 | Akram-Adel | D | Jan. 8, 2021, 4:32 p.m. | OK | Java 8 | TESTS | 10 | 2417 | 276275200 | 2200 | |
103808235 | naam_me_kya_rakha_he | D | Jan. 8, 2021, 4:34 p.m. | OK | Java 8 | TESTS | 10 | 2526 | 474419200 | 2200 | |
103810515 | martins | D | Jan. 8, 2021, 5:02 p.m. | OK | Java 8 | TESTS | 10 | 2807 | 263680000 | 2200 | |
103810105 | GeorgeMaharis | D | Jan. 8, 2021, 5 p.m. | OK | Kotlin | TESTS | 10 | 1341 | 148684800 | 2200 | |
103812593 | pichulia | D | Jan. 8, 2021, 5:13 p.m. | OK | MS C++ 2017 | TESTS | 10 | 857 | 201216000 | 2200 | |
103830373 | fatvlad_ | D | Jan. 8, 2021, 8:58 p.m. | OK | MS C++ 2017 | TESTS | 10 | 1201 | 200499200 | 2200 | |
103814237 | Gravekper | D | Jan. 8, 2021, 5:25 p.m. | OK | MS C++ 2017 | TESTS | 10 | 1279 | 201113600 | 2200 | |
103848106 | jonitox | D | Jan. 9, 2021, 5:37 a.m. | OK | MS C++ 2017 | TESTS | 10 | 1310 | 200908800 | 2200 | |
103818578 | PrideBlack | D | Jan. 8, 2021, 6:06 p.m. | OK | MS C++ 2017 | TESTS | 10 | 1637 | 100761600 | 2200 | |
103814139 | Gravekper | D | Jan. 8, 2021, 5:25 p.m. | OK | MS C++ 2017 | TESTS | 10 | 1809 | 201113600 | 2200 | |
103831901 | onipp | D | Jan. 8, 2021, 9:34 p.m. | OK | MS C++ 2017 | TESTS | 10 | 2620 | 204288000 | 2200 | |
103810819 | terry_u16 | D | Jan. 8, 2021, 5:03 p.m. | OK | .NET Core C# | TESTS | 10 | 514 | 109568000 | 2200 | |
103847733 | kuuso | D | Jan. 9, 2021, 5:31 a.m. | OK | .NET Core C# | TESTS | 10 | 1216 | 423731200 | 2200 | |
103805298 | kichi2004 | D | Jan. 8, 2021, 4:29 p.m. | OK | .NET Core C# | TESTS | 10 | 2761 | 614809600 | 2200 | |
103834766 | aix | D | Jan. 8, 2021, 11:01 p.m. | OK | PyPy 3 | TESTS | 10 | 1278 | 129126400 | 2200 | |
103826311 | sh1194 | D | Jan. 8, 2021, 7:40 p.m. | OK | PyPy 3 | TESTS | 10 | 1497 | 65536000 | 2200 | |
103834742 | aix | D | Jan. 8, 2021, 11 p.m. | OK | PyPy 3 | TESTS | 10 | 1512 | 133734400 | 2200 | |
103826111 | sh1194 | D | Jan. 8, 2021, 7:37 p.m. | OK | PyPy 3 | TESTS | 10 | 1528 | 66252800 | 2200 | |
103826384 | sh1194 | D | Jan. 8, 2021, 7:40 p.m. | OK | PyPy 3 | TESTS | 10 | 1560 | 65536000 | 2200 | |
103838614 | Pedantic | D | Jan. 9, 2021, 1:34 a.m. | OK | PyPy 3 | TESTS | 10 | 1606 | 145817600 | 2200 | |
103838093 | mkawa2 | D | Jan. 9, 2021, 1:14 a.m. | OK | PyPy 3 | TESTS | 10 | 2667 | 182374400 | 2200 | |
103810826 | manish.17 | D | Jan. 8, 2021, 5:03 p.m. | OK | PyPy 3 | TESTS | 10 | 2745 | 113561600 | 2200 | |
103830944 | not_tehlka | D | Jan. 8, 2021, 9:11 p.m. | OK | PyPy 3 | TESTS | 10 | 2791 | 131891200 | 2200 | |
103830924 | not_tehlka | D | Jan. 8, 2021, 9:11 p.m. | OK | PyPy 3 | TESTS | 10 | 2839 | 144384000 | 2200 |
Back to search problems