Codeforces Beta Round 53

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
57 Codeforces Beta Round 53 FINISHED False 7200 480434423 Jan. 25, 2011, 4 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 288 ) E Chess PROGRAMMING math shortest paths 2900

Brian the Rabbit adores chess. Not long ago he argued with Stewie the Rabbit that a knight is better than a king. To prove his point he tries to show that the knight is very fast but Stewie doesn't accept statements without evidence. He constructed an infinite chessboard for Brian, where he deleted several squares to add some more interest to the game. Brian only needs to count how many different board squares a knight standing on a square with coordinates of (0, 0) can reach in no more than k moves. Naturally, it is forbidden to move to the deleted squares. Brian doesn't very much like exact sciences himself and is not acquainted with programming, that's why he will hardly be able to get ahead of Stewie who has already started solving the problem. Help Brian to solve the problem faster than Stewie. The first line contains two integers k and n (0 ≤ k ≤ 1018, 0 ≤ n ≤ 440) which are correspondingly the maximal number of moves a knight can make and the number of deleted cells. Then follow n lines, each giving the coordinates of a deleted square in the form (xi, yi) (|xi| ≤ 10, |yi| ≤ 10). All the numbers are integer, the deleted squares are different and it is guaranteed that the square (0, 0) is not deleted. Please, do not use %lld specificator to read or write 64-bit integers in C++. It is preffered to use cin (also you may use %I64d). You must print the answer on a single line. As it can be rather long, you should print it modulo 1000000007.

Tutorials

