Codeforces Round 359 (Div. 1)

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
685 Codeforces Round 359 (Div. 1) FINISHED False 7200 270739487 June 23, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 489 ) D Kay and Eternity PROGRAMMING brute force implementation sortings 2600

B'Snow Queen told Kay to form a word "eternity" using pieces of ice. Kay is eager to deal with the task, because he will then become free, and Snow Queen will give him all the world and a pair of skates. Behind the palace of the Snow Queen there is an infinite field consisting of cells. There are n pieces of ice spread over the field, each piece occupying exactly one cell and no two pieces occupying the same cell. To estimate the difficulty of the task Kay looks at some squares of size k xe2 x80 x89 xc3 x97 xe2 x80 x89k cells, with corners located at the corners of the cells and sides parallel to coordinate axis and counts the number of pieces of the ice inside them. This method gives an estimation of the difficulty of some part of the field. However, Kay also wants to estimate the total difficulty, so he came up with the following criteria: for each x (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) he wants to count the number of squares of size k xe2 x80 x89 xc3 x97 xe2 x80 x89k, such that there are exactly x pieces of the ice inside. Please, help Kay estimate the difficulty of the task given by the Snow Queen. The first line of the input contains two integers n and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89300) -- the number of pieces of the ice and the value k, respectively. Each of the next n lines contains two integers xi and yi ( xe2 x80 x89- xe2 x80 x89109 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi, xe2 x80 x89yi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- coordinates of the cell containing i-th piece of the ice. It 's guaranteed, that no two pieces of the ice occupy the same cell. Print n integers: the number of squares of size k xe2 x80 x89 xc3 x97 xe2 x80 x89k containing exactly 1, xe2 x80 x892, xe2 x80 x89..., xe2 x80 x89n pieces of the ice. '...

Tutorials

