Codeforces Round 689 (Div. 2, based on Zed Code Competition)

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
1461 Codeforces Round 689 (Div. 2, based on Zed Code Competition) FINISHED False 7200 129482663 Dec. 11, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12728 ) B Find the Spruce PROGRAMMING brute force dp

B'Holidays are coming up really soon. Rick realized that it 's time to think about buying a traditional spruce tree. But Rick doesn 't want real trees to get hurt so he decided to find some in an n x m matrix consisting of "*" and ".". To find every spruce first let 's define what a spruce in the matrix is. A set of matrix cells is called a spruce of height k with origin at point (x, y) if: Examples of correct and incorrect spruce trees: Now Rick wants to know how many spruces his n x m matrix contains. Help Rick solve this problem. Each test contains one or more test cases. The first line contains the number of test cases t ( 1 <= t <= 10 ). The first line of each test case contains two integers n and m ( 1 <= n, m <= 500 ) -- matrix size. Next n lines of each test case contain m characters c_{i, j} -- matrix contents. It is guaranteed that c_{i, j} is either a "." or an "*". It is guaranteed that the sum of n cdot m over all test cases does not exceed 500^2 ( sum n cdot m <= 500^2 ). For each test case, print single integer -- the total number of spruces in the matrix. In the first test case the first spruce of height 2 has its origin at point (1, 2) , the second spruce of height 1 has its origin at point (1, 2) , the third spruce of height 1 has its origin at point (2, 1) , the fourth spruce of height 1 has its origin at point (2, 2) , the fifth spruce of height 1 has its origin at point (2, 3) . In the second test case the first spruce of height 1 has its origin at point (1, 2) , the second spruce of height 1 has its origin at point (2, 1) , the third spruce of height 1 has its origin at point (2, 2) . '...

Tutorials

