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 |
---|---|---|---|---|---|---|
1471 | Codeforces Round 694 (Div. 2) | FINISHED | False | 7200 | 121965899 | Jan. 5, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 19388 ) | B | Strange List | PROGRAMMING | brute force greedy implementation math |
B'You have given an array a of length n and an integer x to a brand new robot. What the robot does is the following: it iterates over the elements of the array, let the current element be q . If q is divisible by x , the robot adds x copies of the integer frac{q}{x} to the end of the array, and moves on to the next element. Note that the newly added elements could be processed by the robot later. Otherwise, if q is not divisible by x , the robot shuts down. Please determine the sum of all values of the array at the end of the process. The first input line contains a single integer t ( 1 <= q t <= q 100 ) -- the number of test cases. The first line of each test case contains two integers n and x ( 1 <= q n <= q 10^5 , 2 <= q x <= q 10^9 ) -- the length of the array and the value which is used by the robot. The next line contains integers a_1 , a_2 , ..., a_n ( 1 <= q a_i <= q 10^9 ) -- the initial values in the array. It is guaranteed that the sum of values n over all test cases does not exceed 10^5 . For each test case output one integer -- the sum of all elements at the end of the process. In the first test case the array initially consists of a single element [12] , and x=2 . After the robot processes the first element, the array becomes [12, 6, 6] . Then the robot processes the second element, and the array becomes [12, 6, 6, 3, 3] . After the robot processes the next element, the array becomes [12, 6, 6, 3, 3, 3, 3] , and then the robot shuts down, since it encounters an element that is not divisible by x = 2 . The sum of the elements in the resulting array is equal to 36 . In the second test case the array initially contains integers [4, 6, 8, 2] , and x=2 . The resulting array in this case looks like [4, 6, 8, 2, 2, 2, 3, 3, 4, 4, 1, 1, 1, 1, 1, 1] . '... |
Codeforces Round #694 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
103467985 | ruban | B | Jan. 5, 2021, 6:04 p.m. | OK | Delphi | TESTS | 25 | 124 | 56934400 | ||
103497745 | UpCybertron_06 | B | Jan. 6, 2021, 3:43 a.m. | OK | GNU C11 | TESTS | 25 | 61 | 819200 | ||
103456142 | Shamik_Shafkat_Avro | B | Jan. 5, 2021, 4:24 p.m. | OK | GNU C11 | TESTS | 25 | 61 | 819200 | ||
103492213 | nowifly | B | Jan. 6, 2021, 1:35 a.m. | OK | GNU C11 | TESTS | 25 | 62 | 819200 | ||
103458686 | Shadhin08 | B | Jan. 5, 2021, 4:30 p.m. | OK | GNU C11 | TESTS | 25 | 78 | 819200 | ||
103470246 | _Matrice | B | Jan. 5, 2021, 6:23 p.m. | OK | GNU C11 | TESTS | 25 | 78 | 1638400 | ||
103466623 | Arie123777 | B | Jan. 5, 2021, 5:55 p.m. | OK | GNU C11 | TESTS | 25 | 78 | 3174400 | ||
103472859 | Darkened_Sky | B | Jan. 5, 2021, 6:50 p.m. | OK | GNU C11 | TESTS | 25 | 280 | 819200 | ||
103497556 | wakaka123411 | B | Jan. 6, 2021, 3:40 a.m. | OK | GNU C++11 | TESTS | 25 | 46 | 819200 | ||
103489367 | wsyhb | B | Jan. 6, 2021, 12:11 a.m. | OK | GNU C++11 | TESTS | 25 | 46 | 921600 | ||
103489826 | 2020gangbazi | B | Jan. 6, 2021, 12:27 a.m. | OK | GNU C++11 | TESTS | 25 | 46 | 7987200 | ||
103489418 | william555 | B | Jan. 6, 2021, 12:12 a.m. | OK | GNU C++11 | TESTS | 25 | 46 | 40140800 | ||
103491792 | Echoyyy | B | Jan. 6, 2021, 1:25 a.m. | OK | GNU C++11 | TESTS | 25 | 46 | 80179200 | ||
103497074 | Leaving_ | B | Jan. 6, 2021, 3:30 a.m. | OK | GNU C++11 | TESTS | 25 | 61 | 614400 | ||
103503614 | GSHgsh | B | Jan. 6, 2021, 5:20 a.m. | OK | GNU C++11 | TESTS | 25 | 61 | 819200 | ||
103498898 | vectorwyx | B | Jan. 6, 2021, 4:05 a.m. | OK | GNU C++11 | TESTS | 25 | 61 | 819200 | ||
103500539 | starlightlmy | B | Jan. 6, 2021, 4:33 a.m. | OK | GNU C++11 | TESTS | 25 | 62 | 204800 | ||
103496021 | iterater | B | Jan. 6, 2021, 3:08 a.m. | OK | GNU C++11 | TESTS | 25 | 62 | 409600 | ||
103493917 | OmPrakash12 | B | Jan. 6, 2021, 2:19 a.m. | OK | GNU C++14 | TESTS | 25 | 61 | 819200 | ||
103504119 | code.till.pro | B | Jan. 6, 2021, 5:27 a.m. | OK | GNU C++14 | TESTS | 25 | 61 | 819200 | ||
103503542 | marcOS | B | Jan. 6, 2021, 5:19 a.m. | OK | GNU C++14 | TESTS | 25 | 62 | 409600 | ||
103488194 | snatch123 | B | Jan. 5, 2021, 11:33 p.m. | OK | GNU C++14 | TESTS | 25 | 62 | 409600 | ||
103483980 | LIL_CAPALOT | B | Jan. 5, 2021, 9:36 p.m. | OK | GNU C++14 | TESTS | 25 | 62 | 819200 | ||
103497630 | Wayne_nitdgp | B | Jan. 6, 2021, 3:41 a.m. | OK | GNU C++14 | TESTS | 25 | 62 | 819200 | ||
103502960 | Navneet522 | B | Jan. 6, 2021, 5:11 a.m. | OK | GNU C++14 | TESTS | 25 | 62 | 819200 | ||
103503085 | aaditya07 | B | Jan. 6, 2021, 5:12 a.m. | OK | GNU C++14 | TESTS | 25 | 62 | 819200 | ||
103506549 | DEmmaRL | B | Jan. 6, 2021, 6 a.m. | OK | GNU C++14 | TESTS | 25 | 62 | 819200 | ||
103475834 | Single_Ready_To_Mingle | B | Jan. 5, 2021, 7:21 p.m. | OK | GNU C++14 | TESTS | 25 | 62 | 819200 | ||
103493300 | Muphy | B | Jan. 6, 2021, 2:03 a.m. | OK | GNU C++17 | TESTS | 25 | 46 | 819200 | ||
103494512 | dddddj | B | Jan. 6, 2021, 2:35 a.m. | OK | GNU C++17 | TESTS | 25 | 46 | 1024000 | ||
103465616 | tekinas | B | Jan. 5, 2021, 5:49 p.m. | OK | GNU C++17 | TESTS | 25 | 46 | 1126400 | ||
103485978 | mvmvmva | B | Jan. 5, 2021, 10:27 p.m. | OK | GNU C++17 | TESTS | 25 | 46 | 6348800 | ||
103500434 | Sajjat004 | B | Jan. 6, 2021, 4:31 a.m. | OK | GNU C++17 | TESTS | 25 | 61 | 819200 | ||
103470756 | mayank558 | B | Jan. 5, 2021, 6:27 p.m. | OK | GNU C++17 | TESTS | 25 | 61 | 819200 | ||
103501341 | Fau818 | B | Jan. 6, 2021, 4:46 a.m. | OK | GNU C++17 | TESTS | 25 | 61 | 1024000 | ||
103481135 | khealer | B | Jan. 5, 2021, 8:39 p.m. | OK | GNU C++17 | TESTS | 25 | 61 | 1024000 | ||
103469833 | czhang2718 | B | Jan. 5, 2021, 6:19 p.m. | OK | GNU C++17 | TESTS | 25 | 61 | 1126400 | ||
103500253 | prodipto0 | B | Jan. 6, 2021, 4:28 a.m. | OK | GNU C++17 | TESTS | 25 | 61 | 7372800 | ||
103488925 | Foundnt_Alice | B | Jan. 5, 2021, 11:56 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 46 | 819200 | ||
103494940 | chctxdy68 | B | Jan. 6, 2021, 2:44 a.m. | OK | GNU C++17 (64) | TESTS | 25 | 46 | 819200 | ||
103469970 | payaljain44659 | B | Jan. 5, 2021, 6:20 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 46 | 819200 | ||
103501231 | noisegain | B | Jan. 6, 2021, 4:44 a.m. | OK | GNU C++17 (64) | TESTS | 25 | 46 | 1228800 | ||
103464488 | brunomont | B | Jan. 5, 2021, 5:45 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 46 | 1536000 | ||
103464578 | sjay05 | B | Jan. 5, 2021, 5:45 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 46 | 1638400 | ||
103458133 | Harshlyn94 | B | Jan. 5, 2021, 4:29 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 46 | 2457600 | ||
103466736 | IaMaNanBord | B | Jan. 5, 2021, 5:56 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 46 | 6758400 | ||
103488098 | wjyue2001 | B | Jan. 5, 2021, 11:30 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 46 | 8089600 | ||
103488202 | wjyue2001 | B | Jan. 5, 2021, 11:33 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 46 | 8089600 | ||
103476157 | Jepbar_Asgarov | B | Jan. 5, 2021, 7:26 p.m. | OK | Go | TESTS | 25 | 93 | 409600 | ||
103501489 | 0x3F | B | Jan. 6, 2021, 4:49 a.m. | OK | Go | TESTS | 25 | 124 | 409600 | ||
103475639 | clyring | B | Jan. 5, 2021, 7:19 p.m. | OK | Haskell | TESTS | 25 | 624 | 29491200 | ||
103473917 | clyring | B | Jan. 5, 2021, 7 p.m. | OK | Haskell | TESTS | 25 | 998 | 26316800 | ||
103497808 | linacs | B | Jan. 6, 2021, 3:44 a.m. | OK | Java 11 | TESTS | 25 | 202 | 0 | ||
103486051 | Matthey | B | Jan. 5, 2021, 10:29 p.m. | OK | Java 11 | TESTS | 25 | 202 | 0 | ||
103476937 | baba_yagga | B | Jan. 5, 2021, 7:36 p.m. | OK | Java 11 | TESTS | 25 | 217 | 0 | ||
103499373 | pikachu_pika_pika | B | Jan. 6, 2021, 4:13 a.m. | OK | Java 11 | TESTS | 25 | 218 | 0 | ||
103489304 | rafee69029 | B | Jan. 6, 2021, 12:09 a.m. | OK | Java 11 | TESTS | 25 | 218 | 0 | ||
103488522 | mphillotry | B | Jan. 5, 2021, 11:43 p.m. | OK | Java 11 | TESTS | 25 | 218 | 0 | ||
103473678 | lesgetit | B | Jan. 5, 2021, 6:57 p.m. | OK | Java 11 | TESTS | 25 | 218 | 0 | ||
103472087 | ap__singh | B | Jan. 5, 2021, 6:41 p.m. | OK | Java 11 | TESTS | 25 | 218 | 0 | ||
103505945 | shefali163 | B | Jan. 6, 2021, 5:53 a.m. | OK | Java 11 | TESTS | 25 | 233 | 0 | ||
103499703 | pikachu_pika_pika | B | Jan. 6, 2021, 4:19 a.m. | OK | Java 11 | TESTS | 25 | 233 | 0 | ||
103502591 | Dhananjay.07 | B | Jan. 6, 2021, 5:05 a.m. | OK | Java 8 | TESTS | 25 | 124 | 0 | ||
103482392 | deepaksach | B | Jan. 5, 2021, 9:02 p.m. | OK | Java 8 | TESTS | 25 | 124 | 0 | ||
103477432 | moli2398 | B | Jan. 5, 2021, 7:42 p.m. | OK | Java 8 | TESTS | 25 | 124 | 0 | ||
103506676 | ExitCode | B | Jan. 6, 2021, 6:02 a.m. | OK | Java 8 | TESTS | 25 | 140 | 1843200 | ||
103506517 | kira_101 | B | Jan. 6, 2021, 6 a.m. | OK | Java 8 | TESTS | 25 | 140 | 1843200 | ||
103501444 | unhackenyed | B | Jan. 6, 2021, 4:48 a.m. | OK | Java 8 | TESTS | 25 | 140 | 1843200 | ||
103482995 | O-Infinity | B | Jan. 5, 2021, 9:14 p.m. | OK | Java 8 | TESTS | 25 | 155 | 0 | ||
103491948 | flyman3046 | B | Jan. 6, 2021, 1:28 a.m. | OK | Java 8 | TESTS | 25 | 155 | 1843200 | ||
103482804 | Ahmed.Hany2727 | B | Jan. 5, 2021, 9:10 p.m. | OK | Java 8 | TESTS | 25 | 155 | 1843200 | ||
103482560 | Ahmed.Hany2727 | B | Jan. 5, 2021, 9:06 p.m. | OK | Java 8 | TESTS | 25 | 155 | 1843200 | ||
103460315 | ShurkaWake | B | Jan. 5, 2021, 4:33 p.m. | OK | JavaScript | TESTS | 25 | 140 | 15360000 | ||
103500877 | Spheniscine | B | Jan. 6, 2021, 4:39 a.m. | OK | Kotlin | TESTS | 25 | 139 | 0 | ||
103499554 | Spheniscine | B | Jan. 6, 2021, 4:16 a.m. | OK | Kotlin | TESTS | 25 | 155 | 0 | ||
103455178 | vladisov | B | Jan. 5, 2021, 4:22 p.m. | OK | Kotlin | TESTS | 25 | 951 | 150016000 | ||
103497820 | Keenan2114 | B | Jan. 6, 2021, 3:45 a.m. | OK | MS C++ | TESTS | 25 | 78 | 1638400 | ||
103500313 | dddttdCF | B | Jan. 6, 2021, 4:29 a.m. | OK | MS C++ 2017 | TESTS | 25 | 78 | 1638400 | ||
103493166 | flip-flop | B | Jan. 6, 2021, 1:59 a.m. | OK | MS C++ 2017 | TESTS | 25 | 124 | 409600 | ||
103470983 | ustaritz | B | Jan. 5, 2021, 6:29 p.m. | OK | MS C++ 2017 | TESTS | 25 | 124 | 1228800 | ||
103504103 | RStepan | B | Jan. 6, 2021, 5:27 a.m. | OK | MS C++ 2017 | TESTS | 25 | 124 | 1843200 | ||
103482397 | arashatt | B | Jan. 5, 2021, 9:02 p.m. | OK | MS C++ 2017 | TESTS | 25 | 124 | 2252800 | ||
103477279 | gever_gever | B | Jan. 5, 2021, 7:40 p.m. | OK | MS C++ 2017 | TESTS | 25 | 140 | 1331200 | ||
103480434 | gaserashraf | B | Jan. 5, 2021, 8:28 p.m. | OK | MS C++ 2017 | TESTS | 25 | 202 | 95436800 | ||
103478273 | fatvlad_ | B | Jan. 5, 2021, 7:54 p.m. | OK | MS C++ 2017 | TESTS | 25 | 233 | 102707200 | ||
103455234 | StepanClub | B | Jan. 5, 2021, 4:22 p.m. | OK | MS C++ 2017 | TESTS | 25 | 249 | 409600 | ||
103478836 | BrClaud | B | Jan. 5, 2021, 8:02 p.m. | OK | MS C++ 2017 | TESTS | 25 | 249 | 102707200 | ||
103461242 | Amr_elmowaled | B | Jan. 5, 2021, 4:34 p.m. | OK | PyPy 2 | TESTS | 25 | 140 | 10649600 | ||
103469597 | thuglife69 | B | Jan. 5, 2021, 6:17 p.m. | OK | PyPy 2 | TESTS | 25 | 171 | 9011200 | ||
103466776 | elistark | B | Jan. 5, 2021, 5:56 p.m. | OK | PyPy 2 | TESTS | 25 | 311 | 48128000 | ||
103486583 | whaleee | B | Jan. 5, 2021, 10:44 p.m. | OK | PyPy 2 | TESTS | 25 | 436 | 93491200 | ||
103469323 | pakshi_141199 | B | Jan. 5, 2021, 6:14 p.m. | OK | PyPy 3 | TESTS | 25 | 186 | 11673600 | ||
103479122 | TheVan | B | Jan. 5, 2021, 8:06 p.m. | OK | PyPy 3 | TESTS | 25 | 187 | 9830400 | ||
103473010 | bravotango | B | Jan. 5, 2021, 6:51 p.m. | OK | PyPy 3 | TESTS | 25 | 187 | 10240000 | ||
103479679 | at_f | B | Jan. 5, 2021, 8:15 p.m. | OK | PyPy 3 | TESTS | 25 | 218 | 9318400 | ||
103468825 | bravotango | B | Jan. 5, 2021, 6:10 p.m. | OK | PyPy 3 | TESTS | 25 | 248 | 10240000 | ||
103468188 | Moody_in_a_hoodie | B | Jan. 5, 2021, 6:05 p.m. | OK | PyPy 3 | TESTS | 25 | 248 | 10956800 | ||
103469006 | bravotango | B | Jan. 5, 2021, 6:12 p.m. | OK | PyPy 3 | TESTS | 25 | 249 | 10240000 | ||
103491957 | busking2 | B | Jan. 6, 2021, 1:28 a.m. | OK | PyPy 3 | TESTS | 25 | 249 | 10854400 | ||
103504589 | rajanabhishek12340 | B | Jan. 6, 2021, 5:34 a.m. | OK | PyPy 3 | TESTS | 25 | 249 | 10956800 | ||
103483603 | nostar | B | Jan. 5, 2021, 9:27 p.m. | OK | PyPy 3 | TESTS | 25 | 249 | 10956800 | ||
103481921 | karan124 | B | Jan. 5, 2021, 8:52 p.m. | OK | Python 3 | TESTS | 25 | 217 | 9216000 | ||
103482038 | edge4 | B | Jan. 5, 2021, 8:54 p.m. | OK | Python 3 | TESTS | 25 | 280 | 11264000 | ||
103501037 | shiviDON | B | Jan. 6, 2021, 4:41 a.m. | OK | Python 3 | TESTS | 25 | 311 | 16691200 | ||
103473383 | sh1194 | B | Jan. 5, 2021, 6:55 p.m. | OK | Python 3 | TESTS | 25 | 623 | 9216000 | ||
103505839 | nguuuquaaa | B | Jan. 6, 2021, 5:51 a.m. | OK | Python 3 | TESTS | 25 | 654 | 8908800 | ||
103459502 | Pizzay | B | Jan. 5, 2021, 4:31 p.m. | OK | Python 3 | TESTS | 25 | 654 | 8908800 | ||
103498161 | phuocchubeo | B | Jan. 6, 2021, 3:51 a.m. | OK | Python 3 | TESTS | 25 | 655 | 7680000 | ||
103456411 | ojha_abhi | B | Jan. 5, 2021, 4:25 p.m. | OK | Python 3 | TESTS | 25 | 732 | 9728000 | ||
103499921 | orazbek | B | Jan. 6, 2021, 4:22 a.m. | OK | Python 3 | TESTS | 25 | 888 | 11264000 | ||
103504653 | 1927shivamsingh | B | Jan. 6, 2021, 5:35 a.m. | OK | Python 3 | TESTS | 25 | 951 | 9216000 |
Back to search problems