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 |
---|---|---|---|---|---|---|
1197 | Educational Codeforces Round 69 (Rated for Div. 2) | FINISHED | False | 7200 | 173633087 | July 22, 2019, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1704 ) | E | Culture Code | PROGRAMMING | binary search combinatorics data structures dp shortest paths sortings | 2300 |
B"There are famous Russian nesting dolls named matryoshkas sold in one of the souvenir stores nearby, and you'd like to buy several of them. The store has n different matryoshkas. Any matryoshka is a figure of volume out_i with an empty space inside of volume in_i (of course, out_i > in_i ). You don't have much free space inside your bag, but, fortunately, you know that matryoshkas can be nested one inside another. Formally, let's call a set of matryoshkas nested if we can rearrange dolls in such a way, that the first doll can be nested inside the second one, the second doll -- inside the third one and so on. Matryoshka i can be nested inside matryoshka j if out_i <= in_j . So only the last doll will take space inside your bag. Let's call extra space of a nested set of dolls as a total volume of empty space inside this structure. Obviously, it's equal to in_{i_1} + (in_{i_2} - out_{i_1}) + (in_{i_3} - out_{i_2}) + ... + (in_{i_k} - out_{i_{k-1}}) , where i_1 , i_2 , ..., i_k are the indices of the chosen dolls in the order they are nested in each other. Finally, let's call a nested subset of the given sequence as big enough if there isn't any doll from the sequence that can be added to the nested subset without breaking its nested property. You want to buy many matryoshkas, so you should choose a big enough nested subset to buy it. But you will be disappointed if too much space in your bag will be wasted, so you want to choose a big enough subset so that its extra space is minimum possible among all big enough subsets. Now you wonder, how many different nested subsets meet these conditions (they are big enough, and there is no big enough subset such that its extra space is less than the extra space of the chosen subset). Two subsets are considered different if there exists at least one index i such that one of the subsets contains the i -th doll, and another subset doesn't. Since the"... |
E |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
57571607 | sansen | E | July 23, 2019, 5:29 a.m. | OK | GNU C11 | TESTS | 49 | 218 | 8396800 | 2300 | |
57706650 | rainboy | E | July 24, 2019, 8:26 p.m. | OK | GNU C11 | TESTS | 49 | 249 | 7987200 | 2300 | |
57629679 | Gnoud__ | E | July 24, 2019, 8:20 a.m. | OK | GNU C++11 | TESTS | 49 | 62 | 4812800 | 2300 | |
57547991 | msuwakow | E | July 22, 2019, 4:38 p.m. | OK | GNU C++11 | TESTS | 49 | 62 | 5017600 | 2300 | |
57601922 | pxv | E | July 23, 2019, 4:10 p.m. | OK | GNU C++11 | TESTS | 49 | 62 | 5632000 | 2300 | |
57601501 | xChannel | E | July 23, 2019, 4 p.m. | OK | GNU C++11 | TESTS | 49 | 62 | 5632000 | 2300 | |
57855327 | EncodeTalker | E | July 27, 2019, 2:48 p.m. | OK | GNU C++11 | TESTS | 50 | 62 | 5632000 | 2300 | |
57855437 | EncodeTalker | E | July 27, 2019, 2:50 p.m. | OK | GNU C++11 | TESTS | 50 | 62 | 5632000 | 2300 | |
57643674 | chenyewei_1234 | E | July 24, 2019, 1:28 p.m. | OK | GNU C++11 | TESTS | 49 | 62 | 8294400 | 2300 | |
57788610 | vjudge4 | E | July 26, 2019, 8:41 a.m. | OK | GNU C++11 | TESTS | 49 | 62 | 10035200 | 2300 | |
58175160 | M_sea | E | Aug. 2, 2019, 12:47 p.m. | OK | GNU C++11 | TESTS | 50 | 62 | 13619200 | 2300 | |
58171947 | M_sea | E | Aug. 2, 2019, 11:41 a.m. | OK | GNU C++11 | TESTS | 50 | 62 | 13619200 | 2300 | |
58323171 | wh2001_ZY | E | Aug. 5, 2019, 6:44 a.m. | OK | GNU C++14 | TESTS | 50 | 93 | 4096000 | 2300 | |
57540303 | MtOI | E | July 22, 2019, 4:01 p.m. | OK | GNU C++14 | TESTS | 49 | 93 | 4812800 | 2300 | |
60353941 | zhixiang | E | Sept. 10, 2019, 3:22 p.m. | OK | GNU C++14 | TESTS | 50 | 108 | 14643200 | 2300 | |
57552099 | k5888200 | E | July 22, 2019, 5:55 p.m. | OK | GNU C++14 | TESTS | 49 | 124 | 4812800 | 2300 | |
57635415 | sonhv3112 | E | July 24, 2019, 10:33 a.m. | OK | GNU C++14 | TESTS | 49 | 124 | 6553600 | 2300 | |
57535040 | atoiz | E | July 22, 2019, 3:36 p.m. | OK | GNU C++14 | TESTS | 49 | 139 | 4812800 | 2300 | |
59140059 | HMS_Warspite | E | Aug. 20, 2019, 2:05 p.m. | OK | GNU C++14 | TESTS | 50 | 139 | 6451200 | 2300 | |
57533841 | Hasan0540 | E | July 22, 2019, 3:32 p.m. | OK | GNU C++14 | TESTS | 49 | 139 | 15974400 | 2300 | |
58414650 | ccsu_cat_love_jiejie | E | Aug. 7, 2019, 3:59 a.m. | OK | GNU C++14 | TESTS | 50 | 140 | 3174400 | 2300 | |
62185155 | HideoSatou | E | Oct. 9, 2019, 7:59 a.m. | OK | GNU C++14 | TESTS | 50 | 140 | 4812800 | 2300 | |
57822848 | krijgertje | E | July 27, 2019, 12:56 a.m. | OK | GNU C++17 | TESTS | 49 | 124 | 3174400 | 2300 | |
58135546 | jkxjkx1031 | E | Aug. 1, 2019, 3:57 p.m. | OK | GNU C++17 | TESTS | 50 | 124 | 5632000 | 2300 | |
57538265 | Antygenius | E | July 22, 2019, 3:51 p.m. | OK | GNU C++17 | TESTS | 49 | 139 | 3993600 | 2300 | |
60475690 | senthil28 | E | Sept. 13, 2019, 7:59 a.m. | OK | GNU C++17 | TESTS | 50 | 139 | 4812800 | 2300 | |
57574208 | zero1778 | E | July 23, 2019, 6:26 a.m. | OK | GNU C++17 | TESTS | 49 | 139 | 4812800 | 2300 | |
58235178 | mohamedeltair | E | Aug. 3, 2019, 7:03 p.m. | OK | GNU C++17 | TESTS | 50 | 139 | 5632000 | 2300 | |
57536371 | kongroo | E | July 22, 2019, 3:42 p.m. | OK | GNU C++17 | TESTS | 49 | 140 | 4812800 | 2300 | |
57563595 | Hipo_3412 | E | July 23, 2019, 2:03 a.m. | OK | GNU C++17 | TESTS | 49 | 140 | 4812800 | 2300 | |
58233893 | mohamedeltair | E | Aug. 3, 2019, 6:20 p.m. | OK | GNU C++17 | TESTS | 50 | 140 | 5632000 | 2300 | |
57549798 | poorwill | E | July 22, 2019, 5:03 p.m. | OK | GNU C++17 | TESTS | 49 | 140 | 6451200 | 2300 | |
64310203 | WangJialei | E | Nov. 5, 2019, 12:32 p.m. | OK | Go | TESTS | 50 | 452 | 32051200 | 2300 | |
64310359 | vjudge2 | E | Nov. 5, 2019, 12:34 p.m. | OK | Go | TESTS | 50 | 467 | 32051200 | 2300 | |
57557691 | kirigiri | E | July 22, 2019, 8:57 p.m. | OK | Haskell | TESTS | 49 | 1372 | 64204800 | 2300 | |
57556962 | kirigiri | E | July 22, 2019, 8:24 p.m. | OK | Haskell | TESTS | 49 | 1388 | 70553600 | 2300 | |
57556369 | kirigiri | E | July 22, 2019, 8 p.m. | OK | Haskell | TESTS | 49 | 1980 | 138752000 | 2300 | |
57536896 | insert_cool_handle | E | July 22, 2019, 3:45 p.m. | OK | Java 8 | TESTS | 49 | 265 | 2867200 | 2300 | |
57607445 | Musin | E | July 23, 2019, 6:37 p.m. | OK | Java 8 | TESTS | 49 | 452 | 4915200 | 2300 | |
57554795 | ZeyadKhattab | E | July 22, 2019, 7:07 p.m. | OK | Java 8 | TESTS | 49 | 468 | 10956800 | 2300 | |
57555586 | Ahmad | E | July 22, 2019, 7:31 p.m. | OK | Java 8 | TESTS | 49 | 514 | 27852800 | 2300 | |
57558608 | TheRaven | E | July 22, 2019, 9:47 p.m. | OK | Java 8 | TESTS | 49 | 514 | 40550400 | 2300 | |
59592896 | beginner1010 | E | Aug. 27, 2019, 10:03 p.m. | OK | Java 8 | TESTS | 50 | 577 | 25395200 | 2300 | |
57766742 | Nutella3000 | E | July 25, 2019, 8:58 p.m. | OK | Java 8 | TESTS | 49 | 592 | 6963200 | 2300 | |
59594061 | beginner1010 | E | Aug. 27, 2019, 11:28 p.m. | OK | Java 8 | TESTS | 50 | 639 | 25395200 | 2300 | |
59594034 | beginner1010 | E | Aug. 27, 2019, 11:25 p.m. | OK | Java 8 | TESTS | 50 | 639 | 25395200 | 2300 | |
57774744 | iamavalon | E | July 26, 2019, 2:54 a.m. | OK | Java 8 | TESTS | 49 | 654 | 15155200 | 2300 | |
61767073 | Spheniscine | E | Oct. 3, 2019, 8:58 a.m. | OK | Kotlin | TESTS | 50 | 592 | 3174400 | 2300 | |
57589994 | Spheniscine | E | July 23, 2019, 11:57 a.m. | OK | Kotlin | TESTS | 49 | 826 | 6246400 | 2300 | |
57584906 | Spheniscine | E | July 23, 2019, 10:13 a.m. | OK | Kotlin | TESTS | 49 | 857 | 10854400 | 2300 | |
57584974 | Spheniscine | E | July 23, 2019, 10:15 a.m. | OK | Kotlin | TESTS | 49 | 873 | 10854400 | 2300 | |
57968786 | Spheniscine | E | July 30, 2019, 4:35 a.m. | OK | Kotlin | TESTS | 50 | 888 | 5632000 | 2300 | |
57582282 | Spheniscine | E | July 23, 2019, 9:17 a.m. | OK | Kotlin | TESTS | 49 | 951 | 11878400 | 2300 | |
57547353 | sekti | E | July 22, 2019, 4:34 p.m. | OK | Kotlin | TESTS | 49 | 967 | 31027200 | 2300 | |
57581887 | Spheniscine | E | July 23, 2019, 9:09 a.m. | OK | Kotlin | TESTS | 49 | 997 | 11571200 | 2300 | |
57581475 | Spheniscine | E | July 23, 2019, 9:01 a.m. | OK | Kotlin | TESTS | 49 | 1279 | 7065600 | 2300 | |
57552946 | claw88 | E | July 22, 2019, 6:17 p.m. | OK | Mono C# | TESTS | 49 | 624 | 24064000 | 2300 | |
57849108 | pmitkov | E | July 27, 2019, 12:24 p.m. | OK | MS C++ 2017 | TESTS | 49 | 311 | 19251200 | 2300 | |
57560448 | pseuda | E | July 23, 2019, 12:02 a.m. | OK | MS C++ 2017 | TESTS | 49 | 436 | 9625600 | 2300 | |
57544680 | aytal.d | E | July 22, 2019, 4:23 p.m. | OK | MS C++ 2017 | TESTS | 49 | 467 | 19660800 | 2300 | |
58358605 | yumtam | E | Aug. 5, 2019, 9:22 p.m. | OK | PyPy 2 | TESTS | 50 | 1107 | 57446400 | 2300 | |
57555042 | jainnish98 | E | July 22, 2019, 7:14 p.m. | OK | PyPy 2 | TESTS | 49 | 1357 | 46899200 | 2300 | |
57543798 | nwi | E | July 22, 2019, 4:18 p.m. | OK | PyPy 2 | TESTS | 49 | 1497 | 43315200 | 2300 | |
57550406 | Kiri8128 | E | July 22, 2019, 5:15 p.m. | OK | PyPy 3 | TESTS | 49 | 1263 | 20787200 | 2300 | |
57614188 | Pokeylope | E | July 23, 2019, 11:58 p.m. | OK | PyPy 3 | TESTS | 49 | 1263 | 23654400 | 2300 | |
57549065 | Kiri8128 | E | July 22, 2019, 4:52 p.m. | OK | PyPy 3 | TESTS | 49 | 1294 | 20992000 | 2300 | |
57644115 | meooow | E | July 24, 2019, 1:38 p.m. | OK | PyPy 3 | TESTS | 49 | 1434 | 138137600 | 2300 | |
57643523 | meooow | E | July 24, 2019, 1:26 p.m. | OK | PyPy 3 | TESTS | 49 | 1481 | 145100800 | 2300 | |
57597878 | nwi | E | July 23, 2019, 2:37 p.m. | OK | Python 2 | TESTS | 49 | 997 | 43315200 | 2300 | |
57597642 | nwi | E | July 23, 2019, 2:32 p.m. | OK | Python 2 | TESTS | 49 | 998 | 43212800 | 2300 | |
57597210 | nwi | E | July 23, 2019, 2:23 p.m. | OK | Python 2 | TESTS | 49 | 1013 | 43212800 | 2300 | |
57594981 | nwi | E | July 23, 2019, 1:37 p.m. | OK | Python 2 | TESTS | 49 | 1045 | 43212800 | 2300 | |
57551477 | nwi | E | July 22, 2019, 5:39 p.m. | OK | Python 2 | TESTS | 49 | 1075 | 29900800 | 2300 | |
57594263 | nwi | E | July 23, 2019, 1:22 p.m. | OK | Python 2 | TESTS | 49 | 1091 | 43212800 | 2300 | |
57556863 | Helli.code | E | July 22, 2019, 8:21 p.m. | OK | Python 2 | TESTS | 49 | 1169 | 24268800 | 2300 | |
57550443 | Kiri8128 | E | July 22, 2019, 5:15 p.m. | OK | Python 3 | TESTS | 49 | 1216 | 24780800 | 2300 | |
57644319 | meooow | E | July 24, 2019, 1:43 p.m. | OK | Python 3 | TESTS | 49 | 1513 | 33280000 | 2300 | |
57552027 | EbTech | E | July 22, 2019, 5:53 p.m. | OK | Rust | TESTS | 49 | 124 | 6348800 | 2300 | |
57540040 | tuna_salad | E | July 22, 2019, 3:59 p.m. | OK | Rust | TESTS | 49 | 124 | 21913600 | 2300 | |
57928269 | YeXiaoRain | E | July 29, 2019, 7:51 a.m. | OK | Rust | TESTS | 50 | 171 | 10547200 | 2300 | |
57601731 | kobae964 | E | July 23, 2019, 4:05 p.m. | OK | Rust | TESTS | 49 | 420 | 22118400 | 2300 | |
57857609 | tigertang | E | July 27, 2019, 3:51 p.m. | OK | Rust | TESTS | 50 | 592 | 136806400 | 2300 | |
58569733 | gazaan | E | Aug. 11, 2019, 9:33 a.m. | OK | Scala | TESTS | 50 | 1699 | 52121600 | 2300 | |
58570191 | gazaan | E | Aug. 11, 2019, 9:47 a.m. | OK | Scala | TESTS | 50 | 1700 | 52121600 | 2300 | |
58569288 | gazaan | E | Aug. 11, 2019, 9:21 a.m. | OK | Scala | TESTS | 50 | 1777 | 89395200 | 2300 | |
58570765 | gazaan | E | Aug. 11, 2019, 10:05 a.m. | OK | Scala | TESTS | 50 | 1809 | 55193600 | 2300 | |
58567977 | gazaan | E | Aug. 11, 2019, 8:48 a.m. | OK | Scala | TESTS | 50 | 1872 | 93388800 | 2300 | |
58570127 | gazaan | E | Aug. 11, 2019, 9:45 a.m. | OK | Scala | TESTS | 50 | 1887 | 55193600 | 2300 | |
58567728 | gazaan | E | Aug. 11, 2019, 8:42 a.m. | OK | Scala | TESTS | 50 | 1949 | 93388800 | 2300 | |
58568272 | gazaan | E | Aug. 11, 2019, 8:56 a.m. | OK | Scala | TESTS | 50 | 1950 | 93388800 | 2300 | |
58568084 | gazaan | E | Aug. 11, 2019, 8:50 a.m. | OK | Scala | TESTS | 50 | 1950 | 93388800 | 2300 | |
58566938 | gazaan | E | Aug. 11, 2019, 8:23 a.m. | OK | Scala | TESTS | 50 | 1996 | 90828800 | 2300 |
Back to search problems