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 |
---|---|---|---|---|---|---|
1582 | Codeforces Round 750 (Div. 2) | FINISHED | False | 9000 | 96753299 | Oct. 24, 2021, 10:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 10592 ) | D | Vupsen, Pupsen and 0 | PROGRAMMING | constructive algorithms math |
B"Vupsen and Pupsen were gifted an integer array. Since Vupsen doesn't like the number 0 , he threw away all numbers equal to 0 from the array. As a result, he got an array a of length n . Pupsen, on the contrary, likes the number 0 and he got upset when he saw the array without zeroes. To cheer Pupsen up, Vupsen decided to come up with another array b of length n such that sum_{i=1}^{n}a_i cdot b_i=0 . Since Vupsen doesn't like number 0 , the array b must not contain numbers equal to 0 . Also, the numbers in that array must not be huge, so the sum of their absolute values cannot exceed 10^9 . Please help Vupsen to find any such array b ! The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. The next 2 cdot t lines contain the description of test cases. The description of each test case consists of two lines. The first line of each test case contains a single integer n ( 2 <= n <= 10^5 ) -- the length of the array. The second line contains n integers a_1, a_2, ldots, a_n ( -10^4 <= a_i <= 10^4 , a_i neq 0 ) -- the elements of the array a . It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case print n integers b_1, b_2, ldots, b_n -- elements of the array b ( |b_1|+|b_2|+ ldots +|b_n| <= 10^9 , b_i neq 0 , sum_{i=1}^{n}a_i cdot b_i=0 ). It can be shown that the answer always exists. In the first test case, 5 cdot 1 + 5 cdot (-1)=5-5=0 . You could also print 3 -3 , for example, since 5 cdot 3 + 5 cdot (-3)=15-15=0 In the second test case, 5 cdot (-1) + (-2) cdot 5 + 10 cdot 1 + (-9) cdot (-1) + 4 cdot (-1)=-5-10+10+9-4=0 . "... |
Codeforces Round #750 (Div.2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
132948514 | Mrgglock | D | Oct. 24, 2021, 4:49 p.m. | OK | GNU C11 | TESTS | 16 | 62 | 4096000 | ||
132952050 | rainboy | D | Oct. 24, 2021, 5:43 p.m. | OK | GNU C11 | TESTS | 16 | 795 | 4096000 | ||
132969101 | jiangxuancheng | D | Oct. 25, 2021, 12:53 a.m. | OK | GNU C++14 | TESTS | 17 | 31 | 3993600 | ||
132937133 | CQYZWJH | D | Oct. 24, 2021, 2:33 p.m. | OK | GNU C++14 | TESTS | 15 | 46 | 1945600 | ||
132957998 | jha.vishal2121 | D | Oct. 24, 2021, 7:13 p.m. | OK | GNU C++14 | TESTS | 16 | 62 | 1433600 | ||
132968566 | Nickel_Angel | D | Oct. 25, 2021, 12:30 a.m. | OK | GNU C++14 | TESTS | 17 | 62 | 1843200 | ||
132967927 | Point_King | D | Oct. 24, 2021, 11:50 p.m. | OK | GNU C++14 | TESTS | 17 | 62 | 2457600 | ||
132959115 | A.D. | D | Oct. 24, 2021, 7:33 p.m. | OK | GNU C++14 | TESTS | 16 | 62 | 5120000 | ||
132927924 | aymanriadsolh | D | Oct. 24, 2021, 1:13 p.m. | OK | GNU C++14 | TESTS | 12 | 77 | 1433600 | ||
132948261 | ramisa.alam | D | Oct. 24, 2021, 4:46 p.m. | OK | GNU C++14 | TESTS | 16 | 77 | 1433600 | ||
132938321 | dishkum | D | Oct. 24, 2021, 2:45 p.m. | OK | GNU C++14 | TESTS | 15 | 77 | 1740800 | ||
132981426 | 007Yashwant | D | Oct. 25, 2021, 5:48 a.m. | OK | GNU C++14 | TESTS | 17 | 77 | 1740800 | ||
132970588 | TangDong | D | Oct. 25, 2021, 1:46 a.m. | OK | GNU C++17 | TESTS | 17 | 62 | 1433600 | ||
132947396 | twelve12 | D | Oct. 24, 2021, 4:34 p.m. | OK | GNU C++17 | TESTS | 16 | 62 | 1433600 | ||
132978021 | feveTernAl | D | Oct. 25, 2021, 4:49 a.m. | OK | GNU C++17 | TESTS | 17 | 62 | 1433600 | ||
132976844 | byambasuren | D | Oct. 25, 2021, 4:25 a.m. | OK | GNU C++17 | TESTS | 17 | 62 | 1740800 | ||
132968826 | fxhd | D | Oct. 25, 2021, 12:41 a.m. | OK | GNU C++17 | TESTS | 17 | 62 | 1843200 | ||
132962183 | leovl48 | D | Oct. 24, 2021, 8:31 p.m. | OK | GNU C++17 | TESTS | 16 | 62 | 2560000 | ||
132950017 | Mahm2od | D | Oct. 24, 2021, 5:12 p.m. | OK | GNU C++17 | TESTS | 16 | 77 | 1024000 | ||
132946438 | FloristeanIoan | D | Oct. 24, 2021, 4:21 p.m. | OK | GNU C++17 | TESTS | 16 | 77 | 1433600 | ||
132927283 | Leins233 | D | Oct. 24, 2021, 1:09 p.m. | OK | GNU C++17 | TESTS | 12 | 77 | 1433600 | ||
132951513 | ishabhray | D | Oct. 24, 2021, 5:36 p.m. | OK | GNU C++17 | TESTS | 16 | 77 | 1433600 | ||
132960453 | java. | D | Oct. 24, 2021, 7:58 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 46 | 1638400 | ||
132962123 | cloudcloud | D | Oct. 24, 2021, 8:30 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 46 | 1945600 | ||
132948846 | Saeed_247 | D | Oct. 24, 2021, 4:54 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 46 | 1945600 | ||
132975206 | sidaaaaa | D | Oct. 25, 2021, 3:50 a.m. | OK | GNU C++17 (64) | TESTS | 17 | 46 | 2048000 | ||
132974067 | niao_v | D | Oct. 25, 2021, 3:23 a.m. | OK | GNU C++17 (64) | TESTS | 17 | 46 | 2048000 | ||
132938963 | ArifBillah | D | Oct. 24, 2021, 2:51 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 46 | 2560000 | ||
132952454 | rishit3234 | D | Oct. 24, 2021, 5:49 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 46 | 2662400 | ||
132973505 | UV3 | D | Oct. 25, 2021, 3:11 a.m. | OK | GNU C++17 (64) | TESTS | 17 | 46 | 2662400 | ||
132977048 | Bhupendra_Singh | D | Oct. 25, 2021, 4:29 a.m. | OK | GNU C++17 (64) | TESTS | 17 | 46 | 2662400 | ||
132944929 | __TLE__ | D | Oct. 24, 2021, 4:01 p.m. | OK | GNU C++17 (64) | TESTS | 16 | 46 | 2662400 | ||
132979627 | AnuragGarg | D | Oct. 25, 2021, 5:17 a.m. | OK | GNU C++20 (64) | TESTS | 17 | 31 | 1638400 | ||
132962292 | fsstamx | D | Oct. 24, 2021, 8:34 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 31 | 1638400 | ||
132930993 | sumyabazar93 | D | Oct. 24, 2021, 1:37 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 46 | 1638400 | ||
132945381 | rajwashere_98 | D | Oct. 24, 2021, 4:07 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 46 | 1638400 | ||
132938858 | Zeta611 | D | Oct. 24, 2021, 2:50 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 46 | 1638400 | ||
132929762 | tush_chen | D | Oct. 24, 2021, 1:29 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 46 | 1945600 | ||
132965113 | BugLeave | D | Oct. 24, 2021, 9:48 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 46 | 1945600 | ||
132963728 | enjoying_loser_life | D | Oct. 24, 2021, 9:08 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 46 | 1945600 | ||
132940637 | mysteri0us7 | D | Oct. 24, 2021, 3:09 p.m. | OK | GNU C++20 (64) | TESTS | 16 | 46 | 1945600 | ||
132934847 | 3Sa3dI4 | D | Oct. 24, 2021, 2:09 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 46 | 1945600 | ||
132929794 | glebsamsonov | D | Oct. 24, 2021, 1:29 p.m. | OK | Go | TESTS | 12 | 156 | 8601600 | ||
132930187 | Kambar_Z | D | Oct. 24, 2021, 1:31 p.m. | OK | Go | TESTS | 12 | 732 | 8601600 | ||
132975413 | akash132 | D | Oct. 25, 2021, 3:55 a.m. | OK | Java 11 | TESTS | 17 | 218 | 24883200 | ||
132960152 | mareshkau | D | Oct. 24, 2021, 7:52 p.m. | OK | Java 11 | TESTS | 16 | 233 | 25292800 | ||
132959370 | mareshkau | D | Oct. 24, 2021, 7:37 p.m. | OK | Java 11 | TESTS | 16 | 233 | 25292800 | ||
132976772 | RegalBeast | D | Oct. 25, 2021, 4:24 a.m. | OK | Java 11 | TESTS | 17 | 233 | 28262400 | ||
132947682 | SaberXpro | D | Oct. 24, 2021, 4:38 p.m. | OK | Java 11 | TESTS | 16 | 249 | 24780800 | ||
132955608 | MrOtter | D | Oct. 24, 2021, 6:36 p.m. | OK | Java 11 | TESTS | 16 | 264 | 25088000 | ||
132952298 | ab5v | D | Oct. 24, 2021, 5:47 p.m. | OK | Java 11 | TESTS | 16 | 265 | 24985600 | ||
132945505 | dhruvil_8803 | D | Oct. 24, 2021, 4:08 p.m. | OK | Java 11 | TESTS | 16 | 265 | 25497600 | ||
132979430 | sumitchavan | D | Oct. 25, 2021, 5:14 a.m. | OK | Java 11 | TESTS | 17 | 280 | 24780800 | ||
132958156 | aayushdhakad | D | Oct. 24, 2021, 7:15 p.m. | OK | Java 11 | TESTS | 16 | 280 | 25600000 | ||
132977182 | sharma_ji_420 | D | Oct. 25, 2021, 4:32 a.m. | OK | Java 8 | TESTS | 17 | 155 | 19763200 | ||
132954300 | Lelouch_12 | D | Oct. 24, 2021, 6:16 p.m. | OK | Java 8 | TESTS | 16 | 155 | 19968000 | ||
132954514 | sanjayram21 | D | Oct. 24, 2021, 6:19 p.m. | OK | Java 8 | TESTS | 16 | 156 | 19968000 | ||
132938970 | bugbuster81 | D | Oct. 24, 2021, 2:51 p.m. | OK | Java 8 | TESTS | 16 | 156 | 19968000 | ||
132951794 | 18ucc039 | D | Oct. 24, 2021, 5:40 p.m. | OK | Java 8 | TESTS | 16 | 156 | 20172800 | ||
132977589 | Srikanth1777 | D | Oct. 25, 2021, 4:41 a.m. | OK | Java 8 | TESTS | 17 | 170 | 20275200 | ||
132963424 | rerererere | D | Oct. 24, 2021, 9 p.m. | OK | Java 8 | TESTS | 16 | 171 | 19968000 | ||
132958504 | piyush33patel | D | Oct. 24, 2021, 7:21 p.m. | OK | Java 8 | TESTS | 16 | 171 | 19968000 | ||
132978042 | ruchir28 | D | Oct. 25, 2021, 4:49 a.m. | OK | Java 8 | TESTS | 17 | 171 | 24678400 | ||
132930152 | invincible777 | D | Oct. 24, 2021, 1:31 p.m. | OK | Java 8 | TESTS | 12 | 171 | 24780800 | ||
132925054 | mishgan | D | Oct. 24, 2021, 12:34 p.m. | OK | Kotlin 1.4 | TESTS | 12 | 311 | 24780800 | ||
132932993 | BruteForcee | D | Oct. 24, 2021, 1:52 p.m. | OK | Kotlin 1.5 | TESTS | 14 | 218 | 24883200 | ||
132961202 | huy.caohuyhuy123 | D | Oct. 24, 2021, 8:12 p.m. | OK | Kotlin 1.5 | TESTS | 16 | 654 | 31334400 | ||
132937734 | songuno1 | D | Oct. 24, 2021, 2:39 p.m. | OK | MS C++ 2017 | TESTS | 15 | 108 | 3584000 | ||
132933158 | Tangerine | D | Oct. 24, 2021, 1:54 p.m. | OK | MS C++ 2017 | TESTS | 14 | 249 | 4300800 | ||
132932428 | Tangerine | D | Oct. 24, 2021, 1:47 p.m. | OK | MS C++ 2017 | TESTS | 13 | 249 | 4300800 | ||
132957592 | dino_merlin | D | Oct. 24, 2021, 7:06 p.m. | OK | MS C++ 2017 | TESTS | 16 | 264 | 2560000 | ||
132950485 | grey | D | Oct. 24, 2021, 5:19 p.m. | OK | MS C++ 2017 | TESTS | 16 | 265 | 4300800 | ||
132975103 | Agumon | D | Oct. 25, 2021, 3:48 a.m. | OK | MS C++ 2017 | TESTS | 17 | 312 | 11468800 | ||
132975083 | bkifhr9 | D | Oct. 25, 2021, 3:47 a.m. | OK | MS C++ 2017 | TESTS | 17 | 312 | 11468800 | ||
132976400 | saratcsss | D | Oct. 25, 2021, 4:16 a.m. | OK | .NET Core C# | TESTS | 17 | 187 | 24064000 | ||
132935186 | Loremon | D | Oct. 24, 2021, 2:12 p.m. | OK | Node.js | TESTS | 15 | 140 | 28057600 | ||
132928806 | Mai_hoo_kaun | D | Oct. 24, 2021, 1:19 p.m. | OK | PyPy 3 | TESTS | 12 | 171 | 32768000 | ||
132948400 | PuruKumar | D | Oct. 24, 2021, 4:48 p.m. | OK | PyPy 3 | TESTS | 16 | 249 | 38604800 | ||
132959378 | paulmorenkov | D | Oct. 24, 2021, 7:38 p.m. | OK | PyPy 3 | TESTS | 16 | 280 | 33075200 | ||
132973484 | rajbit | D | Oct. 25, 2021, 3:10 a.m. | OK | PyPy 3 | TESTS | 17 | 280 | 37888000 | ||
132947858 | plevande | D | Oct. 24, 2021, 4:40 p.m. | OK | PyPy 3 | TESTS | 16 | 296 | 34304000 | ||
132925275 | KirillK1 | D | Oct. 24, 2021, 12:34 p.m. | OK | PyPy 3 | TESTS | 12 | 311 | 34406400 | ||
132936298 | prithwiraj15 | D | Oct. 24, 2021, 2:24 p.m. | OK | PyPy 3 | TESTS | 15 | 327 | 31027200 | ||
132979765 | Greyhound | D | Oct. 25, 2021, 5:19 a.m. | OK | PyPy 3 | TESTS | 17 | 327 | 31334400 | ||
132945745 | Probability1 | D | Oct. 24, 2021, 4:12 p.m. | OK | PyPy 3 | TESTS | 16 | 327 | 31334400 | ||
132927056 | nsharc4 | D | Oct. 24, 2021, 1:08 p.m. | OK | PyPy 3 | TESTS | 12 | 343 | 30822400 | ||
132946815 | Mukundan314 | D | Oct. 24, 2021, 4:26 p.m. | OK | PyPy 3-64 | TESTS | 16 | 170 | 49664000 | ||
132934578 | shubh67678 | D | Oct. 24, 2021, 2:07 p.m. | OK | PyPy 3-64 | TESTS | 15 | 171 | 50483200 | ||
132948283 | 9.86960440109 | D | Oct. 24, 2021, 4:46 p.m. | OK | PyPy 3-64 | TESTS | 16 | 218 | 54374400 | ||
132935052 | _heqzagone_ | D | Oct. 24, 2021, 2:11 p.m. | OK | PyPy 3-64 | TESTS | 15 | 249 | 46080000 | ||
132956587 | cmplx-xyttmt | D | Oct. 24, 2021, 6:50 p.m. | OK | PyPy 3-64 | TESTS | 16 | 249 | 46489600 | ||
132953188 | inksamurai | D | Oct. 24, 2021, 6 p.m. | OK | PyPy 3-64 | TESTS | 16 | 264 | 45568000 | ||
132962208 | HETRAKESHFADIA | D | Oct. 24, 2021, 8:32 p.m. | OK | PyPy 3-64 | TESTS | 16 | 265 | 52736000 | ||
132953354 | inksamurai | D | Oct. 24, 2021, 6:03 p.m. | OK | PyPy 3-64 | TESTS | 16 | 280 | 46080000 | ||
132959312 | KeiTsukishima | D | Oct. 24, 2021, 7:37 p.m. | OK | PyPy 3-64 | TESTS | 16 | 295 | 57856000 | ||
132929904 | sushmanth.dampur8780 | D | Oct. 24, 2021, 1:30 p.m. | OK | PyPy 3-64 | TESTS | 12 | 327 | 48537600 | ||
132959271 | KeiTsukishima | D | Oct. 24, 2021, 7:36 p.m. | OK | Python 3 | TESTS | 16 | 311 | 16384000 | ||
132959986 | armsusman | D | Oct. 24, 2021, 7:49 p.m. | OK | Python 3 | TESTS | 16 | 327 | 16588800 | ||
132980325 | akshaywairagade2 | D | Oct. 25, 2021, 5:29 a.m. | OK | Python 3 | TESTS | 17 | 342 | 14848000 | ||
132959741 | NokSyte | D | Oct. 24, 2021, 7:44 p.m. | OK | Python 3 | TESTS | 16 | 342 | 15155200 | ||
132931736 | .Machine | D | Oct. 24, 2021, 1:42 p.m. | OK | Python 3 | TESTS | 13 | 343 | 13926400 | ||
132941130 | Artik_2005 | D | Oct. 24, 2021, 3:14 p.m. | OK | Python 3 | TESTS | 16 | 358 | 14028800 | ||
132964956 | satishcrazy | D | Oct. 24, 2021, 9:44 p.m. | OK | Python 3 | TESTS | 16 | 358 | 14438400 | ||
132934714 | praveenkumarskvs88 | D | Oct. 24, 2021, 2:08 p.m. | OK | Python 3 | TESTS | 15 | 373 | 13926400 | ||
132966592 | D9RS | D | Oct. 24, 2021, 10:42 p.m. | OK | Python 3 | TESTS | 16 | 405 | 13926400 | ||
132969741 | nuyencrkh | D | Oct. 25, 2021, 1:15 a.m. | OK | Python 3 | TESTS | 17 | 421 | 11776000 |
Back to search problems