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 |
---|---|---|---|---|---|---|
1848 | Codeforces Round 885 (Div. 2) | FINISHED | False | 7200 | 47661863 | July 16, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 6489 ) | C | Vika and Price Tags | PROGRAMMING | greedy math number theory |
B'Vika came to her favorite cosmetics store "Golden Pear". She noticed that the prices of n items have changed since her last visit. She decided to analyze how much the prices have changed and calculated the difference between the old and new prices for each of the n items. Vika enjoyed calculating the price differences and decided to continue this process. Let the old prices be represented as an array of non-negative integers a , and the new prices as an array of non-negative integers b . Both arrays have the same length n . In one operation, Vika constructs a new array c according to the following principle: c_i = |a_i - b_i| . Then, array c renamed into array b , and array b renamed into array a at the same time, after which Vika repeats the operation with them. For example, if a = [1, 2, 3, 4, 5, 6, 7] ; b = [7, 6, 5, 4, 3, 2, 1] , then c = [6, 4, 2, 0, 2, 4, 6] . Then, a = [7, 6, 5, 4, 3, 2, 1] ; b = [6, 4, 2, 0, 2, 4, 6] . Vika decided to call a pair of arrays a , b dull if after some number of such operations all elements of array a become zeros. Output "YES" if the original pair of arrays is dull, and "NO" otherwise. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 10^5 ) -- the number of items whose prices have changed. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= 10^9 ) -- the old prices of the items. The third line contains n integers b_1, b_2, ldots, b_n ( 0 <= b_i <= 10^9 ) -- the new prices of the items. It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case, output "YES" if the pair of price arrays '... |
Codeforces Round #885 (Div.2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
214086373 | Tdyx | C | July 16, 2023, 4:10 p.m. | OK | C# 10 | TESTS | 20 | 93 | 16793600 | ||
214089431 | AutumnMist | C | July 16, 2023, 4:19 p.m. | OK | C# 10 | TESTS | 20 | 140 | 19353600 | ||
214092215 | FatalityNT | C | July 16, 2023, 4:27 p.m. | OK | C# 10 | TESTS | 20 | 202 | 21196800 | ||
214123326 | NenadDapic | C | July 16, 2023, 9:21 p.m. | OK | FPC | TESTS | 21 | 155 | 819200 | ||
214085943 | pengin_2000 | C | July 16, 2023, 4:09 p.m. | OK | GNU C11 | TESTS | 20 | 156 | 1638400 | ||
214136315 | tokitsukaze | C | July 17, 2023, 1:46 a.m. | OK | GNU C++14 | TESTS | 21 | 46 | 1740800 | ||
214110116 | rkkashyap390 | C | July 16, 2023, 6:49 p.m. | OK | GNU C++14 | TESTS | 21 | 62 | 1228800 | ||
214098818 | RongC | C | July 16, 2023, 5:02 p.m. | OK | GNU C++14 | TESTS | 20 | 62 | 1638400 | ||
214086571 | Sunnyyyy | C | July 16, 2023, 4:11 p.m. | OK | GNU C++14 | TESTS | 20 | 62 | 1740800 | ||
214088911 | vegetable_zajasi | C | July 16, 2023, 4:18 p.m. | OK | GNU C++14 | TESTS | 20 | 62 | 3174400 | ||
214144248 | a999999 | C | July 17, 2023, 3:17 a.m. | OK | GNU C++14 | TESTS | 21 | 62 | 9625600 | ||
214152153 | XG0000 | C | July 17, 2023, 5:08 a.m. | OK | GNU C++14 | TESTS | 21 | 77 | 819200 | ||
214138907 | spacetimewww | C | July 17, 2023, 2:18 a.m. | OK | GNU C++14 | TESTS | 21 | 77 | 1843200 | ||
214090118 | Baytoro | C | July 16, 2023, 4:21 p.m. | OK | GNU C++14 | TESTS | 20 | 77 | 2457600 | ||
214155419 | yuechu | C | July 17, 2023, 5:51 a.m. | OK | GNU C++14 | TESTS | 21 | 78 | 819200 | ||
214088516 | TimeEmergency | C | July 16, 2023, 4:16 p.m. | OK | GNU C++17 | TESTS | 20 | 62 | 409600 | ||
214149032 | nomovelaplace | C | July 17, 2023, 4:16 a.m. | OK | GNU C++17 | TESTS | 21 | 62 | 819200 | ||
214150358 | love_kd | C | July 17, 2023, 4:40 a.m. | OK | GNU C++17 | TESTS | 21 | 62 | 819200 | ||
214131865 | Hope-well | C | July 17, 2023, 12:29 a.m. | OK | GNU C++17 | TESTS | 21 | 62 | 1638400 | ||
214088345 | sha7dow | C | July 16, 2023, 4:16 p.m. | OK | GNU C++17 | TESTS | 20 | 62 | 1638400 | ||
214090016 | Aaayc. | C | July 16, 2023, 4:21 p.m. | OK | GNU C++17 | TESTS | 20 | 62 | 1638400 | ||
214090231 | 1234_nhlj | C | July 16, 2023, 4:21 p.m. | OK | GNU C++17 | TESTS | 20 | 62 | 1843200 | ||
214142703 | ShashankGaur03 | C | July 17, 2023, 3 a.m. | OK | GNU C++17 | TESTS | 21 | 62 | 2355200 | ||
214103688 | MuKuL01 | C | July 16, 2023, 5:41 p.m. | OK | GNU C++17 | TESTS | 21 | 77 | 819200 | ||
214105016 | purupuddu | C | July 16, 2023, 5:54 p.m. | OK | GNU C++17 | TESTS | 21 | 77 | 819200 | ||
214148330 | konb1 | C | July 17, 2023, 4:06 a.m. | OK | GNU C++17 (64) | TESTS | 21 | 46 | 819200 | ||
214145154 | akifpathan | C | July 17, 2023, 3:27 a.m. | OK | GNU C++17 (64) | TESTS | 21 | 46 | 819200 | ||
214099056 | akifpathan | C | July 16, 2023, 5:03 p.m. | OK | GNU C++17 (64) | TESTS | 20 | 46 | 819200 | ||
214098829 | Akagi_Ritsuko_219 | C | July 16, 2023, 5:02 p.m. | OK | GNU C++17 (64) | TESTS | 20 | 46 | 819200 | ||
214124002 | Bu1at | C | July 16, 2023, 9:33 p.m. | OK | GNU C++17 (64) | TESTS | 21 | 46 | 2457600 | ||
214084970 | secret-550504 | C | July 16, 2023, 4:06 p.m. | OK | GNU C++17 (64) | TESTS | 20 | 46 | 3584000 | ||
214145454 | akifpathan | C | July 17, 2023, 3:30 a.m. | OK | GNU C++17 (64) | TESTS | 21 | 61 | 819200 | ||
214122609 | enslaved | C | July 16, 2023, 9:09 p.m. | OK | GNU C++17 (64) | TESTS | 21 | 61 | 819200 | ||
214142160 | hhh3 | C | July 17, 2023, 2:54 a.m. | OK | GNU C++17 (64) | TESTS | 21 | 61 | 1638400 | ||
214088500 | weakestOsuPlayer_244 | C | July 16, 2023, 4:16 p.m. | OK | GNU C++17 (64) | TESTS | 20 | 61 | 4505600 | ||
214088603 | ttb1969 | C | July 16, 2023, 4:17 p.m. | OK | GNU C++20 (64) | TESTS | 20 | 31 | 819200 | ||
214092811 | zhouersuan | C | July 16, 2023, 4:28 p.m. | OK | GNU C++20 (64) | TESTS | 20 | 31 | 1331200 | ||
214091174 | Ferrriccc | C | July 16, 2023, 4:24 p.m. | OK | GNU C++20 (64) | TESTS | 20 | 31 | 2048000 | ||
214084872 | _andyli | C | July 16, 2023, 4:05 p.m. | OK | GNU C++20 (64) | TESTS | 20 | 31 | 2867200 | ||
214132161 | mcuadros | C | July 17, 2023, 12:36 a.m. | OK | GNU C++20 (64) | TESTS | 21 | 46 | 409600 | ||
214131760 | mcuadros | C | July 17, 2023, 12:27 a.m. | OK | GNU C++20 (64) | TESTS | 21 | 46 | 409600 | ||
214147285 | thanhtien92to12 | C | July 17, 2023, 3:52 a.m. | OK | GNU C++20 (64) | TESTS | 21 | 46 | 819200 | ||
214147242 | NimaAryan | C | July 17, 2023, 3:52 a.m. | OK | GNU C++20 (64) | TESTS | 21 | 46 | 819200 | ||
214147227 | keep_mind | C | July 17, 2023, 3:51 a.m. | OK | GNU C++20 (64) | TESTS | 21 | 46 | 819200 | ||
214148544 | hegues | C | July 17, 2023, 4:09 a.m. | OK | GNU C++20 (64) | TESTS | 21 | 46 | 819200 | ||
214100761 | shojin_pro | C | July 16, 2023, 5:15 p.m. | OK | Java 11 | TESTS | 20 | 202 | 0 | ||
214105817 | themadknight45 | C | July 16, 2023, 6:03 p.m. | OK | Java 11 | TESTS | 21 | 249 | 0 | ||
214090425 | WORTH | C | July 16, 2023, 4:22 p.m. | OK | Java 11 | TESTS | 20 | 264 | 0 | ||
214111732 | prakharshri12345 | C | July 16, 2023, 7:09 p.m. | OK | Java 11 | TESTS | 21 | 280 | 0 | ||
214090892 | Oz121 | C | July 16, 2023, 4:23 p.m. | OK | Java 11 | TESTS | 20 | 311 | 0 | ||
214120929 | KlayThompson11 | C | July 16, 2023, 8:46 p.m. | OK | Java 11 | TESTS | 21 | 327 | 0 | ||
214098010 | dzhi | C | July 16, 2023, 4:58 p.m. | OK | Java 11 | TESTS | 20 | 343 | 0 | ||
214134344 | butteronpoptart | C | July 17, 2023, 1:16 a.m. | OK | Java 11 | TESTS | 21 | 373 | 0 | ||
214154975 | jiangqiao | C | July 17, 2023, 5:46 a.m. | OK | Java 17 | TESTS | 21 | 280 | 614400 | ||
214103723 | lapsha | C | July 16, 2023, 5:41 p.m. | OK | Java 17 | TESTS | 21 | 280 | 716800 | ||
214149579 | Asnkkzk | C | July 17, 2023, 4:25 a.m. | OK | Java 17 | TESTS | 21 | 280 | 1024000 | ||
214102005 | leoncn | C | July 16, 2023, 5:25 p.m. | OK | Java 17 | TESTS | 21 | 280 | 1740800 | ||
214098781 | merlin_ | C | July 16, 2023, 5:02 p.m. | OK | Java 17 | TESTS | 20 | 280 | 5017600 | ||
214123743 | Cromyl | C | July 16, 2023, 9:28 p.m. | OK | Java 17 | TESTS | 21 | 295 | 1638400 | ||
214086508 | jack.t.y.wu | C | July 16, 2023, 4:10 p.m. | OK | Java 17 | TESTS | 20 | 296 | 1740800 | ||
214107434 | wizardleen | C | July 16, 2023, 6:20 p.m. | OK | Java 17 | TESTS | 21 | 296 | 10854400 | ||
214155309 | jiangqiao | C | July 17, 2023, 5:50 a.m. | OK | Java 17 | TESTS | 21 | 311 | 921600 | ||
214138726 | Asnkkzk | C | July 17, 2023, 2:16 a.m. | OK | Java 17 | TESTS | 21 | 311 | 1228800 | ||
214103737 | NerfThis | C | July 16, 2023, 5:41 p.m. | OK | Java 8 | TESTS | 21 | 156 | 3584000 | ||
214123572 | lpychemistry | C | July 16, 2023, 9:25 p.m. | OK | Java 8 | TESTS | 21 | 202 | 0 | ||
214111119 | The_terminator | C | July 16, 2023, 7:02 p.m. | OK | Java 8 | TESTS | 21 | 202 | 0 | ||
214088149 | UniversalAdmin | C | July 16, 2023, 4:15 p.m. | OK | Java 8 | TESTS | 20 | 202 | 3174400 | ||
214103384 | lidh184 | C | July 16, 2023, 5:38 p.m. | OK | MS C++ 2017 | TESTS | 21 | 218 | 1638400 | ||
214100610 | Exusiai1 | C | July 16, 2023, 5:14 p.m. | OK | MS C++ 2017 | TESTS | 20 | 218 | 3174400 | ||
214143101 | Aksurana | C | July 17, 2023, 3:04 a.m. | OK | MS C++ 2017 | TESTS | 21 | 249 | 819200 | ||
214113370 | jvatsal0709 | C | July 16, 2023, 7:27 p.m. | OK | PyPy 3 | TESTS | 21 | 342 | 13516800 | ||
214114578 | LazyRGuy | C | July 16, 2023, 7:40 p.m. | OK | PyPy 3 | TESTS | 21 | 342 | 20480000 | ||
214114418 | LazyRGuy | C | July 16, 2023, 7:38 p.m. | OK | PyPy 3 | TESTS | 21 | 343 | 19558400 | ||
214114508 | LazyRGuy | C | July 16, 2023, 7:39 p.m. | OK | PyPy 3 | TESTS | 21 | 374 | 19558400 | ||
214091828 | Proelectro_Cpp | C | July 16, 2023, 4:26 p.m. | OK | PyPy 3 | TESTS | 20 | 436 | 14028800 | ||
214091369 | 9.86960440109 | C | July 16, 2023, 4:24 p.m. | OK | PyPy 3 | TESTS | 20 | 452 | 20684800 | ||
214113890 | tinti1602 | C | July 16, 2023, 7:32 p.m. | OK | PyPy 3 | TESTS | 21 | 639 | 13619200 | ||
214114628 | LazyRGuy | C | July 16, 2023, 7:41 p.m. | OK | PyPy 3 | TESTS | 21 | 748 | 13516800 | ||
214114667 | LazyRGuy | C | July 16, 2023, 7:41 p.m. | OK | PyPy 3 | TESTS | 21 | 841 | 13516800 | ||
214114701 | LazyRGuy | C | July 16, 2023, 7:42 p.m. | OK | PyPy 3 | TESTS | 21 | 873 | 13516800 | ||
214089486 | yuki_keshiki | C | July 16, 2023, 4:19 p.m. | OK | PyPy 3-64 | TESTS | 20 | 155 | 17203200 | ||
214100872 | Ana_naS | C | July 16, 2023, 5:16 p.m. | OK | PyPy 3-64 | TESTS | 20 | 171 | 25292800 | ||
214092569 | recuraki | C | July 16, 2023, 4:27 p.m. | OK | PyPy 3-64 | TESTS | 20 | 202 | 18739200 | ||
214100468 | asiad | C | July 16, 2023, 5:13 p.m. | OK | PyPy 3-64 | TESTS | 20 | 202 | 25190400 | ||
214153018 | iN_siDious | C | July 17, 2023, 5:19 a.m. | OK | PyPy 3-64 | TESTS | 21 | 202 | 27750400 | ||
214090817 | kavorka | C | July 16, 2023, 4:23 p.m. | OK | PyPy 3-64 | TESTS | 20 | 217 | 17100800 | ||
214093852 | bjy | C | July 16, 2023, 4:31 p.m. | OK | PyPy 3-64 | TESTS | 20 | 217 | 21299200 | ||
214141594 | mikeac | C | July 17, 2023, 2:48 a.m. | OK | PyPy 3-64 | TESTS | 21 | 218 | 16896000 | ||
214134311 | shenge | C | July 17, 2023, 1:15 a.m. | OK | PyPy 3-64 | TESTS | 21 | 233 | 24064000 | ||
214099778 | donghoony | C | July 16, 2023, 5:08 p.m. | OK | PyPy 3-64 | TESTS | 20 | 249 | 16793600 | ||
214121014 | Asharma538 | C | July 16, 2023, 8:47 p.m. | OK | Python 3 | TESTS | 21 | 217 | 18636800 | ||
214105043 | jalapathisharathchandra | C | July 16, 2023, 5:54 p.m. | OK | Python 3 | TESTS | 21 | 265 | 18636800 | ||
214099307 | recuraki | C | July 16, 2023, 5:05 p.m. | OK | Python 3 | TESTS | 20 | 265 | 18636800 | ||
214088037 | abhipraay | C | July 16, 2023, 4:15 p.m. | OK | Python 3 | TESTS | 20 | 826 | 141516800 | ||
214129715 | pirate0 | C | July 16, 2023, 11:35 p.m. | OK | Python 3 | TESTS | 21 | 966 | 19968000 | ||
214089630 | YummyPie | C | July 16, 2023, 4:20 p.m. | OK | Rust 2021 | TESTS | 20 | 46 | 4812800 | ||
214111555 | mr_sparkle70 | C | July 16, 2023, 7:07 p.m. | OK | Rust 2021 | TESTS | 21 | 140 | 5939200 |
Back to search problems