Codeforces Round 990 (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
2047 Codeforces Round 990 (Div. 2) FINISHED False 7200 43198523 Dec. 3, 2024, 6:25 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 17801 ) A Alyona and a Square Jigsaw Puzzle PROGRAMMING implementation math

Alyona assembles an unusual square Jigsaw Puzzle. She does so in (n) days in the following manner: On the first day, she starts by placing the central piece in the center of the table. On each day after the first one, she places a certain number of pieces around the central piece in clockwise order, always finishing each square layer completely before starting a new one. For example, she places the first (14) pieces in the following order: Alyona is happy if at the end of the day the assembled part of the puzzle does not have any started but unfinished layers. Given the number of pieces she assembles on each day, find the number of days Alyona is happy on. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 500)). The description of the test cases follows. The first line contains a single integer (n) ((1 \le n \le 100)), the number of days. The second line contains (n) integers (a_1, a_2, \ldots, a_n) ((1 \le a_i \le 100), (a_1 = 1)), where (a_i) is the number of pieces Alyona assembles on the (i)-th day. It is guaranteed in each test case that at the end of the (n) days, there are no unfinished layers. For each test case, print a single integer: the number of days when Alyona is happy. In the first test case, in the only day Alyona finishes the only layer. In the second test case, on the first day, Alyona finishes the first layer, and on the second day, she finishes the second layer. In the third test case, she finishes the second layer in a few days. In the fourth test case, she finishes the second layer and immediately starts the next one on the same day, therefore, she is not happy on that day. She is only happy on the first and last days. In the fifth test case, Alyona is happy on the first, fourth, and last days.

Tutorials