Codeforces Round #359 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
26229207 immortalCO D April 9, 2017, 2:46 a.m. OK GNU C++ TESTS 66 202 25600000 2600
31097017 vjudge3 D Oct. 7, 2017, 2:23 a.m. OK GNU C++ TESTS 66 218 6246400 2600
21165563 vjudge5 D Oct. 3, 2016, 3:43 p.m. OK GNU C++ TESTS 66 218 6246400 2600
18862947 yukihana0416 D July 3, 2016, 4:57 a.m. OK GNU C++ TESTS 66 218 6451200 2600
31096016 vjudge1 D Oct. 7, 2017, 1:09 a.m. OK GNU C++ TESTS 66 218 9420800 2600
34704774 yasugongshang D Jan. 30, 2018, 10:09 a.m. OK GNU C++ TESTS 66 218 14131200 2600
40984257 ReaLNero1 D July 30, 2018, 7:16 p.m. OK GNU C++ TESTS 66 218 23449600 2600
18821914 zscc D June 30, 2016, 10:47 a.m. OK GNU C++ TESTS 66 233 6451200 2600
31103108 vjudge4 D Oct. 7, 2017, 7:05 a.m. OK GNU C++ TESTS 66 234 7987200 2600
31103035 lllllllllllllllllllllll D Oct. 7, 2017, 7:03 a.m. OK GNU C++ TESTS 66 234 7987200 2600
63896832 gn_wz D Oct. 31, 2019, 2:36 a.m. OK GNU C++11 TESTS 66 171 7270400 2600
18716137 BSBandme D June 25, 2016, 8:43 a.m. OK GNU C++11 TESTS 66 202 6860800 2600
41528979 dengyixuan D Aug. 12, 2018, 1:30 p.m. OK GNU C++11 TESTS 66 202 7987200 2600
57880363 lopare D July 28, 2019, 7:30 a.m. OK GNU C++11 TESTS 66 202 9420800 2600
57815035 py_ultron D July 26, 2019, 7:14 p.m. OK GNU C++11 TESTS 66 202 9420800 2600
57263701 xielinhan D July 18, 2019, 6:19 a.m. OK GNU C++11 TESTS 66 217 10547200 2600
59343683 _BARUTO D Aug. 23, 2019, 8:43 a.m. OK GNU C++11 TESTS 66 217 11366400 2600
18820747 qingping95 D June 30, 2016, 9:32 a.m. OK GNU C++11 TESTS 66 218 6451200 2600
18781846 NanoApe D June 29, 2016, 11:02 a.m. OK GNU C++11 TESTS 66 218 8601600 2600
31096101 HeZiying D Oct. 7, 2017, 1:23 a.m. OK GNU C++11 TESTS 66 218 9420800 2600
26764880 siyu D April 30, 2017, 9:58 a.m. OK GNU C++14 TESTS 66 233 8294400 2600
23723066 Hujiwara D Jan. 11, 2017, 5:30 p.m. OK GNU C++14 TESTS 66 249 9113600 2600
31100578 _SHENZHEBEI_ D Oct. 7, 2017, 5:35 a.m. OK GNU C++14 TESTS 66 249 42086400 2600
31097004 zhanglexing D Oct. 7, 2017, 2:22 a.m. OK GNU C++14 TESTS 66 265 6348800 2600
43406834 I_love_Y_UME D Sept. 25, 2018, 11:50 a.m. OK GNU C++14 TESTS 66 265 8396800 2600
36408155 Namnamseo D March 19, 2018, 10:57 a.m. OK GNU C++14 TESTS 66 280 9728000 2600
31100270 black_moon D Oct. 7, 2017, 5:23 a.m. OK GNU C++14 TESTS 66 280 36454400 2600
51311495 hiep622032001 D March 14, 2019, 7:39 p.m. OK GNU C++14 TESTS 66 280 128409600 2600
27098139 Benq D May 13, 2017, 10:56 p.m. OK GNU C++14 TESTS 66 296 126873600 2600
31097261 vjudge1 D Oct. 7, 2017, 2:38 a.m. OK GNU C++14 TESTS 66 311 6451200 2600
62210867 hjk1030 D Oct. 9, 2019, 2:27 p.m. OK GNU C++17 TESTS 66 218 11161600 2600
58667711 Atreus D Aug. 12, 2019, 1:11 p.m. OK GNU C++17 TESTS 66 280 128921600 2600
54907873 Grzmot D June 1, 2019, 9:41 a.m. OK GNU C++17 TESTS 66 311 246886400 2600
53204299 ---------- D April 23, 2019, 8:06 p.m. OK GNU C++17 TESTS 66 436 248627200 2600
41521963 Dalgerok D Aug. 12, 2018, 9:34 a.m. OK GNU C++17 TESTS 66 467 246784000 2600
52494131 lqs2015 D April 8, 2019, 12:57 p.m. OK GNU C++17 TESTS 66 530 22937600 2600
60415792 saketh D Sept. 12, 2019, 2:03 a.m. OK GNU C++17 TESTS 66 530 243609600 2600
52450119 Shayan.P D April 7, 2019, 9:23 a.m. OK GNU C++17 TESTS 66 545 18636800 2600
39038427 TOBICHI D June 8, 2018, 7:08 a.m. OK GNU C++17 TESTS 66 546 246681600 2600
59848536 Slaaava D Sept. 1, 2019, 10:31 a.m. OK GNU C++17 TESTS 66 577 6963200 2600
18685188 uwi D June 23, 2016, 6:26 p.m. OK Java 8 TESTS 66 764 10854400 2600
18732479 IgorKoval D June 26, 2016, 9:42 a.m. OK Java 8 TESTS 66 779 249241600 2600
18682434 pashka D June 23, 2016, 6:02 p.m. OK Java 8 TESTS 66 826 4710400 2600
18742793 IgorKoval D June 26, 2016, 8:52 p.m. OK Java 8 TESTS 66 841 4915200 2600
18742748 IgorKoval D June 26, 2016, 8:47 p.m. OK Java 8 TESTS 66 842 4915200 2600
18732525 IgorKoval D June 26, 2016, 9:47 a.m. OK Java 8 TESTS 66 904 248115200 2600
18676466 Petr D June 23, 2016, 5:12 p.m. OK Java 8 TESTS 66 1200 3379200 2600
18685328 Taube D June 23, 2016, 6:28 p.m. OK MS C++ TESTS 66 404 248012800 2600
18775777 Los_Angelos_Laycurse D June 29, 2016, 1:02 a.m. OK MS C++ TESTS 66 670 17817600 2600
18708962 alex-kozinov D June 24, 2016, 7:50 p.m. OK MS C++ TESTS 66 763 245862400 2600
18700984 noxwell D June 24, 2016, 12:51 p.m. OK MS C++ TESTS 66 889 25395200 2600

remove filters

Back to search problems