Codeforces Round 313 (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
559 Codeforces Round 313 (Div. 1) FINISHED False 7200 300038404 July 22, 2015, 2 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6686 ) C Gerald and Giant Chess PROGRAMMING combinatorics dp math number theory 2500

B"Giant chess is quite common in Geraldion. We will not delve into the rules of the game, we'll just say that the game takes place on an h xe2 x80 x89 xc3 x97 xe2 x80 x89w field, and it is painted in two colors, but not like in chess. Almost all cells of the field are white and only some of them are black. Currently Gerald is finishing a game of giant chess against his friend Pollard. Gerald has almost won, and the only thing he needs to win is to bring the pawn from the upper left corner of the board, where it is now standing, to the lower right corner. Gerald is so confident of victory that he became interested, in how many ways can he win? The pawn, which Gerald has got left can go in two ways: one cell down or one cell to the right. In addition, it can not go to the black cells, otherwise the Gerald still loses. There are no other pawns or pieces left on the field, so that, according to the rules of giant chess Gerald moves his pawn until the game is over, and Pollard is just watching this process. The first line of the input contains three integers: h, xe2 x80 x89w, xe2 x80 x89n -- the sides of the board and the number of black cells (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89h, xe2 x80 x89w xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892000). Next n lines contain the description of black cells. The i-th of these lines contains numbers ri, xe2 x80 x89ci (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ri xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89h, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ci xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89w) -- the number of the row and column of the i-th cell. It is guaranteed that the upper left and lower right cell are white and all cells in the description are distinct. Print a single line -- the remainder of the number of ways to move Gerald's pawn from the upper left to the lower right corner modulo 109 xe2 x80 x89+ xe2 x80 x897."...

Tutorials