Разбор Codeforces Round 990 (Div. 2 + Div. 1)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
294661127 petrenslavik A Dec. 3, 2024, 4:56 p.m. OK C# 10 TESTS 4 77 2662400
294643045 Ahb_arif A Dec. 3, 2024, 3:02 p.m. OK C# 10 TESTS 4 92 3072000
294635700 Ahb_arif A Dec. 3, 2024, 2:20 p.m. OK C# 10 TESTS 4 109 3072000
294609158 _Equinox A Dec. 3, 2024, 11:55 a.m. OK C# 10 TESTS 4 186 8908800
294616320 _AVENGER_ A Dec. 3, 2024, 12:34 p.m. OK C++17 (GCC 7-32) TESTS 4 30 0
294665452 nadeem_br A Dec. 3, 2024, 5:26 p.m. OK C++17 (GCC 7-32) TESTS 4 30 16076800
294625088 hhhhhh11 A Dec. 3, 2024, 1:22 p.m. OK C++17 (GCC 7-32) TESTS 4 31 0
294633515 SouhailMightWin A Dec. 3, 2024, 2:08 p.m. OK C++17 (GCC 7-32) TESTS 4 31 0
294628962 LZslime A Dec. 3, 2024, 1:43 p.m. OK C++17 (GCC 7-32) TESTS 4 31 0
294685121 muhammad_jarjoumi A Dec. 3, 2024, 8:13 p.m. OK C++17 (GCC 7-32) TESTS 4 31 0
294654475 _Dhumketu_ A Dec. 3, 2024, 4:13 p.m. OK C++17 (GCC 7-32) TESTS 4 31 0
294647534 __aniket A Dec. 3, 2024, 3:30 p.m. OK C++17 (GCC 7-32) TESTS 4 31 0
294643012 Caraxes50 A Dec. 3, 2024, 3:02 p.m. OK C++17 (GCC 7-32) TESTS 4 31 0
294638898 Actium A Dec. 3, 2024, 2:38 p.m. OK C++17 (GCC 7-32) TESTS 4 31 0
294623535 Shay_Blaban A Dec. 3, 2024, 1:14 p.m. OK C++20 (GCC 13-64) TESTS 4 30 0
294693135 hagertaher1 A Dec. 3, 2024, 9:52 p.m. OK C++20 (GCC 13-64) TESTS 4 30 0
294699780 NeIsenn A Dec. 4, 2024, 12:40 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
294699659 TheDuskBreeze A Dec. 4, 2024, 12:36 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
294695631 vitorfariaa A Dec. 3, 2024, 10:46 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
294659059 s.i.snajmulhuda2002 A Dec. 3, 2024, 4:43 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
294658374 puniTT A Dec. 3, 2024, 4:38 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
294651729 mahmoudaziz000 A Dec. 3, 2024, 3:56 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
294640803 atishkumar6115 A Dec. 3, 2024, 2:49 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
294639816 BhairabGorai A Dec. 3, 2024, 2:43 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
294639391 _LP_ A Dec. 3, 2024, 2:41 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 30 0
294611986 ghassanhasan A Dec. 3, 2024, 12:11 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 30 102400
294607989 shiinamashiro_ A Dec. 3, 2024, 11:48 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 0
294654243 outlast_NATE A Dec. 3, 2024, 4:12 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 0
294609516 kp_s33 A Dec. 3, 2024, 11:57 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 0
294659924 orztanangkad A Dec. 3, 2024, 4:49 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 102400
294717749 uvwxz A Dec. 4, 2024, 5:25 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 46 0
294718827 kunal0612 A Dec. 4, 2024, 5:38 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 46 0
294717970 gouravpanseja25 A Dec. 4, 2024, 5:27 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 46 0
294721194 xinhuo A Dec. 4, 2024, 6:05 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 46 0
294635378 arpit45_8 A Dec. 3, 2024, 2:18 p.m. OK GNU C11 TESTS 4 46 0
294642571 shikhar789 A Dec. 3, 2024, 2:59 p.m. OK GNU C11 TESTS 4 46 0
294636238 Naikousei A Dec. 3, 2024, 2:23 p.m. OK GNU C11 TESTS 4 46 102400
294578063 mantakamahir A Dec. 3, 2024, 8:02 a.m. OK GNU C11 TESTS 4 46 102400
294583387 rakibfrags A Dec. 3, 2024, 8:19 a.m. OK GNU C11 TESTS 4 46 102400
294575567 249074471 A Dec. 3, 2024, 7:54 a.m. OK GNU C11 TESTS 4 62 0
294633837 atharvatol04 A Dec. 3, 2024, 2:10 p.m. OK GNU C11 TESTS 4 62 0
294627132 noint A Dec. 3, 2024, 1:33 p.m. OK GNU C11 TESTS 4 62 0
294577786 Monstiez A Dec. 3, 2024, 8:01 a.m. OK GNU C11 TESTS 4 62 102400
294635826 Naikousei A Dec. 3, 2024, 2:21 p.m. OK GNU C11 TESTS 4 62 102400
294716605 botayhard A Dec. 4, 2024, 5:10 a.m. OK Go TESTS 4 46 5632000
294611954 obsthandler A Dec. 3, 2024, 12:11 p.m. OK Go TESTS 4 171 2969600
294607495 amit_roy A Dec. 3, 2024, 11:45 a.m. OK Java 21 TESTS 4 218 0
294638316 venkatesh7779 A Dec. 3, 2024, 2:35 p.m. OK Java 21 TESTS 4 218 307200
294575046 ayush_dixit_iit_bhu A Dec. 3, 2024, 7:53 a.m. OK Java 21 TESTS 4 218 1126400
294669405 params19 A Dec. 3, 2024, 5:52 p.m. OK Java 21 TESTS 4 233 409600
294675733 params19 A Dec. 3, 2024, 6:40 p.m. OK Java 21 TESTS 4 234 0
294652150 yashvardhan3 A Dec. 3, 2024, 3:59 p.m. OK Java 21 TESTS 4 234 0
294715951 vinayak_20 A Dec. 4, 2024, 5:01 a.m. OK Java 21 TESTS 4 234 204800
294606807 prohladenn_vko A Dec. 3, 2024, 11:41 a.m. OK Java 21 TESTS 4 234 716800
294675489 arnabmanna A Dec. 3, 2024, 6:37 p.m. OK Java 21 TESTS 4 249 614400
294659302 Rudra452 A Dec. 3, 2024, 4:45 p.m. OK Java 21 TESTS 4 249 819200
294585265 seom98 A Dec. 3, 2024, 8:24 a.m. OK Java 8 TESTS 4 139 0
294643232 Ovetsar_ilish A Dec. 3, 2024, 3:03 p.m. OK Java 8 TESTS 4 171 0
294718766 achyut88 A Dec. 4, 2024, 5:37 a.m. OK Java 8 TESTS 4 202 0
294656277 Shitij123 A Dec. 3, 2024, 4:25 p.m. OK Java 8 TESTS 4 202 0
294577850 Saini_30 A Dec. 3, 2024, 8:01 a.m. OK Java 8 TESTS 4 217 0
294642981 appsecure A Dec. 3, 2024, 3:02 p.m. OK Java 8 TESTS 4 218 0
294624322 Soumadip_Mishra A Dec. 3, 2024, 1:19 p.m. OK Java 8 TESTS 4 218 0
294583063 YuxinZhao12138 A Dec. 3, 2024, 8:18 a.m. OK Java 8 TESTS 4 218 0
294610201 km_is_here A Dec. 3, 2024, 12:01 p.m. OK Java 8 TESTS 4 483 38707200
294625072 dumb4coding A Dec. 3, 2024, 1:22 p.m. OK PyPy 3 TESTS 4 156 4710400
294656028 YuraK A Dec. 3, 2024, 4:23 p.m. OK PyPy 3 TESTS 4 171 3584000
294681736 bepbop A Dec. 3, 2024, 7:39 p.m. OK PyPy 3 TESTS 4 171 4608000
294650292 anry09 A Dec. 3, 2024, 3:48 p.m. OK PyPy 3 TESTS 4 171 4608000
294684981 codeyogi73 A Dec. 3, 2024, 8:12 p.m. OK PyPy 3 TESTS 4 171 4710400
294608404 patilpiyush210 A Dec. 3, 2024, 11:50 a.m. OK PyPy 3 TESTS 4 171 4915200
294675816 rmr A Dec. 3, 2024, 6:40 p.m. OK PyPy 3-64 TESTS 4 77 2355200
294694997 cp_hater A Dec. 3, 2024, 10:31 p.m. OK PyPy 3-64 TESTS 4 78 2355200
294665289 jvatsal0709 A Dec. 3, 2024, 5:25 p.m. OK PyPy 3-64 TESTS 4 92 2252800
294671349 gardengnome A Dec. 3, 2024, 6:05 p.m. OK PyPy 3-64 TESTS 4 93 1740800
294615096 Anav_Agrawal A Dec. 3, 2024, 12:28 p.m. OK PyPy 3-64 TESTS 4 93 2355200
294663576 MassimoG A Dec. 3, 2024, 5:13 p.m. OK PyPy 3-64 TESTS 4 93 2457600
294639614 YhuanDebeste A Dec. 3, 2024, 2:42 p.m. OK PyPy 3-64 TESTS 4 108 2048000
294694142 Shu.Rong A Dec. 3, 2024, 10:12 p.m. OK PyPy 3-64 TESTS 4 108 2252800
294580722 Msol A Dec. 3, 2024, 8:10 a.m. OK PyPy 3-64 TESTS 4 108 2457600
294608823 nori30 A Dec. 3, 2024, 11:53 a.m. OK PyPy 3-64 TESTS 4 108 2867200
294663289 eugalt A Dec. 3, 2024, 5:11 p.m. OK Python 3 TESTS 4 62 0
294663033 eugalt A Dec. 3, 2024, 5:10 p.m. OK Python 3 TESTS 4 62 0
294617185 ZapLucky A Dec. 3, 2024, 12:39 p.m. OK Python 3 TESTS 4 62 0
294714340 kishore29 A Dec. 4, 2024, 4:37 a.m. OK Python 3 TESTS 4 77 0
294709547 linh_n A Dec. 4, 2024, 3:19 a.m. OK Python 3 TESTS 4 77 0
294709020 tgfgvfbvd A Dec. 4, 2024, 3:09 a.m. OK Python 3 TESTS 4 77 0
294696505 kramprasad1109 A Dec. 3, 2024, 11:07 p.m. OK Python 3 TESTS 4 77 0
294648473 Rohidul A Dec. 3, 2024, 3:36 p.m. OK Python 3 TESTS 4 77 0
294646085 eugalt A Dec. 3, 2024, 3:21 p.m. OK Python 3 TESTS 4 77 0
294635671 VaibhavVarshney A Dec. 3, 2024, 2:20 p.m. OK Python 3 TESTS 4 77 0
294655733 YhuanDebeste A Dec. 3, 2024, 4:22 p.m. OK Ruby 3 TESTS 4 234 409600
294655539 YhuanDebeste A Dec. 3, 2024, 4:20 p.m. OK Ruby 3 TESTS 4 264 512000
294693300 eugalt A Dec. 3, 2024, 9:55 p.m. OK Ruby 3 TESTS 4 265 204800
294655054 YhuanDebeste A Dec. 3, 2024, 4:17 p.m. OK Ruby 3 TESTS 4 312 409600
294653963 YhuanDebeste A Dec. 3, 2024, 4:10 p.m. OK Ruby 3 TESTS 4 328 307200
294653804 YhuanDebeste A Dec. 3, 2024, 4:09 p.m. OK Ruby 3 TESTS 4 405 409600
294699395 Saat A Dec. 4, 2024, 12:27 a.m. OK Rust 2021 TESTS 4 46 102400
294684236 0x81 A Dec. 3, 2024, 8:04 p.m. OK Rust 2021 TESTS 4 62 0

remove filters

Back to search problems