Codeforces Beta Round #53 [Analysis]

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
276760 evg-zhabotinsky E Feb. 7, 2011, 2:01 p.m. OK Delphi TESTS 45 30 84992000 2900
821287 LifeKeeper E Oct. 31, 2011, 8:07 a.m. OK FPC TESTS 45 30 1638400 2900
17397085 Ahriman E April 20, 2016, 9:38 a.m. OK FPC TESTS 45 30 13004800 2900
794326 siuvit E Oct. 25, 2011, 2:09 a.m. OK FPC TESTS 45 30 30617600 2900
8446633 gardener E Oct. 28, 2014, 6:37 a.m. OK FPC TESTS 45 62 11264000 2900
8446554 gardener E Oct. 28, 2014, 6:22 a.m. OK FPC TESTS 45 62 13004800 2900
1516818 sillycross E April 13, 2012, 9:03 a.m. OK FPC TESTS 45 80 18022400 2900
823969 memphis0603 E Nov. 1, 2011, 11:52 p.m. OK FPC TESTS 45 90 14643200 2900
8426246 gyz_gyz E Oct. 27, 2014, 5:14 a.m. OK FPC TESTS 45 310 48128000 2900
266443 Sereja E Jan. 27, 2011, 7:48 p.m. OK FPC TESTS 45 880 145305600 2900
4132133 asmn E July 22, 2013, 2:45 a.m. OK GNU C++ TESTS 45 15 307200 2900
293315 ChuYuxun E Feb. 21, 2011, 9:27 a.m. OK GNU C++ TESTS 45 30 1740800 2900
20789099 zhanglexing E Sept. 21, 2016, 5:59 a.m. OK GNU C++ TESTS 45 30 1945600 2900
5996874 zhj E March 11, 2014, 2:20 p.m. OK GNU C++ TESTS 45 30 1945600 2900
2045543 lasten E Aug. 24, 2012, 3:21 a.m. OK GNU C++ TESTS 45 30 2048000 2900
23546027 lys1280023 E Jan. 5, 2017, 1:07 a.m. OK GNU C++ TESTS 45 30 2457600 2900
35894561 _____k_____ E March 3, 2018, 4:24 p.m. OK GNU C++ TESTS 45 30 4096000 2900
35893797 ______n______ E March 3, 2018, 4:07 p.m. OK GNU C++ TESTS 45 30 4096000 2900
35889227 ______u______ E March 3, 2018, 2:36 p.m. OK GNU C++ TESTS 45 30 4096000 2900
35887935 _____i_____ E March 3, 2018, 2:13 p.m. OK GNU C++ TESTS 45 30 4096000 2900
2908625 Archon.JK E Jan. 12, 2013, 3:44 p.m. OK GNU C++0x TESTS 45 15 3072000 2900
6967396 FancyCoder E June 27, 2014, 6:42 a.m. OK GNU C++0x TESTS 45 310 194764800 2900
6967395 FancyCoder E June 27, 2014, 6:42 a.m. OK GNU C++0x TESTS 45 310 194764800 2900
12402216 No_Use_Anymore E Aug. 7, 2015, 12:24 p.m. OK GNU C++11 TESTS 45 30 2560000 2900
17503896 Y_UME E April 25, 2016, 6:30 a.m. OK GNU C++11 TESTS 45 30 3891200 2900
12117370 HellKitsune E July 19, 2015, 1:58 p.m. OK GNU C++11 TESTS 45 60 1024000 2900
21829144 retired_coder E Oct. 27, 2016, 4:35 p.m. OK GNU C++11 TESTS 45 60 3379200 2900
17604477 snowflake E May 1, 2016, 7:37 a.m. OK GNU C++11 TESTS 45 60 4300800 2900
42979365 zhouyuyang E Sept. 17, 2018, 8:40 a.m. OK GNU C++11 TESTS 45 62 819200 2900
64293250 luogu_bot4 E Nov. 5, 2019, 7:47 a.m. OK GNU C++11 TESTS 45 62 1945600 2900
59133169 yltx E Aug. 20, 2019, 11:45 a.m. OK GNU C++11 TESTS 45 62 1945600 2900
51146647 csj E March 11, 2019, 1:28 a.m. OK GNU C++11 TESTS 45 62 50278400 2900
57906521 lopare E July 28, 2019, 5:51 p.m. OK GNU C++11 TESTS 45 92 1945600 2900
56016110 sorry_im_smurfing E June 24, 2019, 9:20 p.m. OK GNU C++14 TESTS 45 92 2048000 2900
20343234 2016 E Sept. 2, 2016, 3:02 p.m. OK GNU C++14 TESTS 45 186 50585600 2900
53768862 hychyc E May 5, 2019, 3:10 a.m. OK GNU C++14 TESTS 45 218 67686400 2900
23621773 Ali.Pi E Jan. 7, 2017, 10:28 a.m. OK GNU C++14 TESTS 45 716 4096000 2900
38389179 ruo E May 18, 2018, 4:56 a.m. OK GNU C++17 TESTS 45 62 4096000 2900
62031920 the_lonely E Oct. 7, 2019, 1:28 a.m. OK GNU C++17 TESTS 45 186 16588800 2900
50725260 Dmexuber E March 3, 2019, 9:36 a.m. OK GNU C++17 TESTS 45 186 16691200 2900
57250770 user02 E July 17, 2019, 10:43 p.m. OK GNU C++17 TESTS 45 216 16384000 2900
61012237 MinecraftFuns E Sept. 21, 2019, 12:31 p.m. OK GNU C++17 TESTS 45 310 131993600 2900
49526057 Qingyu E Feb. 6, 2019, 11:24 a.m. OK GNU C++17 TESTS 45 498 92672000 2900
1629871 uwi E April 26, 2012, 4:40 p.m. OK Java 6 TESTS 45 110 43212800 2900
49467073 namratha_253 E Feb. 4, 2019, 3:32 p.m. OK Java 8 TESTS 45 278 0 2900
265146 maksay E Jan. 25, 2011, 10:43 p.m. OK MS C++ TESTS 45 30 243712000 2900
408143 AleX E April 26, 2011, 9:21 p.m. OK MS C++ TESTS 45 110 4403200 2900
370869 Connector E April 6, 2011, 10:30 a.m. OK MS C++ TESTS 45 200 65638400 2900
408140 AleX E April 26, 2011, 9:20 p.m. OK MS C++ TESTS 45 530 13824000 2900

remove filters

Back to search problems