Codeforces Round 313 — Extended editoral

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
59333709 Higher C Aug. 23, 2019, 3:07 a.m. OK Clang++17 Diagnostics TESTS 55 405 5632000 2500
12175045 Gassa C July 22, 2015, 2:57 p.m. OK D TESTS 55 249 3174400 2500
22010635 myx12345 C Nov. 3, 2016, 10:51 a.m. OK FPC TESTS 55 124 3379200 2500
63955742 luogu_bot1 C Nov. 1, 2019, 1:21 a.m. OK FPC TESTS 55 124 3584000 2500
31538428 sbnh C Oct. 20, 2017, 3:35 p.m. OK FPC TESTS 55 202 4915200 2500
32949722 AsahiKasugano C Dec. 5, 2017, 1:36 p.m. OK FPC TESTS 55 312 6451200 2500
12204321 ruban C July 23, 2015, 5:54 p.m. OK FPC TESTS 55 733 16076800 2500
17149039 sgtlaugh C April 3, 2016, 6:01 p.m. OK GNU C TESTS 55 124 6246400 2500
12202741 sanketM C July 23, 2015, 3:44 p.m. OK GNU C TESTS 55 498 6451200 2500
28382791 sdfzyhx C July 9, 2017, 7:36 a.m. OK GNU C++ TESTS 55 78 3481600 2500
27553686 Scut82 C June 4, 2017, 1:34 a.m. OK GNU C++ TESTS 55 78 3993600 2500
18646421 vjtest C June 22, 2016, 12:22 p.m. OK GNU C++ TESTS 55 78 4812800 2500
25873951 cbhcbh C March 28, 2017, 12:56 p.m. OK GNU C++ TESTS 55 78 5324800 2500
25868651 vjudge4 C March 28, 2017, 8:32 a.m. OK GNU C++ TESTS 55 78 5427200 2500
18764434 aufeas C June 28, 2016, 8:43 a.m. OK GNU C++ TESTS 55 93 1433600 2500
40992009 xxccxcxc C July 31, 2018, 1:01 a.m. OK GNU C++ TESTS 55 93 1638400 2500
38712969 arg_53 C May 29, 2018, 8:20 a.m. OK GNU C++ TESTS 55 93 1638400 2500
38712723 arg_53 C May 29, 2018, 8:08 a.m. OK GNU C++ TESTS 55 93 1638400 2500
38712696 arg_53 C May 29, 2018, 8:06 a.m. OK GNU C++ TESTS 55 93 1638400 2500
52222946 yukato0701 C April 2, 2019, 7:40 a.m. OK GNU C11 TESTS 55 171 3276800 2500
52220060 yukato0701 C April 2, 2019, 5:59 a.m. OK GNU C11 TESTS 55 280 3379200 2500
52219670 yukato0701 C April 2, 2019, 5:44 a.m. OK GNU C11 TESTS 55 280 3379200 2500
52221143 yukato0701 C April 2, 2019, 6:39 a.m. OK GNU C11 TESTS 55 295 3481600 2500
61753012 luogu_bot2 C Oct. 3, 2019, 4:20 a.m. OK GNU C++11 TESTS 55 78 1638400 2500
51072841 luogu_bot3 C March 9, 2019, 8:21 a.m. OK GNU C++11 TESTS 55 78 1740800 2500
44026619 arg_53 C Oct. 9, 2018, 8:17 a.m. OK GNU C++11 TESTS 55 78 1945600 2500
52559767 luogu_bot5 C April 10, 2019, 9:42 a.m. OK GNU C++11 TESTS 55 78 2252800 2500
16781440 FilkinKuiv C March 18, 2016, 12:27 p.m. OK GNU C++11 TESTS 55 78 2457600 2500
59876971 hzk_cpp C Sept. 2, 2019, 12:48 a.m. OK GNU C++11 TESTS 55 78 2457600 2500
34084875 Beast_Within C Jan. 11, 2018, 9:36 a.m. OK GNU C++11 TESTS 55 78 3686400 2500
58386337 fancycoser C Aug. 6, 2019, 12:05 p.m. OK GNU C++11 TESTS 55 78 3993600 2500
48418549 daifucong C Jan. 15, 2019, 11:49 a.m. OK GNU C++11 TESTS 55 78 3993600 2500
61104895 Jackpei C Sept. 23, 2019, 8:43 a.m. OK GNU C++11 TESTS 55 78 4812800 2500
49873354 Rezwan.Arefin01 C Feb. 13, 2019, 2:45 p.m. OK GNU C++14 TESTS 55 77 1638400 2500
42599094 arg_53 C Sept. 7, 2018, 3:11 a.m. OK GNU C++14 TESTS 55 78 1638400 2500
57714751 kusumlata98 C July 25, 2019, 2:09 a.m. OK GNU C++14 TESTS 55 78 1638400 2500
67193062 yan-zp C Dec. 19, 2019, 7:54 a.m. OK GNU C++14 TESTS 55 78 2457600 2500
26915306 krist7599555 C May 7, 2017, 3:49 a.m. OK GNU C++14 TESTS 55 78 3276800 2500
26915262 krist7599555 C May 7, 2017, 3:46 a.m. OK GNU C++14 TESTS 55 78 3276800 2500
36293676 ditoly C March 15, 2018, 8:36 a.m. OK GNU C++14 TESTS 55 78 3481600 2500
26229638 Gintoki C April 9, 2017, 3:37 a.m. OK GNU C++14 TESTS 55 78 3686400 2500
64123689 idxcalcal C Nov. 3, 2019, 3:16 a.m. OK GNU C++14 TESTS 55 78 4300800 2500
54094787 Nostalgically C May 14, 2019, 12:33 p.m. OK GNU C++14 TESTS 55 78 6348800 2500
39768989 majk C June 29, 2018, 1:10 p.m. OK GNU C++17 TESTS 55 78 1638400 2500
50309205 vjudge4 C Feb. 22, 2019, 8:16 a.m. OK GNU C++17 TESTS 55 78 3276800 2500
44904536 TooDumbToWin C Oct. 26, 2018, 10:47 a.m. OK GNU C++17 TESTS 55 93 307200 2500
65822046 Changyu C Nov. 27, 2019, 11 a.m. OK GNU C++17 TESTS 55 93 1638400 2500
51034881 Trote_w C March 8, 2019, 2:42 p.m. OK GNU C++17 TESTS 55 93 1740800 2500
41148550 vjudge4 C Aug. 3, 2018, 7:43 a.m. OK GNU C++17 TESTS 55 93 1945600 2500
63112331 1416 C Oct. 22, 2019, 8 a.m. OK GNU C++17 TESTS 55 93 2457600 2500
61852182 vjudge5 C Oct. 4, 2019, 1:01 p.m. OK GNU C++17 TESTS 55 93 2457600 2500
67474864 910306264 C Dec. 23, 2019, 2:01 p.m. OK GNU C++17 TESTS 55 93 2662400 2500
50927274 nishank.suresh C March 7, 2019, 12:26 p.m. OK GNU C++17 TESTS 55 93 3276800 2500
12216462 NotImplemented C July 24, 2015, 3:58 p.m. OK Go TESTS 55 420 3174400 2500
14245027 behzad.nouri C Nov. 13, 2015, 9:58 p.m. OK Haskell TESTS 55 967 21196800 2500
14244583 behzad.nouri C Nov. 13, 2015, 9:13 p.m. OK Haskell TESTS 55 1060 21196800 2500
14244862 behzad.nouri C Nov. 13, 2015, 9:40 p.m. OK Haskell TESTS 55 1076 21196800 2500
12555417 utkarshl C Aug. 16, 2015, 5:38 a.m. OK Haskell TESTS 55 1965 26419200 2500
12193400 kenkoooo C July 23, 2015, 3:26 a.m. OK Java 7 TESTS 55 296 0 2500
12213349 Bobgy C July 24, 2015, 11:14 a.m. OK Java 7 TESTS 55 358 0 2500
12480744 mjchao C Aug. 12, 2015, 2:07 p.m. OK Java 7 TESTS 55 436 0 2500
12209896 mkirsche C July 24, 2015, 6:45 a.m. OK Java 7 TESTS 55 436 49766400 2500
12179954 pi37 C July 22, 2015, 3:36 p.m. OK Java 7 TESTS 55 452 0 2500
12183397 davidarcila93 C July 22, 2015, 4:19 p.m. OK Java 7 TESTS 55 545 51916800 2500
12206570 tehqin C July 23, 2015, 11:29 p.m. OK Java 7 TESTS 55 639 0 2500
12191489 EmThoDau C July 23, 2015, 12:46 a.m. OK Java 7 TESTS 55 639 0 2500
12179096 fromWork C July 22, 2015, 3:30 p.m. OK Java 7 TESTS 55 686 0 2500
12406272 A7maSa3d C Aug. 7, 2015, 7:29 p.m. OK Java 7 TESTS 55 717 0 2500
29637878 ronakvaghela45 C Aug. 21, 2017, 7:43 a.m. OK Java 8 TESTS 55 218 0 2500
12345491 ironman7453 C Aug. 5, 2015, 4 a.m. OK Java 8 TESTS 55 249 0 2500
12169245 uwi C July 22, 2015, 2:22 p.m. OK Java 8 TESTS 55 249 0 2500
31695098 IntueorDaniel C Oct. 24, 2017, 10:33 p.m. OK Java 8 TESTS 55 249 20684800 2500
12347667 marcose18 C Aug. 5, 2015, 7:41 a.m. OK Java 8 TESTS 55 264 0 2500
12176888 piroz C July 22, 2015, 3:11 p.m. OK Java 8 TESTS 55 264 0 2500
55297027 xiaolin3 C June 8, 2019, 10:20 a.m. OK Java 8 TESTS 55 265 0 2500
12347099 hiro116s C Aug. 5, 2015, 6:59 a.m. OK Java 8 TESTS 55 265 0 2500
12180385 Lewin C July 22, 2015, 3:40 p.m. OK Java 8 TESTS 55 265 0 2500
43651042 prashantpiyush C Oct. 1, 2018, 3:45 p.m. OK Java 8 TESTS 55 280 0 2500
16082772 og.kostya C Feb. 17, 2016, 4:57 p.m. OK MS C# TESTS 55 171 3379200 2500
16082710 og.kostya C Feb. 17, 2016, 4:53 p.m. OK MS C# TESTS 55 186 3379200 2500
17981769 camypaper C May 18, 2016, 3:10 p.m. OK MS C# TESTS 55 233 12185600 2500
16082541 og.kostya C Feb. 17, 2016, 4:43 p.m. OK MS C# TESTS 55 249 3379200 2500
17981768 camypaper C May 18, 2016, 3:10 p.m. OK MS C# TESTS 55 249 12390400 2500
28661252 FallingStar C July 18, 2017, 8 a.m. OK MS C# TESTS 55 311 12595200 2500
42996031 vjudge5 C Sept. 17, 2018, 12:05 p.m. OK MS C++ TESTS 55 93 1638400 2500
12231185 saichandu6 C July 26, 2015, 6:43 p.m. OK MS C++ TESTS 55 108 1228800 2500
12198887 balalaika C July 23, 2015, 11:04 a.m. OK MS C++ TESTS 55 109 2457600 2500
59130585 vjudge1 C Aug. 20, 2019, 10:50 a.m. OK MS C++ TESTS 55 124 1638400 2500
61213750 vjudge1 C Sept. 24, 2019, 12:11 p.m. OK MS C++ TESTS 55 124 3276800 2500
17589555 vadkudr C April 30, 2016, 4:49 a.m. OK MS C++ TESTS 55 124 4608000 2500
12592135 nicky_ua C Aug. 18, 2015, 5:40 p.m. OK MS C++ TESTS 55 139 6451200 2500
57833069 vjudge5 C July 27, 2019, 6:41 a.m. OK MS C++ TESTS 55 140 3276800 2500
12197205 tangshitao C July 23, 2015, 8:48 a.m. OK MS C++ TESTS 55 140 3276800 2500
43034000 vjudge4 C Sept. 18, 2018, 12:54 p.m. OK MS C++ TESTS 55 140 20992000 2500
66226227 zhangwen123 C Dec. 3, 2019, 12:42 p.m. OK MS C++ 2017 TESTS 55 296 10240000 2500
53029289 chdn C April 19, 2019, 9:41 p.m. OK MS C++ 2017 TESTS 55 327 3276800 2500
12549758 Nekrolm C Aug. 15, 2015, 3:44 p.m. OK PyPy 2 TESTS 55 1652 27033600 2500
22855900 Yash_ C Dec. 10, 2016, 12:55 p.m. OK PyPy 2 TESTS 55 1980 28569600 2500
66041369 MinecraftFuns C Nov. 30, 2019, 1:38 p.m. OK PyPy 3 TESTS 55 1263 29081600 2500
12207058 XelMed C July 24, 2015, 1:22 a.m. OK PyPy 3 TESTS 55 1575 40038400 2500
12207087 XelMed C July 24, 2015, 1:26 a.m. OK PyPy 3 TESTS 55 1622 54988800 2500
12180260 rpy3cpp C July 22, 2015, 3:39 p.m. OK PyPy 3 TESTS 55 1637 52633600 2500
12207643 XelMed C July 24, 2015, 2:42 a.m. OK PyPy 3 TESTS 55 1668 39936000 2500
12211471 ItsLastDay C July 24, 2015, 8:30 a.m. OK PyPy 3 TESTS 55 1700 35430400 2500
35888314 ______n______ C March 3, 2018, 2:19 p.m. OK PyPy 3 TESTS 55 1731 83148800 2500
35888209 ______u______ C March 3, 2018, 2:18 p.m. OK PyPy 3 TESTS 55 1731 83148800 2500
35887905 _____k_____ C March 3, 2018, 2:12 p.m. OK PyPy 3 TESTS 55 1731 83148800 2500
35886712 _____i_____ C March 3, 2018, 1:51 p.m. OK PyPy 3 TESTS 55 1731 83148800 2500
35544465 suibaka C Feb. 21, 2018, 10:50 a.m. OK Rust TESTS 55 218 4710400 2500
14302068 RoundheadOFF C Nov. 16, 2015, 6:04 p.m. OK Scala TESTS 55 561 102400 2500
12352460 fido C Aug. 5, 2015, 2:30 p.m. OK Scala TESTS 55 748 307200 2500
12184879 limed C July 22, 2015, 4:45 p.m. OK Scala TESTS 55 1341 512000 2500

remove filters

Back to search problems