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 |
---|---|---|---|---|---|---|
1829 | Codeforces Round 871 (Div. 4) | FINISHED | False | 8100 | 53796263 | May 6, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 11091 ) | G | Hits Different | PROGRAMMING | data structures dp implementation math | 1600 |
B"In a carnival game, there is a huge pyramid of cans with 2023 rows, numbered in a regular pattern as shown. If can 9^2 is hit initially, then all cans colored red in the picture above would fall. You throw a ball at the pyramid, and it hits a single can with number n^2 . This causes all cans that are stacked on top of this can to fall (that is, can n^2 falls, then the cans directly above n^2 fall, then the cans directly above those cans, and so on). For example, the picture above shows the cans that would fall if can 9^2 is hit. What is the sum of the numbers on all cans that fall? Recall that n^2 = n x n . The first line contains an integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The only line of each test case contains a single integer n ( 1 <= q n <= q 10^6 ) -- it means that the can you hit has label n^2 . For each test case, output a single integer -- the sum of the numbers on all cans that fall. Please note, that the answer for some test cases won't fit into 32-bit integer type, so you should use at least 64-bit integer type in your programming language (like long long for C++). For all valid inputs, the answer will always fit into 64-bit integer type. The first test case is pictured in the statement. The sum of the numbers that fall is 1^2 + 2^2 + 3^2 + 5^2 + 6^2 + 9^2 = 1 + 4 + 9 + 25 + 36 + 81 = 156. In the second test case, only the can labeled 1^2 falls, so the answer is 1^2=1 . In the third test case, the cans labeled 1^2 and 2^2 fall, so the answer is 1^2+2^2=1+4=5 . In the fourth test case, the cans labeled 1^2 and 3^2 fall, so the answer is 1^2+3^2=1+9=10 . In the fifth test case, the cans labeled 1^2 , 2^2 , and 4^2 fall, so the answer is 1^2+2^2+4^2=1+4+16=21 . "... |
Codeforces Round 871 (Div. 4) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
205805349 | vjudge3 | G | May 14, 2023, 8:21 a.m. | OK | Clang++20 Diagnostics | TESTS | 16 | 171 | 97177600 | 1600 | |
206043670 | lream2 | G | May 16, 2023, 3:54 a.m. | OK | GNU C11 | TESTS | 16 | 46 | 32870400 | 1600 | |
206335275 | New_beginner | G | May 18, 2023, 11:53 a.m. | OK | GNU C++14 | TESTS | 16 | 30 | 33689600 | 1600 | |
206429617 | Ludissey | G | May 19, 2023, 9:43 a.m. | OK | GNU C++14 | TESTS | 16 | 31 | 7987200 | 1600 | |
206414309 | nyhuang | G | May 19, 2023, 7:11 a.m. | OK | GNU C++14 | TESTS | 16 | 31 | 7987200 | 1600 | |
206366858 | Sasidhar3159 | G | May 18, 2023, 4:48 p.m. | OK | GNU C++14 | TESTS | 16 | 31 | 7987200 | 1600 | |
206321644 | cperkkk | G | May 18, 2023, 9:44 a.m. | OK | GNU C++14 | TESTS | 16 | 31 | 7987200 | 1600 | |
206223888 | yingjiayu | G | May 17, 2023, 2:39 p.m. | OK | GNU C++14 | TESTS | 16 | 31 | 7987200 | 1600 | |
206192415 | djwcbac | G | May 17, 2023, 9:40 a.m. | OK | GNU C++14 | TESTS | 16 | 31 | 7987200 | 1600 | |
205788413 | zhicheng | G | May 14, 2023, 5:51 a.m. | OK | GNU C++14 | TESTS | 16 | 31 | 7987200 | 1600 | |
205788320 | zhicheng | G | May 14, 2023, 5:50 a.m. | OK | GNU C++14 | TESTS | 16 | 31 | 7987200 | 1600 | |
206443992 | -Potential | G | May 19, 2023, 12:14 p.m. | OK | GNU C++14 | TESTS | 16 | 31 | 7987200 | 1600 | |
206078842 | MADHAV_GOEL | G | May 16, 2023, 11:20 a.m. | OK | GNU C++17 | TESTS | 16 | 30 | 7987200 | 1600 | |
205725626 | bailanxiaobailv | G | May 13, 2023, 1:45 p.m. | OK | GNU C++17 | TESTS | 16 | 30 | 7987200 | 1600 | |
205720514 | sanidhyakr18 | G | May 13, 2023, 12:58 p.m. | OK | GNU C++17 | TESTS | 16 | 30 | 7987200 | 1600 | |
205545484 | ABHIJEET_1125 | G | May 12, 2023, 2:05 p.m. | OK | GNU C++17 | TESTS | 16 | 30 | 7987200 | 1600 | |
206422333 | damageerror | G | May 19, 2023, 8:35 a.m. | OK | GNU C++17 | TESTS | 16 | 30 | 7987200 | 1600 | |
206220059 | tllwtg | G | May 17, 2023, 2:01 p.m. | OK | GNU C++17 | TESTS | 16 | 30 | 8089600 | 1600 | |
206322010 | _gxh | G | May 18, 2023, 9:47 a.m. | OK | GNU C++17 | TESTS | 16 | 30 | 32460800 | 1600 | |
205641487 | _cereal_killer_ | G | May 12, 2023, 7:36 p.m. | OK | GNU C++17 | TESTS | 16 | 30 | 32768000 | 1600 | |
205709587 | MW2 | G | May 13, 2023, 11:14 a.m. | OK | GNU C++17 | TESTS | 16 | 30 | 34099200 | 1600 | |
205953813 | MrLinYin | G | May 15, 2023, 7:47 a.m. | OK | GNU C++17 | TESTS | 16 | 30 | 35328000 | 1600 | |
205680629 | semicolonised | G | May 13, 2023, 6:46 a.m. | OK | GNU C++17 (64) | TESTS | 16 | 15 | 0 | 1600 | |
206364386 | erfanul007 | G | May 18, 2023, 4:22 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 15 | 0 | 1600 | |
205693891 | luogu_bot5 | G | May 13, 2023, 8:42 a.m. | OK | GNU C++17 (64) | TESTS | 16 | 30 | 32051200 | 1600 | |
206013662 | soum1313 | G | May 15, 2023, 5:21 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 30 | 34099200 | 1600 | |
206301281 | Dsuk3 | G | May 18, 2023, 5:54 a.m. | OK | GNU C++17 (64) | TESTS | 16 | 30 | 34099200 | 1600 | |
206381648 | mircea_007 | G | May 18, 2023, 7:32 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 31 | 0 | 1600 | |
206161007 | OTTFF | G | May 16, 2023, 11:43 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 31 | 0 | 1600 | |
205707526 | Thivesh | G | May 13, 2023, 10:53 a.m. | OK | GNU C++17 (64) | TESTS | 16 | 31 | 0 | 1600 | |
206382143 | gets007 | G | May 18, 2023, 7:40 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 31 | 0 | 1600 | |
206363998 | erfanul007 | G | May 18, 2023, 4:17 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 31 | 7987200 | 1600 | |
206346974 | tushar_joshi | G | May 18, 2023, 1:41 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 15 | 0 | 1600 | |
206338311 | jd_samurai | G | May 18, 2023, 12:20 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 15 | 0 | 1600 | |
206037894 | Emotiona | G | May 16, 2023, 1:30 a.m. | OK | GNU C++20 (64) | TESTS | 16 | 15 | 0 | 1600 | |
205779018 | s3n | G | May 14, 2023, 3:20 a.m. | OK | GNU C++20 (64) | TESTS | 16 | 15 | 0 | 1600 | |
206408909 | hkonvict | G | May 19, 2023, 6:04 a.m. | OK | GNU C++20 (64) | TESTS | 16 | 15 | 0 | 1600 | |
205628344 | Can4k | G | May 12, 2023, 5:39 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 15 | 0 | 1600 | |
205605815 | just3500code | G | May 12, 2023, 4:06 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 15 | 0 | 1600 | |
205706081 | zhtt0 | G | May 13, 2023, 10:40 a.m. | OK | GNU C++20 (64) | TESTS | 16 | 15 | 0 | 1600 | |
206293425 | notcryan | G | May 18, 2023, 3:28 a.m. | OK | GNU C++20 (64) | TESTS | 16 | 15 | 102400 | 1600 | |
206400339 | Md_Masaud_Hasan | G | May 19, 2023, 3:38 a.m. | OK | GNU C++20 (64) | TESTS | 16 | 15 | 7987200 | 1600 | |
206370495 | js2585 | G | May 18, 2023, 5:26 p.m. | OK | Java 11 | TESTS | 16 | 218 | 7680000 | 1600 | |
205695962 | autra_weiliu | G | May 13, 2023, 8:59 a.m. | OK | Java 11 | TESTS | 16 | 265 | 0 | 1600 | |
206039317 | djrfrn | G | May 16, 2023, 2:13 a.m. | OK | Java 11 | TESTS | 16 | 452 | 15257600 | 1600 | |
206456293 | kocko | G | May 19, 2023, 2:18 p.m. | OK | Java 11 | TESTS | 16 | 1029 | 242995200 | 1600 | |
205932897 | mcrash12 | G | May 15, 2023, 1:56 a.m. | OK | Java 17 | TESTS | 16 | 264 | 41472000 | 1600 | |
206294190 | rorito_199 | G | May 18, 2023, 3:44 a.m. | OK | Java 17 | TESTS | 16 | 405 | 46387200 | 1600 | |
205990623 | rajashish914 | G | May 15, 2023, 1:33 p.m. | OK | Java 17 | TESTS | 16 | 966 | 41267200 | 1600 | |
206327036 | index_ | G | May 18, 2023, 10:39 a.m. | OK | Java 17 | TESTS | 16 | 998 | 146636800 | 1600 | |
206368670 | vipulm7 | G | May 18, 2023, 5:08 p.m. | OK | Java 8 | TESTS | 16 | 124 | 4710400 | 1600 | |
206274529 | stolis | G | May 17, 2023, 6:52 p.m. | OK | Java 8 | TESTS | 16 | 171 | 0 | 1600 | |
205527903 | SlavaG | G | May 12, 2023, 11:15 a.m. | OK | Kotlin 1.7 | TESTS | 16 | 436 | 109875200 | 1600 | |
206437049 | Gadi | G | May 19, 2023, 11:03 a.m. | OK | MS C++ 2017 | TESTS | 16 | 30 | 7987200 | 1600 | |
205709305 | lol_py | G | May 13, 2023, 11:11 a.m. | OK | PyPy 3 | TESTS | 16 | 685 | 90624000 | 1600 | |
205730259 | sddddd6 | G | May 13, 2023, 2:34 p.m. | OK | PyPy 3 | TESTS | 16 | 998 | 71168000 | 1600 | |
206393062 | Liberator187 | G | May 19, 2023, 12:27 a.m. | OK | PyPy 3 | TESTS | 16 | 1278 | 11161600 | 1600 | |
206315914 | soudhamini_2000031088 | G | May 18, 2023, 8:46 a.m. | OK | PyPy 3 | TESTS | 16 | 1621 | 128307200 | 1600 | |
205877166 | Gollansky01 | G | May 14, 2023, 3:21 p.m. | OK | PyPy 3 | TESTS | 16 | 1715 | 153292800 | 1600 | |
205710343 | yjsl1025 | G | May 13, 2023, 11:22 a.m. | OK | PyPy 3 | TESTS | 16 | 1840 | 234188800 | 1600 | |
206443000 | 2100030666.cseh | G | May 19, 2023, 12:04 p.m. | OK | PyPy 3-64 | TESTS | 16 | 140 | 39116800 | 1600 | |
206419266 | abhinav.iitd205 | G | May 19, 2023, 8:04 a.m. | OK | PyPy 3-64 | TESTS | 16 | 155 | 28467200 | 1600 | |
205945418 | Karthik1106 | G | May 15, 2023, 5:54 a.m. | OK | PyPy 3-64 | TESTS | 16 | 155 | 39116800 | 1600 | |
206356983 | Sam_Jiang | G | May 18, 2023, 3:11 p.m. | OK | PyPy 3-64 | TESTS | 16 | 171 | 9216000 | 1600 | |
206318161 | 2000031264 | G | May 18, 2023, 9:09 a.m. | OK | PyPy 3-64 | TESTS | 16 | 171 | 39116800 | 1600 | |
206255388 | lalith_6055 | G | May 17, 2023, 5:24 p.m. | OK | PyPy 3-64 | TESTS | 16 | 171 | 39116800 | 1600 | |
206223402 | 2000030958 | G | May 17, 2023, 2:33 p.m. | OK | PyPy 3-64 | TESTS | 16 | 171 | 39116800 | 1600 | |
206068840 | 2000030996-akanksha | G | May 16, 2023, 9:36 a.m. | OK | PyPy 3-64 | TESTS | 16 | 171 | 55705600 | 1600 | |
206403554 | Shri_874 | G | May 19, 2023, 4:39 a.m. | OK | PyPy 3-64 | TESTS | 16 | 186 | 26521600 | 1600 | |
206062216 | AyuAnchor | G | May 16, 2023, 8:24 a.m. | OK | PyPy 3-64 | TESTS | 16 | 218 | 24576000 | 1600 | |
206130716 | fridalex007 | G | May 16, 2023, 3:58 p.m. | OK | Python 3 | TESTS | 16 | 780 | 66969600 | 1600 | |
205729913 | sddddd6 | G | May 13, 2023, 2:31 p.m. | OK | Python 3 | TESTS | 16 | 1013 | 49971200 | 1600 | |
205547281 | Laasyak | G | May 12, 2023, 2:22 p.m. | OK | Python 3 | TESTS | 16 | 1029 | 89907200 | 1600 | |
206300085 | Manikya_0309 | G | May 18, 2023, 5:36 a.m. | OK | Python 3 | TESTS | 16 | 1060 | 89907200 | 1600 | |
205939309 | neerajam | G | May 15, 2023, 4:12 a.m. | OK | Python 3 | TESTS | 16 | 1060 | 89907200 | 1600 | |
205842401 | srinija_chowdary9 | G | May 14, 2023, 2:30 p.m. | OK | Python 3 | TESTS | 16 | 1060 | 89907200 | 1600 | |
206156785 | ProgrammerAllen | G | May 16, 2023, 9:25 p.m. | OK | Python 3 | TESTS | 16 | 1263 | 119500800 | 1600 | |
206171216 | Waiting | G | May 17, 2023, 4:49 a.m. | OK | Python 3 | TESTS | 16 | 1419 | 98406400 | 1600 | |
205633986 | sohamm20 | G | May 12, 2023, 6:24 p.m. | OK | Python 3 | TESTS | 16 | 2323 | 128512000 | 1600 | |
205528739 | b_a_d_m_a_n | G | May 12, 2023, 11:25 a.m. | OK | Rust 2021 | TESTS | 16 | 31 | 33689600 | 1600 |
Back to search problems