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 |
|---|---|---|---|---|---|---|
| 185 | Codeforces Round 118 (Div. 1) | FINISHED | False | 7200 | 440260223 | May 4, 2012, 3:30 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 149 ) | C | Clever Fat Rat | PROGRAMMING | dp | 2300 |
The Fat Rat and his friend Сerealguy have had a bet whether at least a few oats are going to descend to them by some clever construction. The figure below shows the clever construction. A more formal description of the clever construction is as follows. The clever construction consists of n rows with scales. The first row has n scales, the second row has ( n - 1) scales, the i -th row has ( n - i + 1) scales, the last row has exactly one scale. Let's number the scales in each row from the left to the right, starting from 1 . Then the value of w i , k in kilograms (1 ≤ i ≤ n ; 1 ≤ k ≤ n - i + 1) is the weight capacity parameter of the k -th scale in the i -th row. If a body whose mass is not less than w i , k falls on the scale with weight capacity w i , k , then the scale breaks. At that anything that the scale has on it, either falls one level down to the left (if possible) or one level down to the right (if possible). In other words, if the scale w i , k ( i < n ) breaks, then there are at most two possible variants in which the contents of the scale's pan can fall out: all contents of scale w i , k falls either on scale w i + 1, k - 1 (if it exists), or on scale w i + 1, k (if it exists). If scale w n , 1 breaks, then all its contents falls right in the Fat Rat's claws. Please note that the scales that are the first and the last in a row, have only one variant of dropping the contents. Initially, oats are simultaneously put on all scales of the first level. The i -th scale has a i kilograms of oats put on it. After that the scales start breaking and the oats start falling down in some way. You can consider everything to happen instantly. That is, the scale breaks instantly and the oats also fall instantly. The Fat Rat is sure that whatever happens, he will not get the oats from the first level. Cerealguy is sure that there is such a scenario, when the rat gets at least some number of the oats. Help the Fat Rat and the Cerealguy. Determine, which one is |
| Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 29292536 | regmsif | C | Aug. 8, 2017, 7:22 p.m. | OK | D | TESTS | 70 | 62 | 2969600 | 2300 | |
| 29292395 | regmsif | C | Aug. 8, 2017, 7:10 p.m. | OK | D | TESTS | 70 | 77 | 2969600 | 2300 | |
| 1689498 | Sereja | C | May 15, 2012, 6:24 p.m. | OK | Delphi | TESTS | 62 | 1880 | 9420800 | 2300 | |
| 31526966 | hwizard | C | Oct. 20, 2017, 8:22 a.m. | OK | GNU C++ | TESTS | 70 | 46 | 38809600 | 2300 | |
| 1696163 | ryanaaa | C | May 16, 2012, 7:28 p.m. | OK | GNU C++ | TESTS | 62 | 60 | 38092800 | 2300 | |
| 2327205 | yedeming | C | Oct. 9, 2012, 7:37 a.m. | OK | GNU C++ | TESTS | 62 | 140 | 36659200 | 2300 | |
| 14169678 | 130705009 | C | Nov. 9, 2015, 12:04 p.m. | OK | GNU C++ | TESTS | 70 | 202 | 36659200 | 2300 | |
| 28273956 | Scut82 | C | July 4, 2017, 7:35 a.m. | OK | GNU C++ | TESTS | 70 | 217 | 38809600 | 2300 | |
| 11337932 | Amr_Hassan | C | May 28, 2015, 7:23 p.m. | OK | GNU C++ | TESTS | 70 | 233 | 36659200 | 2300 | |
| 35843346 | ______u______ | C | March 2, 2018, 3:10 p.m. | OK | GNU C++ | TESTS | 70 | 234 | 38912000 | 2300 | |
| 35843316 | ______n______ | C | March 2, 2018, 3:10 p.m. | OK | GNU C++ | TESTS | 70 | 234 | 38912000 | 2300 | |
| 35843114 | _____i_____ | C | March 2, 2018, 3:06 p.m. | OK | GNU C++ | TESTS | 70 | 234 | 38912000 | 2300 | |
| 35843112 | _____k_____ | C | March 2, 2018, 3:06 p.m. | OK | GNU C++ | TESTS | 70 | 234 | 38912000 | 2300 | |
| 10017501 | johnasselta | C | Feb. 25, 2015, 9:52 a.m. | OK | GNU C++0x | TESTS | 70 | 31 | 36556800 | 2300 | |
| 9974997 | ffosilva | C | Feb. 23, 2015, 11:35 p.m. | OK | GNU C++0x | TESTS | 70 | 108 | 29081600 | 2300 | |
| 7248178 | kennethsnow | C | July 26, 2014, 8:21 a.m. | OK | GNU C++0x | TESTS | 62 | 218 | 29286400 | 2300 | |
| 57900992 | lopare | C | July 28, 2019, 3:40 p.m. | OK | GNU C++11 | TESTS | 70 | 46 | 29286400 | 2300 | |
| 57822511 | py_ultron | C | July 27, 2019, 12:39 a.m. | OK | GNU C++11 | TESTS | 70 | 46 | 29286400 | 2300 | |
| 54498710 | WOSHIGEPACHONG2 | C | May 22, 2019, 7:13 p.m. | OK | GNU C++11 | TESTS | 70 | 46 | 29286400 | 2300 | |
| 51207470 | xielinhan | C | March 12, 2019, 5:51 a.m. | OK | GNU C++11 | TESTS | 70 | 46 | 29286400 | 2300 | |
| 30377977 | lxlxl | C | Sept. 16, 2017, 7:06 a.m. | OK | GNU C++11 | TESTS | 70 | 46 | 36659200 | 2300 | |
| 63108617 | vjudge4 | C | Oct. 22, 2019, 6:21 a.m. | OK | GNU C++11 | TESTS | 70 | 46 | 52019200 | 2300 | |
| 67274675 | ElangBondol | C | Dec. 20, 2019, 9:43 a.m. | OK | GNU C++11 | TESTS | 70 | 61 | 27136000 | 2300 | |
| 45676175 | tieunhi | C | Nov. 13, 2018, 1:13 p.m. | OK | GNU C++11 | TESTS | 70 | 62 | 29286400 | 2300 | |
| 40991285 | ReaLNero1 | C | July 31, 2018, 12:32 a.m. | OK | GNU C++11 | TESTS | 70 | 62 | 36761600 | 2300 | |
| 54907227 | SoiMae | C | June 1, 2019, 9:23 a.m. | OK | GNU C++11 | TESTS | 70 | 171 | 36659200 | 2300 | |
| 60380891 | Scut82 | C | Sept. 11, 2019, 9:06 a.m. | OK | GNU C++14 | TESTS | 70 | 62 | 27136000 | 2300 | |
| 55992999 | Scut82 | C | June 24, 2019, 8:44 a.m. | OK | GNU C++14 | TESTS | 70 | 186 | 36659200 | 2300 | |
| 67958585 | mota_haathi | C | Dec. 30, 2019, 10:39 a.m. | OK | GNU C++14 | TESTS | 70 | 218 | 36659200 | 2300 | |
| 23670018 | Ali.Pi | C | Jan. 9, 2017, 7:39 p.m. | OK | GNU C++14 | TESTS | 70 | 233 | 38604800 | 2300 | |
| 44678899 | ruo | C | Oct. 22, 2018, 4:31 a.m. | OK | GNU C++17 | TESTS | 70 | 46 | 36966400 | 2300 | |
| 63085210 | 3liAckerman | C | Oct. 21, 2019, 4:23 p.m. | OK | GNU C++17 | TESTS | 70 | 46 | 73420800 | 2300 | |
| 63085197 | vjudge1 | C | Oct. 21, 2019, 4:23 p.m. | OK | GNU C++17 | TESTS | 70 | 46 | 73420800 | 2300 | |
| 67955724 | tap_tapii | C | Dec. 30, 2019, 9:34 a.m. | OK | GNU C++17 | TESTS | 70 | 61 | 27136000 | 2300 | |
| 56020414 | chongryong | C | June 25, 2019, 2:44 a.m. | OK | GNU C++17 | TESTS | 70 | 61 | 36659200 | 2300 | |
| 56020420 | chongryong | C | June 25, 2019, 2:44 a.m. | OK | GNU C++17 | TESTS | 70 | 62 | 36659200 | 2300 | |
| 9974375 | ffosilva | C | Feb. 23, 2015, 9:48 p.m. | OK | Java 7 | TESTS | 70 | 748 | 144179200 | 2300 | |
| 34091220 | Noureldin | C | Jan. 11, 2018, 3:44 p.m. | OK | Java 8 | TESTS | 70 | 389 | 99020800 | 2300 | |
| 9974878 | ffosilva | C | Feb. 23, 2015, 11:13 p.m. | OK | Java 8 | TESTS | 70 | 483 | 46387200 | 2300 | |
| 9974406 | ffosilva | C | Feb. 23, 2015, 9:53 p.m. | OK | Java 8 | TESTS | 70 | 795 | 137625600 | 2300 | |
| 1874010 | rajesh.biswas734 | C | July 7, 2012, 3:34 p.m. | OK | MS C++ | TESTS | 62 | 80 | 28569600 | 2300 | |
| 1873337 | GingLe | C | July 7, 2012, 9:04 a.m. | OK | MS C++ | TESTS | 62 | 80 | 28569600 | 2300 | |
| 1664339 | Battle_Mage | C | May 5, 2012, 1:55 p.m. | OK | MS C++ | TESTS | 62 | 1000 | 1433600 | 2300 | |
| 1851097 | ProCoder | C | July 3, 2012, 9:41 a.m. | OK | MS C++ | TESTS | 62 | 1030 | 1536000 | 2300 | |
| 9974936 | ffosilva | C | Feb. 23, 2015, 11:23 p.m. | OK | MS C++ | TESTS | 70 | 1856 | 0 | 2300 | |
| 9974931 | ffosilva | C | Feb. 23, 2015, 11:22 p.m. | OK | MS C++ | TESTS | 70 | 1856 | 0 | 2300 | |
| 2101942 | stet | C | Sept. 7, 2012, 8:22 a.m. | OK | Python 2 | TESTS | 62 | 1343 | 2867200 | 2300 | |
| 2101746 | stet | C | Sept. 7, 2012, 6:50 a.m. | OK | Python 2 | TESTS | 62 | 1343 | 3686400 | 2300 |
Back to search problems