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 |
|---|---|---|---|---|---|---|
| 131 | Codeforces Beta Round 95 (Div. 2) | FINISHED | False | 7200 | 454172423 | Nov. 25, 2011, 3 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 724 ) | F | Present to Mom | PROGRAMMING | binary search two pointers | 2200 |
How many stars are there in the sky? A young programmer Polycarpus can't get this question out of his head! He took a photo of the starry sky using his digital camera and now he analyzes the resulting monochrome digital picture. The picture is represented by a rectangular matrix consisting of n lines each containing m characters. A character equals ' 1 ', if the corresponding photo pixel is white and ' 0 ', if it is black. Polycarpus thinks that he has found a star on the photo if he finds a white pixel surrounded by four side-neighboring pixels that are also white: Polycarpus whats to cut out a rectangular area from the photo and give his mom as a present. This area should contain no less than k stars. The stars can intersect, have shared white pixels on the photo. The boy will cut out the rectangular area so that its borders will be parallel to the sides of the photo and the cuts will go straight between the pixel borders. Now Polycarpus keeps wondering how many ways there are to cut an area out of the photo so that it met the conditions given above. Help Polycarpus find this number. The first line of the input data contains three integers n , m and k ( 1 ≤ n , m ≤ 500;1 ≤ k ≤ nm ). Then follow n lines, containing the description of the given photo as a sequence of lines. Each line contains m characters ' 0 ' or ' 1 '. Print the required number of areas on the given photo. We'll number the rows and columns below starting from 1, the coordinates ( p , q ) will denote a cell in row p , column q . In the first sample Polycarpus should cut out any area containing a rectangle whose opposite corners lie in cells (1, 1) and ( 3, 4 ). Only rectangles with opposite corners in (1, 1) and ( x , y ), where x ≥ 3 and y ≥ 4 fit the conditions. In the second sample any rectangle whose each side is no less than four, will do. The possible rectangle sizes are 4 × 4 , 4 × 5 , 5 × 4 and 5 × 5 . Such figures can be cut in 4 ways, 2 ways, 2 ways and 1 way correspondingly. Pl |
| Some ideas for Round #95 (Div 2) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 40992104 | ReaLNero1 | F | July 31, 2018, 1:05 a.m. | OK | GNU C++ | TESTS | 45 | 234 | 1331200 | 2200 | |
| 60222783 | rainboy | F | Sept. 7, 2019, 2:16 p.m. | OK | GNU C11 | TESTS | 45 | 343 | 1228800 | 2200 | |
| 60222610 | rainboy | F | Sept. 7, 2019, 2:13 p.m. | OK | GNU C11 | TESTS | 45 | 358 | 1228800 | 2200 | |
| 57906168 | The.Last.Wizard | F | July 28, 2019, 5:42 p.m. | OK | GNU C++11 | TESTS | 45 | 312 | 1331200 | 2200 | |
| 57903437 | lopare | F | July 28, 2019, 4:38 p.m. | OK | GNU C++11 | TESTS | 45 | 373 | 1843200 | 2200 | |
| 38949912 | Nson | F | June 4, 2018, 4:02 p.m. | OK | GNU C++11 | TESTS | 45 | 374 | 4812800 | 2200 | |
| 38980492 | MohamedNabil97 | F | June 5, 2018, 11:36 p.m. | OK | GNU C++11 | TESTS | 45 | 421 | 2048000 | 2200 | |
| 60299572 | nil0o | F | Sept. 9, 2019, 11:39 a.m. | OK | GNU C++11 | TESTS | 45 | 421 | 2457600 | 2200 | |
| 57950709 | Mohammad_Kartoumeh | F | July 29, 2019, 4:20 p.m. | OK | GNU C++11 | TESTS | 45 | 421 | 9011200 | 2200 | |
| 45096870 | Sodaine | F | Oct. 30, 2018, 12:13 p.m. | OK | GNU C++11 | TESTS | 45 | 452 | 1740800 | 2200 | |
| 54497566 | WOSHIGEPACHONG2 | F | May 22, 2019, 6:37 p.m. | OK | GNU C++11 | TESTS | 45 | 686 | 6246400 | 2200 | |
| 53944958 | PedyD | F | May 10, 2019, 6:04 a.m. | OK | GNU C++11 | TESTS | 45 | 701 | 6246400 | 2200 | |
| 53876999 | Adibov | F | May 8, 2019, 12:31 p.m. | OK | GNU C++11 | TESTS | 45 | 2682 | 4505600 | 2200 | |
| 57162299 | UIugbek_ABDlMANABOV | F | July 16, 2019, 7:49 p.m. | OK | GNU C++14 | TESTS | 45 | 265 | 2662400 | 2200 | |
| 63898417 | LanrTabe | F | Oct. 31, 2019, 3:44 a.m. | OK | GNU C++14 | TESTS | 45 | 280 | 1331200 | 2200 | |
| 43984780 | I_love_Y_UME | F | Oct. 8, 2018, 6:20 a.m. | OK | GNU C++14 | TESTS | 45 | 296 | 1024000 | 2200 | |
| 53864881 | LODB---D | F | May 8, 2019, 2:25 a.m. | OK | GNU C++14 | TESTS | 45 | 296 | 1740800 | 2200 | |
| 54902464 | abhirock753 | F | June 1, 2019, 7:19 a.m. | OK | GNU C++14 | TESTS | 45 | 312 | 1638400 | 2200 | |
| 57162288 | UIugbek_ABDlMANABOV | F | July 16, 2019, 7:49 p.m. | OK | GNU C++14 | TESTS | 45 | 312 | 2457600 | 2200 | |
| 56023816 | sorry_im_smurfing | F | June 25, 2019, 5:50 a.m. | OK | GNU C++14 | TESTS | 45 | 374 | 2048000 | 2200 | |
| 37882915 | apostoldaniel854 | F | May 4, 2018, 12:37 p.m. | OK | GNU C++14 | TESTS | 45 | 374 | 5632000 | 2200 | |
| 36780722 | Dalgerok | F | March 31, 2018, 5:47 p.m. | OK | GNU C++14 | TESTS | 45 | 420 | 4608000 | 2200 | |
| 41308429 | Cmise | F | Aug. 7, 2018, 2:24 p.m. | OK | GNU C++14 | TESTS | 45 | 452 | 3276800 | 2200 | |
| 41754806 | ruo | F | Aug. 18, 2018, 11:27 a.m. | OK | GNU C++17 | TESTS | 45 | 265 | 2252800 | 2200 | |
| 64258331 | MahdiGMK | F | Nov. 4, 2019, 3:42 p.m. | OK | GNU C++17 | TESTS | 45 | 295 | 2048000 | 2200 | |
| 55884818 | tnakao | F | June 21, 2019, 5:36 p.m. | OK | GNU C++17 | TESTS | 45 | 296 | 1228800 | 2200 | |
| 67076004 | Phortox | F | Dec. 17, 2019, 2:29 p.m. | OK | GNU C++17 | TESTS | 45 | 312 | 1536000 | 2200 | |
| 50472883 | deadRabbit | F | Feb. 25, 2019, 3:06 a.m. | OK | GNU C++17 | TESTS | 45 | 373 | 1945600 | 2200 | |
| 42410750 | nns2009 | F | Sept. 3, 2018, 12:39 a.m. | OK | GNU C++17 | TESTS | 45 | 389 | 1740800 | 2200 | |
| 67075313 | Hoshi08 | F | Dec. 17, 2019, 2:15 p.m. | OK | GNU C++17 | TESTS | 45 | 530 | 1740800 | 2200 | |
| 62781185 | alireza_kaviani | F | Oct. 17, 2019, 12:58 p.m. | OK | GNU C++17 | TESTS | 45 | 545 | 24678400 | 2200 | |
| 65793708 | galen_colin | F | Nov. 27, 2019, 2:03 a.m. | OK | GNU C++17 | TESTS | 45 | 545 | 41369600 | 2200 | |
| 62783038 | Its_Gumball | F | Oct. 17, 2019, 1:25 p.m. | OK | GNU C++17 | TESTS | 45 | 546 | 6451200 | 2200 | |
| 60222784 | Dukkha | F | Sept. 7, 2019, 2:16 p.m. | OK | Java 8 | TESTS | 45 | 639 | 0 | 2200 | |
| 47871376 | xodiac | F | Jan. 3, 2019, 1:03 p.m. | OK | Java 8 | TESTS | 45 | 919 | 0 | 2200 |
Back to search problems