Codeforces Round 536 (Div. 2)

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
1106 Codeforces Round 536 (Div. 2) FINISHED False 9600 182885099 Jan. 31, 2019, 12:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12365 ) A Lunar New Year and Cross Counting PROGRAMMING implementation 800

B'Lunar New Year is approaching, and you bought a matrix with lots of "crosses". This matrix M of size n x n contains only 'X ' and '. ' (without quotes). The element in the i -th row and the j -th column (i, j) is defined as M(i, j) , where 1 <= q i, j <= q n . We define a cross appearing in the i -th row and the j -th column ( 1 < i, j < n ) if and only if M(i, j) = M(i - 1, j - 1) = M(i - 1, j + 1) = M(i + 1, j - 1) = M(i + 1, j + 1) = 'X '. The following figure illustrates a cross appearing at position (2, 2) in a 3 x 3 matrix. Your task is to find out the number of crosses in the given matrix M . Two crosses are different if and only if they appear in different rows or columns. The first line contains only one positive integer n ( 1 <= q n <= q 500 ), denoting the size of the matrix M . The following n lines illustrate the matrix M . Each line contains exactly n characters, each of them is 'X ' or '. '. The j -th element in the i -th line represents M(i, j) , where 1 <= q i, j <= q n . Output a single line containing only one integer number k -- the number of crosses in the given matrix M . In the first sample, a cross appears at (3, 3) , so the answer is 1 . In the second sample, no crosses appear since n < 3 , so the answer is 0 . In the third sample, crosses appear at (3, 2) , (3, 4) , (4, 3) , (4, 5) , so the answer is 4 . '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
61300420 BugLeave A Sept. 26, 2019, 4:35 a.m. OK Clang++17 Diagnostics TESTS 40 46 0 800
49438464 saiedhossien99 A Feb. 3, 2019, 7:50 p.m. OK Clang++17 Diagnostics TESTS 40 61 0 800
49504324 vjudge2 A Feb. 5, 2019, 4:46 p.m. OK Clang++17 Diagnostics TESTS 40 62 307200 800
49413323 sayahi A Feb. 3, 2019, 4:01 p.m. OK Clang++17 Diagnostics TESTS 40 77 409600 800
49416987 sayahi A Feb. 3, 2019, 4:13 p.m. OK Clang++17 Diagnostics TESTS 40 78 409600 800
59625951 Ghozlan A Aug. 28, 2019, 3:57 p.m. OK Clang++17 Diagnostics TESTS 40 124 4198400 800
59626054 Ghozlan A Aug. 28, 2019, 3:59 p.m. OK Clang++17 Diagnostics TESTS 40 233 204800 800
49313251 sweetbaby A Feb. 1, 2019, 9:04 a.m. OK Clang++17 Diagnostics TESTS 40 233 204800 800
50595085 jeong000307 A Feb. 28, 2019, 9:41 a.m. OK Clang++17 Diagnostics TESTS 40 233 307200 800
58165236 ahmat A Aug. 2, 2019, 8:49 a.m. OK D TESTS 40 31 4198400 800
49400574 Rustam_3 A Feb. 3, 2019, 2:33 p.m. OK Delphi TESTS 40 46 307200 800
62774599 duydec1 A Oct. 17, 2019, 11:21 a.m. OK FPC TESTS 40 31 1126400 800
49347151 dasinare56 A Feb. 2, 2019, 6:15 a.m. OK FPC TESTS 40 31 1126400 800
49345626 Kostin2020 A Feb. 2, 2019, 5:20 a.m. OK FPC TESTS 40 31 1433600 800
49320121 dan8643 A Feb. 1, 2019, 11:56 a.m. OK FPC TESTS 40 31 1433600 800
54052671 luogu_bot3 A May 13, 2019, 5:39 a.m. OK FPC TESTS 40 46 307200 800
54010692 luogu_bot3 A May 12, 2019, 1:59 a.m. OK FPC TESTS 40 46 307200 800
51954643 pqhieu A March 29, 2019, 12:35 a.m. OK FPC TESTS 40 46 307200 800
49863459 YMJcvjk A Feb. 13, 2019, 10:53 a.m. OK FPC TESTS 40 46 307200 800
49649506 luogu_bot5 A Feb. 9, 2019, 6:50 a.m. OK FPC TESTS 40 46 307200 800
49314328 QAcoder A Feb. 1, 2019, 9:36 a.m. OK FPC TESTS 40 46 307200 800
49364577 masumbillah3416 A Feb. 2, 2019, 2:27 p.m. OK GNU C11 TESTS 40 15 204800 800
62669920 Guraba A Oct. 16, 2019, 9:21 a.m. OK GNU C11 TESTS 40 31 204800 800
68217881 Nilachol A Jan. 5, 2020, 1:58 a.m. OK GNU C11 TESTS 40 31 204800 800
57476777 DevJewel A July 21, 2019, 10:26 p.m. OK GNU C11 TESTS 40 31 204800 800
59798990 ifran09 A Aug. 31, 2019, 9:34 a.m. OK GNU C11 TESTS 40 31 204800 800
60285719 FEILI A Sept. 9, 2019, 2:08 a.m. OK GNU C11 TESTS 40 31 204800 800
60496448 Backbenchar11 A Sept. 13, 2019, 4:35 p.m. OK GNU C11 TESTS 40 31 204800 800
61975309 KhaWareZmI A Oct. 6, 2019, 10:21 a.m. OK GNU C11 TESTS 40 31 204800 800
62252243 Khayrulmithu A Oct. 10, 2019, 9:38 a.m. OK GNU C11 TESTS 40 31 204800 800
67671324 shadreza A Dec. 26, 2019, 8:40 p.m. OK GNU C11 TESTS 40 31 204800 800
49306726 CHNJZ A Feb. 1, 2019, 6:05 a.m. OK GNU C++11 TESTS 40 30 102400 800
49920224 PinkiePie1189 A Feb. 14, 2019, 6:26 p.m. OK GNU C++11 TESTS 40 30 102400 800
60287804 YLWang A Sept. 9, 2019, 4:27 a.m. OK GNU C++11 TESTS 40 30 307200 800
60287797 YLWang A Sept. 9, 2019, 4:26 a.m. OK GNU C++11 TESTS 40 30 307200 800
49302796 return-zan A Feb. 1, 2019, 4:13 a.m. OK GNU C++11 TESTS 40 30 409600 800
49551576 sean9892 A Feb. 7, 2019, 6:25 a.m. OK GNU C++11 TESTS 40 31 0 800
54239374 vjudge1 A May 16, 2019, 12:18 p.m. OK GNU C++11 TESTS 40 31 102400 800
56302497 bagpipe A June 30, 2019, 9:44 a.m. OK GNU C++11 TESTS 40 31 102400 800
55813020 graceoflives A June 20, 2019, 5 a.m. OK GNU C++11 TESTS 40 31 102400 800
58248554 slowman A Aug. 4, 2019, 6:43 a.m. OK GNU C++11 TESTS 40 31 102400 800
49665656 aryankumarnit A Feb. 9, 2019, 2:19 p.m. OK GNU C++14 TESTS 40 15 204800 800
55197268 shubham_01 A June 6, 2019, 9:03 a.m. OK GNU C++14 TESTS 40 15 204800 800
50277489 ArcherYH A Feb. 21, 2019, 10:59 a.m. OK GNU C++14 TESTS 40 15 307200 800
49489101 woong10sae A Feb. 5, 2019, 8:26 a.m. OK GNU C++14 TESTS 40 15 307200 800
49300068 Sayl A Feb. 1, 2019, 2:20 a.m. OK GNU C++14 TESTS 40 15 307200 800
53885887 Lagrang3 A May 8, 2019, 6:07 p.m. OK GNU C++14 TESTS 40 15 512000 800
49306126 mohitv321 A Feb. 1, 2019, 5:50 a.m. OK GNU C++14 TESTS 40 15 716800 800
52507712 vel_satis A April 8, 2019, 7:46 p.m. OK GNU C++14 TESTS 40 15 819200 800
49289465 dkothari A Jan. 31, 2019, 6:51 p.m. OK GNU C++14 TESTS 40 15 3993600 800
49292139 Gankutsuou A Jan. 31, 2019, 7:53 p.m. OK GNU C++14 TESTS 40 15 3993600 800
55546900 ansustdi A June 14, 2019, 3:50 a.m. OK GNU C++17 TESTS 40 15 307200 800
69001047 Nur_4_Earth A Jan. 17, 2020, 7:37 p.m. OK GNU C++17 TESTS 40 15 307200 800
61346883 warrior99 A Sept. 27, 2019, 5:37 a.m. OK GNU C++17 TESTS 40 15 409600 800
49293321 letmeC A Jan. 31, 2019, 8:31 p.m. OK GNU C++17 TESTS 40 15 512000 800
49320313 vjudge1 A Feb. 1, 2019, 12:02 p.m. OK GNU C++17 TESTS 40 15 512000 800
49334105 DON_BD A Feb. 1, 2019, 5:36 p.m. OK GNU C++17 TESTS 40 15 512000 800
49302557 nucleare A Feb. 1, 2019, 4:05 a.m. OK GNU C++17 TESTS 40 15 614400 800
49306900 vjudge4 A Feb. 1, 2019, 6:10 a.m. OK GNU C++17 TESTS 40 15 716800 800
49300931 arknave A Feb. 1, 2019, 2:56 a.m. OK GNU C++17 TESTS 40 15 819200 800
50778839 Celesta A March 4, 2019, 10:15 a.m. OK GNU C++17 TESTS 40 15 1126400 800
51398904 jedikni A March 17, 2019, 6:13 a.m. OK Go TESTS 40 31 0 800
50063349 vchilikov A Feb. 17, 2019, 1:40 p.m. OK Go TESTS 40 779 0 800
57696535 jmazon A July 24, 2019, 4:48 p.m. OK Haskell TESTS 40 93 1126400 800
68341986 o33202919 A Jan. 7, 2020, 4:32 a.m. OK Java 11 TESTS 40 218 0 800
66973226 sanchotik A Dec. 15, 2019, 1:50 p.m. OK Java 11 TESTS 40 233 5632000 800
51369834 Yukimoto A March 16, 2019, 11:24 a.m. OK Java 8 TESTS 40 108 0 800
59918682 arun319 A Sept. 2, 2019, 8:45 p.m. OK Java 8 TESTS 40 109 0 800
57112974 lookcook A July 15, 2019, 6:22 p.m. OK Java 8 TESTS 40 109 0 800
56176231 beroul A June 27, 2019, 7:19 p.m. OK Java 8 TESTS 40 109 0 800
52916601 yosrbd A April 17, 2019, 4:06 p.m. OK Java 8 TESTS 40 109 0 800
49990694 chojh1222 A Feb. 16, 2019, 12:40 p.m. OK Java 8 TESTS 40 109 0 800
49624219 wadissimo A Feb. 8, 2019, 11:02 a.m. OK Java 8 TESTS 40 109 0 800
49561768 tsumit023 A Feb. 7, 2019, 12:55 p.m. OK Java 8 TESTS 40 109 0 800
49504059 paianiket18 A Feb. 5, 2019, 4:39 p.m. OK Java 8 TESTS 40 109 0 800
49491762 kosmoh10 A Feb. 5, 2019, 10:21 a.m. OK Java 8 TESTS 40 109 0 800
49268042 orazbek A Jan. 31, 2019, 1:53 p.m. OK JavaScript TESTS 40 31 8396800 800
50233503 I.A.K.O.V A Feb. 20, 2019, 9:39 a.m. OK Kotlin TESTS 40 109 0 800
49816620 Killer45 A Feb. 12, 2019, 6:18 a.m. OK Kotlin TESTS 40 139 0 800
49941993 glider.g A Feb. 15, 2019, 10:09 a.m. OK Kotlin TESTS 40 155 0 800
49362382 Quaternion A Feb. 2, 2019, 1:28 p.m. OK Kotlin TESTS 40 155 0 800
59338925 Ahmadjon A Aug. 23, 2019, 6:36 a.m. OK Kotlin TESTS 40 187 0 800
49340849 Askander A Feb. 1, 2019, 10:47 p.m. OK Mono C# TESTS 40 46 716800 800
49492236 DoesNotExist A Feb. 5, 2019, 10:39 a.m. OK Mono C# TESTS 40 46 1228800 800
53957218 og.kostya A May 10, 2019, 12:24 p.m. OK Mono C# TESTS 40 61 1024000 800
49958746 nastya1199 A Feb. 15, 2019, 5:12 p.m. OK Mono C# TESTS 40 61 1228800 800
49397028 Beboo A Feb. 3, 2019, 12:51 p.m. OK Mono C# TESTS 40 61 1638400 800
65158012 Ruban_Denic A Nov. 16, 2019, 10:10 a.m. OK Mono C# TESTS 40 61 1638400 800
49347654 mayumi A Feb. 2, 2019, 6:34 a.m. OK Mono C# TESTS 40 61 1638400 800
49473421 hunternds A Feb. 4, 2019, 6:13 p.m. OK Mono C# TESTS 40 62 1228800 800
49318908 TRR A Feb. 1, 2019, 11:23 a.m. OK Mono C# TESTS 40 62 1228800 800
56150275 we1cometo A June 27, 2019, 7:55 a.m. OK Mono C# TESTS 40 62 1638400 800
49685570 vjudge5 A Feb. 10, 2019, 6:53 a.m. OK MS C++ TESTS 40 31 204800 800
65913041 vjudge2 A Nov. 28, 2019, 1:36 p.m. OK MS C++ TESTS 40 31 204800 800
49890840 vjudge5 A Feb. 14, 2019, 3:28 a.m. OK MS C++ TESTS 40 31 204800 800
65744615 vjudge3 A Nov. 26, 2019, 11:44 a.m. OK MS C++ TESTS 40 31 307200 800
56830796 vjudge3 A July 11, 2019, 6:56 a.m. OK MS C++ TESTS 40 31 307200 800
68194970 vjudge1 A Jan. 4, 2020, 2:15 p.m. OK MS C++ TESTS 40 31 307200 800
57186283 vjudge4 A July 17, 2019, 8:48 a.m. OK MS C++ TESTS 40 31 307200 800
65111955 vjudge2 A Nov. 15, 2019, 11:34 p.m. OK MS C++ TESTS 40 31 307200 800
57185877 vjudge1 A July 17, 2019, 8:41 a.m. OK MS C++ TESTS 40 31 307200 800
56830075 vjudge4 A July 11, 2019, 6:36 a.m. OK MS C++ TESTS 40 31 307200 800
49402587 Still_Theory A Feb. 3, 2019, 3:30 p.m. OK MS C++ 2017 TESTS 40 31 307200 800
65952516 vjudge2 A Nov. 29, 2019, 11:27 a.m. OK MS C++ 2017 TESTS 40 31 307200 800
62490164 coder_pikachu A Oct. 13, 2019, 10:27 a.m. OK MS C++ 2017 TESTS 40 31 307200 800
56501674 kchau A July 4, 2019, 6:38 a.m. OK MS C++ 2017 TESTS 40 31 307200 800
52462257 wellox A April 7, 2019, 1:55 p.m. OK MS C++ 2017 TESTS 40 31 307200 800
51405462 Mahdi1015 A March 17, 2019, 9:35 a.m. OK MS C++ 2017 TESTS 40 31 307200 800
50589757 tangbinjie A Feb. 28, 2019, 6:41 a.m. OK MS C++ 2017 TESTS 40 31 307200 800
49954135 Onlykarting A Feb. 15, 2019, 3:17 p.m. OK MS C++ 2017 TESTS 40 31 307200 800
49369343 aeremin A Feb. 2, 2019, 4:36 p.m. OK MS C++ 2017 TESTS 40 31 307200 800
49334947 Husne_Matar A Feb. 1, 2019, 5:59 p.m. OK MS C++ 2017 TESTS 40 31 307200 800
49326320 ssdh233 A Feb. 1, 2019, 2:12 p.m. OK Node.js TESTS 40 171 4812800 800
49264310 jakutis A Jan. 31, 2019, 1:31 p.m. OK Ocaml TESTS 40 358 3788800 800
56130327 Gimber A June 26, 2019, 6:29 p.m. OK PascalABC.NET TESTS 40 202 0 800
49509122 Rustam_3 A Feb. 5, 2019, 7:09 p.m. OK PascalABC.NET TESTS 40 311 1024000 800
54284120 Houy3 A May 17, 2019, 2:59 p.m. OK PascalABC.NET TESTS 40 311 1228800 800
68422559 Nidavellir A Jan. 8, 2020, 11:54 p.m. OK PascalABC.NET TESTS 40 327 1126400 800
65251282 MaksimFedoseev A Nov. 17, 2019, 12:05 p.m. OK PascalABC.NET TESTS 40 327 1433600 800
49509894 Rustam_3 A Feb. 5, 2019, 7:37 p.m. OK PascalABC.NET TESTS 40 420 1228800 800
49509922 Rustam_3 A Feb. 5, 2019, 7:38 p.m. OK PascalABC.NET TESTS 40 451 204800 800
49283773 mayakin A Jan. 31, 2019, 5:14 p.m. OK PHP TESTS 40 139 6041600 800
49919533 shehebe A Feb. 14, 2019, 6:03 p.m. OK PyPy 2 TESTS 40 140 1024000 800
49324871 masonsbro A Feb. 1, 2019, 1:42 p.m. OK PyPy 2 TESTS 40 140 1331200 800
49338135 TLE_WA A Feb. 1, 2019, 7:49 p.m. OK PyPy 2 TESTS 40 140 1433600 800
49295055 gatsko A Jan. 31, 2019, 9:50 p.m. OK PyPy 2 TESTS 40 140 1433600 800
53947141 codeseeker A May 10, 2019, 7:24 a.m. OK PyPy 2 TESTS 40 140 5734400 800
49284959 god1048 A Jan. 31, 2019, 5:31 p.m. OK PyPy 2 TESTS 40 140 24371200 800
54174915 kaif_7 A May 15, 2019, 1:25 p.m. OK PyPy 2 TESTS 40 155 5836800 800
49284530 conjecture_xyz A Jan. 31, 2019, 5:25 p.m. OK PyPy 2 TESTS 40 155 24166400 800
49275839 ssk497 A Jan. 31, 2019, 2:36 p.m. OK PyPy 2 TESTS 40 155 24371200 800
49491490 sy_chen A Feb. 5, 2019, 10:11 a.m. OK PyPy 2 TESTS 40 187 819200 800
49476235 Stephan A Feb. 4, 2019, 7:30 p.m. OK PyPy 3 TESTS 40 155 1843200 800
49311630 SHOVON588 A Feb. 1, 2019, 8:14 a.m. OK PyPy 3 TESTS 40 156 2150400 800
54347651 Suto82 A May 18, 2019, 1:14 p.m. OK PyPy 3 TESTS 40 156 2252800 800
51835033 shangtai A March 25, 2019, 5:55 p.m. OK PyPy 3 TESTS 40 170 2150400 800
49500551 ntrung03 A Feb. 5, 2019, 2:56 p.m. OK PyPy 3 TESTS 40 170 2969600 800
53533528 gaziz A April 29, 2019, 11:14 p.m. OK PyPy 3 TESTS 40 171 2150400 800
49533089 nobe0716 A Feb. 6, 2019, 2:39 p.m. OK PyPy 3 TESTS 40 171 2150400 800
64272284 algdgn A Nov. 4, 2019, 7:36 p.m. OK PyPy 3 TESTS 40 171 2764800 800
49299080 E-Maks A Feb. 1, 2019, 1:32 a.m. OK PyPy 3 TESTS 40 171 2764800 800
57796465 Dmitry07 A July 26, 2019, 11:36 a.m. OK PyPy 3 TESTS 40 171 2867200 800
49386511 PraveenMJ A Feb. 3, 2019, 7:14 a.m. OK Python 2 TESTS 40 311 1536000 800
49267061 Kyrylo A Jan. 31, 2019, 1:47 p.m. OK Python 2 TESTS 40 312 6348800 800
69399567 bsr011 A Jan. 23, 2020, 7:55 a.m. OK Python 2 TESTS 40 327 307200 800
49891924 nealzane A Feb. 14, 2019, 4:33 a.m. OK Python 2 TESTS 40 327 307200 800
49263234 lprashant94 A Jan. 31, 2019, 1:25 p.m. OK Python 2 TESTS 40 327 7372800 800
50817345 franckmy A March 5, 2019, 12:04 p.m. OK Python 2 TESTS 40 343 204800 800
50501292 bhuwanchandra.it A Feb. 25, 2019, 5:21 p.m. OK Python 2 TESTS 40 358 1331200 800
49275223 bharathjoshi99 A Jan. 31, 2019, 2:32 p.m. OK Python 2 TESTS 40 373 7372800 800
49291240 msadiq074 A Jan. 31, 2019, 7:27 p.m. OK Python 2 TESTS 40 420 6348800 800
49272256 odinson A Jan. 31, 2019, 2:15 p.m. OK Python 2 TESTS 40 530 6348800 800
49335353 Black_Fregat A Feb. 1, 2019, 6:12 p.m. OK Python 3 TESTS 40 217 2048000 800
52916512 sonhuytranpython2 A April 17, 2019, 4:04 p.m. OK Python 3 TESTS 40 296 819200 800
59810684 mn-9 A Aug. 31, 2019, 1:30 p.m. OK Python 3 TESTS 40 311 614400 800
56036004 Nuzdarova A June 25, 2019, 12:05 p.m. OK Python 3 TESTS 40 311 1638400 800
49917327 Forsten A Feb. 14, 2019, 5:04 p.m. OK Python 3 TESTS 40 311 1843200 800
67659251 cs1g A Dec. 26, 2019, 3:06 p.m. OK Python 3 TESTS 40 327 819200 800
67296399 rkaiser A Dec. 20, 2019, 5:05 p.m. OK Python 3 TESTS 40 327 819200 800
49659109 yashk14 A Feb. 9, 2019, 11:30 a.m. OK Python 3 TESTS 40 327 819200 800
49514424 Leendertz A Feb. 6, 2019, 12:16 a.m. OK Python 3 TESTS 40 327 1638400 800
49287704 meooow A Jan. 31, 2019, 6:15 p.m. OK Python 3 TESTS 40 327 7782400 800
57560303 fshuto A July 22, 2019, 11:51 p.m. OK Ruby TESTS 40 249 28774400 800
49294657 Yellowboy A Jan. 31, 2019, 9:31 p.m. OK Ruby TESTS 40 311 409600 800
49633540 kobae964 A Feb. 8, 2019, 5:27 p.m. OK Ruby TESTS 40 312 716800 800
59427167 megachuhancer A Aug. 25, 2019, 3:35 a.m. OK Ruby TESTS 40 312 50483200 800
49393184 Bur A Feb. 3, 2019, 11:09 a.m. OK Ruby TESTS 40 327 409600 800
49295043 Yellowboy A Jan. 31, 2019, 9:50 p.m. OK Ruby TESTS 40 327 409600 800
50284944 wasiq.bhamla A Feb. 21, 2019, 2:25 p.m. OK Ruby TESTS 40 389 716800 800
56028946 tuna_salad A June 25, 2019, 8:28 a.m. OK Rust TESTS 40 31 614400 800
49351092 ancv1990 A Feb. 2, 2019, 8:34 a.m. OK Rust TESTS 40 31 1126400 800
49303055 kafu A Feb. 1, 2019, 4:24 a.m. OK Rust TESTS 40 46 1126400 800
49289155 denison7111 A Jan. 31, 2019, 6:44 p.m. OK Scala TESTS 40 482 39526400 800

remove filters

Back to search problems