Codeforces Round #689 (Div. 2). Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
100972097 huangdachuan B Dec. 11, 2020, 7:51 p.m. OK Clang++17 Diagnostics TESTS 15 390 7372800
100966668 Srk1C B Dec. 11, 2020, 6:20 p.m. OK GNU C11 TESTS 15 62 1228800
100981959 defKaeru B Dec. 12, 2020, 2:36 a.m. OK GNU C++11 TESTS 15 15 1126400
100981450 tourifeng B Dec. 12, 2020, 2:15 a.m. OK GNU C++11 TESTS 15 15 1228800
100950484 ropz B Dec. 11, 2020, 4:12 p.m. OK GNU C++11 TESTS 15 15 1331200
100949952 anhtaihsgs B Dec. 11, 2020, 4:11 p.m. OK GNU C++11 TESTS 15 15 1433600
100948866 Myzc B Dec. 11, 2020, 4:07 p.m. OK GNU C++11 TESTS 15 15 2048000
100981807 1v7w B Dec. 12, 2020, 2:30 a.m. OK GNU C++11 TESTS 15 30 1126400
100949464 enaim B Dec. 11, 2020, 4:09 p.m. OK GNU C++11 TESTS 15 30 1331200
100950586 yanwu B Dec. 11, 2020, 4:13 p.m. OK GNU C++11 TESTS 15 30 1331200
100983613 dagexiangdani B Dec. 12, 2020, 3:29 a.m. OK GNU C++11 TESTS 15 30 2150400
100984075 2018LZY B Dec. 12, 2020, 3:44 a.m. OK GNU C++11 TESTS 15 31 0
100961438 abuuDarda B Dec. 11, 2020, 5:19 p.m. OK GNU C++14 TESTS 15 30 1126400
100954459 rheallyc B Dec. 11, 2020, 4:26 p.m. OK GNU C++14 TESTS 15 30 1843200
100947779 codenova99 B Dec. 11, 2020, 4:03 p.m. OK GNU C++14 TESTS 15 31 1024000
100950131 iaish B Dec. 11, 2020, 4:11 p.m. OK GNU C++14 TESTS 15 31 1024000
100981321 lordmartin2308 B Dec. 12, 2020, 2:10 a.m. OK GNU C++14 TESTS 15 31 1228800
100969411 i_m_rj B Dec. 11, 2020, 7:01 p.m. OK GNU C++14 TESTS 15 31 1228800
100988594 saksham_singh B Dec. 12, 2020, 5:39 a.m. OK GNU C++14 TESTS 15 31 1228800
100984967 dragoon_Tyson B Dec. 12, 2020, 4:11 a.m. OK GNU C++14 TESTS 15 31 1228800
100982655 karthik_28 B Dec. 12, 2020, 3:01 a.m. OK GNU C++14 TESTS 15 31 1228800
100981281 Find_me_if_you_can__ B Dec. 12, 2020, 2:08 a.m. OK GNU C++14 TESTS 15 31 1228800
100958949 Mriduldu B Dec. 11, 2020, 5:02 p.m. OK GNU C++17 TESTS 15 30 1228800
100948370 the.night.fury B Dec. 11, 2020, 4:05 p.m. OK GNU C++17 TESTS 15 30 1228800
100961165 k1ps B Dec. 11, 2020, 5:17 p.m. OK GNU C++17 TESTS 15 30 1536000
100975924 timf1089 B Dec. 11, 2020, 9:27 p.m. OK GNU C++17 TESTS 15 30 1638400
100984557 kushb30 B Dec. 12, 2020, 3:59 a.m. OK GNU C++17 TESTS 15 30 2560000
100966949 NoobCarlsen B Dec. 11, 2020, 6:24 p.m. OK GNU C++17 TESTS 15 30 2662400
100965697 prafull_vrsh B Dec. 11, 2020, 6:07 p.m. OK GNU C++17 TESTS 15 30 2662400
100979257 ki0apa B Dec. 12, 2020, 12:27 a.m. OK GNU C++17 TESTS 15 30 4505600
100983345 Aanandan_T_Ma B Dec. 12, 2020, 3:20 a.m. OK GNU C++17 TESTS 15 31 1024000
100988194 Atiqur_Rahman99 B Dec. 12, 2020, 5:32 a.m. OK GNU C++17 TESTS 15 31 1024000
100969292 Ri_Ni B Dec. 11, 2020, 6:58 p.m. OK GNU C++17 (64) TESTS 15 15 1331200
100984295 AleisterCrowley B Dec. 12, 2020, 3:51 a.m. OK GNU C++17 (64) TESTS 15 15 1740800
100967248 WrongAnswerOnTest1 B Dec. 11, 2020, 6:28 p.m. OK GNU C++17 (64) TESTS 15 30 2355200
100982110 PaliLo B Dec. 12, 2020, 2:43 a.m. OK GNU C++17 (64) TESTS 15 31 1024000
100964837 anil_111 B Dec. 11, 2020, 5:56 p.m. OK GNU C++17 (64) TESTS 15 31 1024000
100966720 .QuangBui. B Dec. 11, 2020, 6:21 p.m. OK GNU C++17 (64) TESTS 15 31 1331200
100961788 PauloMiranda98 B Dec. 11, 2020, 5:23 p.m. OK GNU C++17 (64) TESTS 15 31 1331200
100949964 Anuraj_Agarwal B Dec. 11, 2020, 4:11 p.m. OK GNU C++17 (64) TESTS 15 31 1433600
100978552 universe- B Dec. 11, 2020, 11:39 p.m. OK GNU C++17 (64) TESTS 15 31 1433600
100972470 f2016941 B Dec. 11, 2020, 7:58 p.m. OK GNU C++17 (64) TESTS 15 31 1433600
100970408 williemaster B Dec. 11, 2020, 7:18 p.m. OK Go TESTS 15 77 0
100961273 Nero B Dec. 11, 2020, 5:18 p.m. OK Haskell TESTS 15 61 5324800
100963990 akman10 B Dec. 11, 2020, 5:45 p.m. OK Java 11 TESTS 15 171 0
100950810 KhanhNguyenn B Dec. 11, 2020, 4:14 p.m. OK Java 11 TESTS 15 171 0
100960308 gssakash B Dec. 11, 2020, 5:10 p.m. OK Java 11 TESTS 15 171 0
100968164 RuthlessAggression B Dec. 11, 2020, 6:41 p.m. OK Java 11 TESTS 15 171 0
100967535 krishnam_rathi B Dec. 11, 2020, 6:31 p.m. OK Java 11 TESTS 15 171 0
100962862 aadersh321chaubey B Dec. 11, 2020, 5:33 p.m. OK Java 11 TESTS 15 171 0
100956419 Tolob B Dec. 11, 2020, 4:32 p.m. OK Java 11 TESTS 15 187 0
100963166 bug_eater B Dec. 11, 2020, 5:36 p.m. OK Java 11 TESTS 15 187 0
100972134 shankha123 B Dec. 11, 2020, 7:52 p.m. OK Java 11 TESTS 15 218 0
100954328 hrxcr7 B Dec. 11, 2020, 4:26 p.m. OK Java 11 TESTS 15 218 0
100972451 XiangLi B Dec. 11, 2020, 7:58 p.m. OK Java 8 TESTS 15 108 0
100980798 wangskyone B Dec. 12, 2020, 1:45 a.m. OK Java 8 TESTS 15 109 0
100965632 danielaggarwal B Dec. 11, 2020, 6:06 p.m. OK Java 8 TESTS 15 109 0
100965067 2020akadaver B Dec. 11, 2020, 5:58 p.m. OK Java 8 TESTS 15 109 0
100962630 mareshkau B Dec. 11, 2020, 5:31 p.m. OK Java 8 TESTS 15 109 0
100955819 RauPro B Dec. 11, 2020, 4:30 p.m. OK Java 8 TESTS 15 109 0
100952106 Akash_kunwar2 B Dec. 11, 2020, 4:18 p.m. OK Java 8 TESTS 15 124 0
100986281 Whiplash99 B Dec. 12, 2020, 4:47 a.m. OK Java 8 TESTS 15 124 0
100979322 kadintang1 B Dec. 12, 2020, 12:31 a.m. OK Java 8 TESTS 15 140 0
100965170 rdsaurabh97 B Dec. 11, 2020, 6 p.m. OK Java 8 TESTS 15 155 0
100978722 catforce B Dec. 11, 2020, 11:53 p.m. OK Kotlin TESTS 15 280 409600
100978568 catforce B Dec. 11, 2020, 11:41 p.m. OK Kotlin TESTS 15 296 409600
100965319 Ahmadjon B Dec. 11, 2020, 6:01 p.m. OK Kotlin TESTS 15 545 6041600
100977991 catforce B Dec. 11, 2020, 11:05 p.m. OK Kotlin TESTS 15 561 0
100978209 catforce B Dec. 11, 2020, 11:18 p.m. OK Kotlin TESTS 15 561 409600
100978093 catforce B Dec. 11, 2020, 11:11 p.m. OK Kotlin TESTS 15 608 204800
100978048 catforce B Dec. 11, 2020, 11:07 p.m. OK Kotlin TESTS 15 623 204800
100978069 catforce B Dec. 11, 2020, 11:09 p.m. OK Kotlin TESTS 15 732 0
100969530 MrDracuLa B Dec. 11, 2020, 7:02 p.m. OK Mono C# TESTS 15 218 4300800
100962881 ustaritz B Dec. 11, 2020, 5:33 p.m. OK MS C++ 2017 TESTS 15 31 1433600
100956115 jonitox B Dec. 11, 2020, 4:31 p.m. OK MS C++ 2017 TESTS 15 61 1228800
100982973 HHYer B Dec. 12, 2020, 3:10 a.m. OK MS C++ 2017 TESTS 15 62 1024000
100983539 Torehalt B Dec. 12, 2020, 3:27 a.m. OK MS C++ 2017 TESTS 15 62 1433600
100975754 P___ B Dec. 11, 2020, 9:20 p.m. OK MS C++ 2017 TESTS 15 78 1331200
100978241 say_hi B Dec. 11, 2020, 11:19 p.m. OK MS C++ 2017 TESTS 15 78 2252800
100960078 ustaritz B Dec. 11, 2020, 5:09 p.m. OK MS C++ 2017 TESTS 15 93 2560000
100980717 megatortik B Dec. 12, 2020, 1:42 a.m. OK MS C++ 2017 TESTS 15 108 1331200
100982018 Torehalt B Dec. 12, 2020, 2:39 a.m. OK MS C++ 2017 TESTS 15 140 1331200
100959459 Gravekper B Dec. 11, 2020, 5:05 p.m. OK MS C++ 2017 TESTS 15 187 614400
100988906 ravinem1 B Dec. 12, 2020, 5:44 a.m. OK .NET Core C# TESTS 15 124 13721600
100968477 MyEighthName B Dec. 11, 2020, 6:45 p.m. OK .NET Core C# TESTS 15 139 2150400
100953005 seeroe B Dec. 11, 2020, 4:21 p.m. OK .NET Core C# TESTS 15 358 3379200
100970374 ap1008 B Dec. 11, 2020, 7:17 p.m. OK PyPy 2 TESTS 15 155 8294400
100978246 kagu B Dec. 11, 2020, 11:20 p.m. OK PyPy 2 TESTS 15 421 32358400
100978165 kagu B Dec. 11, 2020, 11:15 p.m. OK PyPy 2 TESTS 15 421 35328000
100978281 kagu B Dec. 11, 2020, 11:22 p.m. OK PyPy 2 TESTS 15 436 32358400
100977929 kagu B Dec. 11, 2020, 11:01 p.m. OK PyPy 2 TESTS 15 483 24780800
100977851 kagu B Dec. 11, 2020, 10:56 p.m. OK PyPy 2 TESTS 15 498 24576000
100956358 kagu B Dec. 11, 2020, 4:32 p.m. OK PyPy 2 TESTS 15 545 24064000
100978359 lucifer1004 B Dec. 11, 2020, 11:27 p.m. OK PyPy 3 TESTS 15 186 4096000
100971954 Gemini7 B Dec. 11, 2020, 7:48 p.m. OK PyPy 3 TESTS 15 186 4198400
100980899 mooyeon B Dec. 12, 2020, 1:49 a.m. OK PyPy 3 TESTS 15 186 4710400
100983393 Rao_Nishant B Dec. 12, 2020, 3:22 a.m. OK PyPy 3 TESTS 15 186 9113600
100972083 Gemini7 B Dec. 11, 2020, 7:51 p.m. OK PyPy 3 TESTS 15 187 3993600
100947597 sahilrox B Dec. 11, 2020, 4:02 p.m. OK PyPy 3 TESTS 15 187 4300800
100972001 Gemini7 B Dec. 11, 2020, 7:49 p.m. OK PyPy 3 TESTS 15 202 4403200
100989507 safal.gupta001 B Dec. 12, 2020, 5:55 a.m. OK PyPy 3 TESTS 15 202 6553600
100989191 safal.gupta001 B Dec. 12, 2020, 5:49 a.m. OK PyPy 3 TESTS 15 202 6553600
100947102 Achilles221B B Dec. 11, 2020, 4:01 p.m. OK PyPy 3 TESTS 15 202 7987200
100977364 ComptineDunAutreEte B Dec. 11, 2020, 10:31 p.m. OK Python 2 TESTS 15 951 1740800
100962260 eugalt B Dec. 11, 2020, 5:27 p.m. OK Python 3 TESTS 15 218 614400
100961765 eugalt B Dec. 11, 2020, 5:22 p.m. OK Python 3 TESTS 15 233 614400
100959712 eugalt B Dec. 11, 2020, 5:06 p.m. OK Python 3 TESTS 15 233 614400
100960670 eugalt B Dec. 11, 2020, 5:13 p.m. OK Python 3 TESTS 15 234 614400
100961366 eugalt B Dec. 11, 2020, 5:19 p.m. OK Python 3 TESTS 15 249 614400
100989386 thelearner79 B Dec. 12, 2020, 5:53 a.m. OK Python 3 TESTS 15 358 2969600
100947981 demony B Dec. 11, 2020, 4:04 p.m. OK Python 3 TESTS 15 467 3276800
100966199 fork52 B Dec. 11, 2020, 6:14 p.m. OK Python 3 TESTS 15 483 1945600
100966804 tan_dew B Dec. 11, 2020, 6:22 p.m. OK Python 3 TESTS 15 514 2048000
100970936 tan_dew B Dec. 11, 2020, 7:28 p.m. OK Python 3 TESTS 15 529 2048000
100984746 freshnewname B Dec. 12, 2020, 4:05 a.m. OK Rust TESTS 15 78 1228800
100984509 freshnewname B Dec. 12, 2020, 3:58 a.m. OK Rust TESTS 15 109 1945600

remove filters

Back to search problems