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 |
---|---|---|---|---|---|---|
1696 | Codeforces Global Round 21 | FINISHED | False | 8100 | 75655499 | June 25, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4102 ) | E | Placing Jinas | PROGRAMMING | combinatorics math |
B"We say an infinite sequence a_{0}, a_{1}, a_2, ldots is non-increasing if and only if for all i ge 0 , a_i ge a_{i+1} . There is an infinite right and down grid. The upper-left cell has coordinates (0,0) . Rows are numbered 0 to infinity from top to bottom, columns are numbered from 0 to infinity from left to right. There is also a non-increasing infinite sequence a_{0}, a_{1}, a_2, ldots . You are given a_0 , a_1 , ldots , a_n ; for all i>n , a_i=0 . For every pair of x , y , the cell with coordinates (x,y) (which is located at the intersection of x -th row and y -th column) is white if y<a_x and black otherwise. Initially there is one doll named Jina on (0,0) . You can do the following operation. Note that multiple dolls can be present at a cell at the same time; in one operation, you remove only one. Your goal is to make all white cells contain 0 dolls. What's the minimum number of operations needed to achieve the goal? Print the answer modulo 10^9+7 . The first line of input contains one integer n ( 1 <= n <= 2 cdot 10^5 ). The second line of input contains n+1 integers a_0,a_1, ldots,a_n ( 0 <= a_i <= 2 cdot 10^5 ). It is guaranteed that the sequence a is non-increasing. Print one integer -- the answer to the problem, modulo 10^9+7 . Consider the first example. In the given grid, cells (0,0),(0,1),(1,0),(1,1) are white, and all other cells are black. Let us use triples to describe the grid: triple (x,y,z) means that there are z dolls placed on cell (x,y) . Initially the state of the grid is (0,0,1) . One of the optimal sequence of operations is as follows: Now all white cells contain 0 dolls, so we have achieved the goal with 5 operations. "... |
Editorial of Codeforces Global Round 21 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
161795992 | DmitriyAnikeyev | E | June 25, 2022, 4:47 p.m. | OK | C# 10 | TESTS | 40 | 295 | 51200000 | ||
161788664 | KumaTachiRen | E | June 25, 2022, 4:19 p.m. | OK | C# 8 | TESTS | 40 | 155 | 20070400 | ||
161800093 | NenadDapic | E | June 25, 2022, 5:39 p.m. | OK | FPC | TESTS | 40 | 62 | 7475200 | ||
161796657 | Miacul_Vieisdrad | E | June 25, 2022, 4:49 p.m. | OK | FPC | TESTS | 40 | 78 | 17100800 | ||
161807799 | ruban | E | June 25, 2022, 7:03 p.m. | OK | FPC | TESTS | 40 | 390 | 26931200 | ||
161789161 | chro4896 | E | June 25, 2022, 4:21 p.m. | OK | GNU C11 | TESTS | 40 | 62 | 10137600 | ||
161791806 | CQYZWJH | E | June 25, 2022, 4:31 p.m. | OK | GNU C++14 | TESTS | 40 | 31 | 5939200 | ||
161826771 | ZhangCW_QwQ | E | June 26, 2022, 4:07 a.m. | OK | GNU C++14 | TESTS | 40 | 31 | 7987200 | ||
161792590 | tokitsukaze | E | June 25, 2022, 4:34 p.m. | OK | GNU C++14 | TESTS | 40 | 31 | 9523200 | ||
161831421 | cbdsopa | E | June 26, 2022, 5:46 a.m. | OK | GNU C++14 | TESTS | 40 | 46 | 7782400 | ||
161793037 | Buzhibujue | E | June 25, 2022, 4:36 p.m. | OK | GNU C++14 | TESTS | 40 | 46 | 10137600 | ||
161829321 | Withers_ | E | June 26, 2022, 5:05 a.m. | OK | GNU C++14 | TESTS | 40 | 61 | 27340800 | ||
161805161 | scli_kws | E | June 25, 2022, 6:27 p.m. | OK | GNU C++14 | TESTS | 40 | 62 | 4300800 | ||
161799372 | CoachDanke | E | June 25, 2022, 5:35 p.m. | OK | GNU C++14 | TESTS | 40 | 62 | 5017600 | ||
161789491 | anodiebird | E | June 25, 2022, 4:22 p.m. | OK | GNU C++14 | TESTS | 40 | 62 | 5836800 | ||
161821423 | Qing_LKYi | E | June 26, 2022, 1:33 a.m. | OK | GNU C++14 | TESTS | 40 | 62 | 8294400 | ||
161793891 | Bobocan | E | June 25, 2022, 4:39 p.m. | OK | GNU C++17 | TESTS | 40 | 31 | 4812800 | ||
161791405 | OctaneC8H18 | E | June 25, 2022, 4:30 p.m. | OK | GNU C++17 | TESTS | 40 | 61 | 9011200 | ||
161808705 | gtushar2000 | E | June 25, 2022, 7:17 p.m. | OK | GNU C++17 | TESTS | 40 | 62 | 5120000 | ||
161807738 | _Backl1ght | E | June 25, 2022, 7:02 p.m. | OK | GNU C++17 | TESTS | 40 | 62 | 5120000 | ||
161801939 | mehtaji | E | June 25, 2022, 5:53 p.m. | OK | GNU C++17 | TESTS | 40 | 62 | 5427200 | ||
161794814 | Gowill_Yellow | E | June 25, 2022, 4:43 p.m. | OK | GNU C++17 | TESTS | 40 | 62 | 5836800 | ||
161821433 | Frank_DD | E | June 26, 2022, 1:33 a.m. | OK | GNU C++17 | TESTS | 40 | 62 | 5836800 | ||
161813810 | krijgertje | E | June 25, 2022, 8:57 p.m. | OK | GNU C++17 | TESTS | 40 | 62 | 6656000 | ||
161830065 | vg869 | E | June 26, 2022, 5:20 a.m. | OK | GNU C++17 | TESTS | 40 | 62 | 9113600 | ||
161802162 | izlyforever | E | June 25, 2022, 5:55 p.m. | OK | GNU C++17 | TESTS | 40 | 77 | 4300800 | ||
161800033 | JhonnyZaz | E | June 25, 2022, 5:38 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 46 | 4403200 | ||
161789979 | hungt1 | E | June 25, 2022, 4:24 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 46 | 5222400 | ||
161796883 | KyuusyouTheSavior | E | June 25, 2022, 4:49 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 46 | 6041600 | ||
161821227 | tomato_potato | E | June 26, 2022, 1:26 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 46 | 6348800 | ||
161807899 | Temmie | E | June 25, 2022, 7:05 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 46 | 7680000 | ||
161792539 | Lain | E | June 25, 2022, 4:34 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 46 | 8294400 | ||
161791280 | Komeiji_Satori_ | E | June 25, 2022, 4:29 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 46 | 8499200 | ||
161808417 | Zuka | E | June 25, 2022, 7:13 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 46 | 9216000 | ||
161803302 | Trying_004 | E | June 25, 2022, 6:06 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 46 | 9216000 | ||
161826137 | Trying_004 | E | June 26, 2022, 3:49 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 46 | 9216000 | ||
161801321 | lbm364dl | E | June 25, 2022, 5:47 p.m. | OK | GNU C++20 (64) | TESTS | 40 | 31 | 5324800 | ||
161801381 | banjiushi | E | June 25, 2022, 5:48 p.m. | OK | GNU C++20 (64) | TESTS | 40 | 31 | 5324800 | ||
161801276 | rgnerdplayer | E | June 25, 2022, 5:47 p.m. | OK | GNU C++20 (64) | TESTS | 40 | 31 | 5324800 | ||
161821077 | ZigZagK | E | June 26, 2022, 1:19 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 31 | 6041600 | ||
161822254 | blank_monster | E | June 26, 2022, 2:01 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 31 | 6041600 | ||
161824145 | ofcoursenotsh | E | June 26, 2022, 2:57 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 31 | 8704000 | ||
161804808 | sugmedic | E | June 25, 2022, 6:23 p.m. | OK | GNU C++20 (64) | TESTS | 40 | 46 | 4710400 | ||
161830011 | hghgh | E | June 26, 2022, 5:19 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 46 | 5324800 | ||
161824353 | hghgh | E | June 26, 2022, 3:02 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 46 | 5324800 | ||
161824322 | hghgh | E | June 26, 2022, 3:01 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 46 | 5324800 | ||
161801641 | shojin_pro | E | June 25, 2022, 5:50 p.m. | OK | Java 11 | TESTS | 40 | 233 | 30515200 | ||
161811489 | dunkingdonuts | E | June 25, 2022, 8:07 p.m. | OK | Java 11 | TESTS | 40 | 265 | 31129600 | ||
161830276 | Plums | E | June 26, 2022, 5:24 a.m. | OK | Java 11 | TESTS | 40 | 311 | 40755200 | ||
161788910 | freehandle | E | June 25, 2022, 4:20 p.m. | OK | Java 11 | TESTS | 40 | 483 | 25190400 | ||
161796696 | Dukkha | E | June 25, 2022, 4:49 p.m. | OK | Java 11 | TESTS | 40 | 561 | 25804800 | ||
161819946 | dzhi | E | June 26, 2022, 12:35 a.m. | OK | Java 11 | TESTS | 40 | 654 | 28569600 | ||
161815497 | Plums | E | June 25, 2022, 9:43 p.m. | OK | Java 11 | TESTS | 40 | 748 | 31334400 | ||
161792726 | earl_of_byteland | E | June 25, 2022, 4:35 p.m. | OK | Java 17 | TESTS | 40 | 327 | 54476800 | ||
161794910 | cc4414 | E | June 25, 2022, 4:43 p.m. | OK | Java 8 | TESTS | 40 | 171 | 32153600 | ||
161787694 | AndreySiunov | E | June 25, 2022, 4:16 p.m. | OK | Java 8 | TESTS | 40 | 311 | 31641600 | ||
161813163 | DylanSmith | E | June 25, 2022, 8:42 p.m. | OK | Java 8 | TESTS | 40 | 420 | 24678400 | ||
161822139 | hcp | E | June 26, 2022, 1:57 a.m. | OK | MS C++ 2017 | TESTS | 40 | 296 | 9113600 | ||
161787448 | coconut99 | E | June 25, 2022, 4:15 p.m. | OK | MS C++ 2017 | TESTS | 40 | 421 | 5939200 | ||
161793008 | fatant | E | June 25, 2022, 4:36 p.m. | OK | MS C++ 2017 | TESTS | 40 | 1092 | 22016000 | ||
161801161 | 1_2_3_4_5_9 | E | June 25, 2022, 5:46 p.m. | OK | PyPy 2 | TESTS | 40 | 638 | 104448000 | ||
161803938 | 1_2_3_4_5_9 | E | June 25, 2022, 6:13 p.m. | OK | PyPy 2 | TESTS | 40 | 686 | 104448000 | ||
161793565 | alonforces | E | June 25, 2022, 4:38 p.m. | OK | PyPy 2 | TESTS | 40 | 826 | 55091200 | ||
161793069 | anishde85 | E | June 25, 2022, 4:36 p.m. | OK | PyPy 3 | TESTS | 40 | 748 | 52326400 | ||
161787656 | ruimina | E | June 25, 2022, 4:16 p.m. | OK | PyPy 3 | TESTS | 40 | 748 | 90931200 | ||
161802332 | sushmanth.dampur8780 | E | June 25, 2022, 5:56 p.m. | OK | PyPy 3 | TESTS | 40 | 1309 | 92057600 | ||
161802423 | sushmanth.dampur8780 | E | June 25, 2022, 5:57 p.m. | OK | PyPy 3 | TESTS | 40 | 1356 | 92876800 | ||
161800832 | peakyfuckingblinder | E | June 25, 2022, 5:43 p.m. | OK | PyPy 3 | TESTS | 40 | 1778 | 260812800 | ||
161801194 | 1_2_3_4_5_9 | E | June 25, 2022, 5:46 p.m. | OK | PyPy 3-64 | TESTS | 40 | 140 | 65433600 | ||
161825972 | Mukundan314 | E | June 26, 2022, 3:45 a.m. | OK | PyPy 3-64 | TESTS | 40 | 155 | 57651200 | ||
161828757 | NKUCristiano | E | June 26, 2022, 4:53 a.m. | OK | PyPy 3-64 | TESTS | 40 | 155 | 74240000 | ||
161787336 | jaglike_makkar | E | June 25, 2022, 4:15 p.m. | OK | PyPy 3-64 | TESTS | 40 | 156 | 56627200 | ||
161799356 | Adroit_001 | E | June 25, 2022, 5:35 p.m. | OK | PyPy 3-64 | TESTS | 40 | 187 | 67686400 | ||
161832205 | taiga0629 | E | June 26, 2022, 5:59 a.m. | OK | PyPy 3-64 | TESTS | 40 | 202 | 64716800 | ||
161802848 | shobonvip | E | June 25, 2022, 6:02 p.m. | OK | PyPy 3-64 | TESTS | 40 | 233 | 76390400 | ||
161805085 | yoyo_124 | E | June 25, 2022, 6:26 p.m. | OK | PyPy 3-64 | TESTS | 40 | 234 | 197632000 | ||
161794840 | sangram03 | E | June 25, 2022, 4:43 p.m. | OK | PyPy 3-64 | TESTS | 40 | 249 | 62771200 | ||
161808163 | summertony717 | E | June 25, 2022, 7:09 p.m. | OK | PyPy 3-64 | TESTS | 40 | 280 | 53145600 | ||
161802808 | yooyou7 | E | June 25, 2022, 6:01 p.m. | OK | Python 3 | TESTS | 40 | 1201 | 18329600 | ||
161824921 | sharingan000 | E | June 26, 2022, 3:16 a.m. | OK | Python 3 | TESTS | 40 | 1747 | 26931200 | ||
161799630 | magnus.hegdahl | E | June 25, 2022, 5:36 p.m. | OK | Rust 2021 | TESTS | 40 | 46 | 6656000 | ||
161824802 | cottoncotton | E | June 26, 2022, 3:13 a.m. | OK | Rust 2021 | TESTS | 40 | 46 | 73216000 | ||
161790295 | CodingJellyfish | E | June 25, 2022, 4:25 p.m. | OK | Rust 2021 | TESTS | 40 | 61 | 9932800 | ||
161799744 | LittleFall | E | June 25, 2022, 5:37 p.m. | OK | Rust 2021 | TESTS | 40 | 93 | 15974400 | ||
161788978 | Russell_Emerine | E | June 25, 2022, 4:20 p.m. | OK | Rust 2021 | TESTS | 40 | 249 | 32972800 |
Back to search problems