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 |
---|---|---|---|---|---|---|
1909 | Pinely Round 3 (Div. 1 + Div. 2) | FINISHED | False | 10800 | 28481099 | Dec. 23, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 17417 ) | B | Make Almost Equal With Mod | PROGRAMMING | math number theory |
B'You are given an array a_1, a_2, ... , a_n of distinct positive integers. You have to do the following operation exactly once: Find a value of k such that 1 <= q k <= q 10^{18} and the array a_1, a_2, ... , a_n contains exactly 2 distinct values at the end of the operation. It can be shown that, under the constraints of the problem, at least one such k always exists. If there are multiple solutions, you can print any of them. ^ dagger a text{ mod } b denotes the remainder after dividing a by b . For example: Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 500 ). The description of the test cases follows. The first line of each test case contains a single integer n ( 2 <= n <= 100 ) -- the length of the array a . The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^{17} ) -- the initial state of the array. It is guaranteed that all the a_i are distinct. Note that there are no constraints on the sum of n over all test cases. For each test case, output a single integer: a value of k ( 1 <= q k <= q 10^{18} ) such that the array a_1, a_2, ... , a_n contains exactly 2 distinct values at the end of the operation. In the first test case, you can choose k = 7 . The array becomes [8 text{ mod } 7, 15 text{ mod } 7, 22 text{ mod } 7, 30 text{ mod } 7] = [1, 1, 1, 2] , which contains exactly 2 distinct values ( {1, 2 } ). In the second test case, you can choose k = 30 . The array becomes [0, 0, 8, 0, 8] , which contains exactly 2 distinct values ( {0, 8 } ). Note that choosing k = 10 would also be a valid solution. In the last test case, you can choose k = 10^{18} . The array becomes [2, 1] , which contains exactly 2 distinct values ( {1, 2 } ). Note that '... |
Editorial of Pinely Round 3 (Div. 1 + Div. 2) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
238590596 | vovch2ara | B | Dec. 23, 2023, 6:17 p.m. | OK | C# 8 | TESTS | 15 | 124 | 11980800 | ||
238592868 | Novi1024 | B | Dec. 23, 2023, 6:31 p.m. | OK | GNU C11 | TESTS | 15 | 46 | 3993600 | ||
238599773 | eugalt | B | Dec. 23, 2023, 7:51 p.m. | OK | GNU C11 | TESTS | 15 | 46 | 3993600 | ||
238601876 | arnavra3 | B | Dec. 23, 2023, 8:23 p.m. | OK | GNU C11 | TESTS | 15 | 78 | 3993600 | ||
238614099 | NJX4122 | B | Dec. 24, 2023, 2:20 a.m. | OK | GNU C++14 | TESTS | 15 | 31 | 1024000 | ||
238616306 | Konggee. | B | Dec. 24, 2023, 3:11 a.m. | OK | GNU C++14 | TESTS | 15 | 31 | 1228800 | ||
238616233 | Konggee. | B | Dec. 24, 2023, 3:09 a.m. | OK | GNU C++14 | TESTS | 15 | 31 | 1228800 | ||
238613162 | qjm | B | Dec. 24, 2023, 1:54 a.m. | OK | GNU C++14 | TESTS | 15 | 31 | 1228800 | ||
238603656 | tamminaina_y | B | Dec. 23, 2023, 8:51 p.m. | OK | GNU C++14 | TESTS | 15 | 31 | 1228800 | ||
238597279 | sherifmesba | B | Dec. 23, 2023, 7:17 p.m. | OK | GNU C++14 | TESTS | 15 | 31 | 1228800 | ||
238624045 | Zyg4rd_E | B | Dec. 24, 2023, 5:29 a.m. | OK | GNU C++14 | TESTS | 15 | 31 | 1228800 | ||
238580202 | __Tarik__ | B | Dec. 23, 2023, 5:09 p.m. | OK | GNU C++14 | TESTS | 15 | 31 | 17203200 | ||
238626255 | Ayush73nigam | B | Dec. 24, 2023, 5:59 a.m. | OK | GNU C++14 | TESTS | 15 | 46 | 1024000 | ||
238622812 | codewizard_80559 | B | Dec. 24, 2023, 5:12 a.m. | OK | GNU C++14 | TESTS | 15 | 46 | 1024000 | ||
238585583 | _another_NOOB | B | Dec. 23, 2023, 5:29 p.m. | OK | GNU C++17 | TESTS | 15 | 30 | 1228800 | ||
238594401 | Orca64 | B | Dec. 23, 2023, 6:45 p.m. | OK | GNU C++17 | TESTS | 15 | 31 | 1024000 | ||
238593459 | duybinh_cbl | B | Dec. 23, 2023, 6:37 p.m. | OK | GNU C++17 | TESTS | 15 | 31 | 1024000 | ||
238578503 | AugensternQ723 | B | Dec. 23, 2023, 5:03 p.m. | OK | GNU C++17 | TESTS | 15 | 31 | 1024000 | ||
238595574 | manitianajay45 | B | Dec. 23, 2023, 6:57 p.m. | OK | GNU C++17 | TESTS | 15 | 31 | 1024000 | ||
238604776 | abdo3bkr | B | Dec. 23, 2023, 9:13 p.m. | OK | GNU C++17 | TESTS | 15 | 31 | 1024000 | ||
238622025 | aditya_neer | B | Dec. 24, 2023, 5 a.m. | OK | GNU C++17 | TESTS | 15 | 31 | 1024000 | ||
238623844 | Deep1809 | B | Dec. 24, 2023, 5:26 a.m. | OK | GNU C++17 | TESTS | 15 | 31 | 1228800 | ||
238622720 | Abdullah_Al_Mahmud_Adib | B | Dec. 24, 2023, 5:11 a.m. | OK | GNU C++17 | TESTS | 15 | 31 | 1228800 | ||
238611569 | train_to_Nizhnevartovsk | B | Dec. 24, 2023, 12:59 a.m. | OK | GNU C++17 | TESTS | 15 | 31 | 1228800 | ||
238592109 | walilili | B | Dec. 23, 2023, 6:26 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 30 | 1228800 | ||
238608554 | enslaved | B | Dec. 23, 2023, 10:53 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 30 | 1228800 | ||
238601873 | Gladiator_King | B | Dec. 23, 2023, 8:23 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 30 | 1228800 | ||
238597860 | Warrior_1729 | B | Dec. 23, 2023, 7:24 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 30 | 1228800 | ||
238590010 | imposterx | B | Dec. 23, 2023, 6:13 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 30 | 1228800 | ||
238585626 | LaBEeB_ibnu_TaAHiR | B | Dec. 23, 2023, 5:29 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 30 | 1331200 | ||
238621380 | kejunyu | B | Dec. 24, 2023, 4:49 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 1228800 | ||
238622230 | slcx | B | Dec. 24, 2023, 5:04 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 1228800 | ||
238622779 | Beriholic | B | Dec. 24, 2023, 5:12 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 1228800 | ||
238624284 | Toxiccht | B | Dec. 24, 2023, 5:32 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 31 | 1228800 | ||
238598035 | PyAlpha | B | Dec. 23, 2023, 7:27 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 15 | 1228800 | ||
238597287 | Gargera_El5atera | B | Dec. 23, 2023, 7:17 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 15 | 1228800 | ||
238586080 | AlokPurbey07 | B | Dec. 23, 2023, 5:31 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 15 | 1228800 | ||
238582013 | enigmatic04 | B | Dec. 23, 2023, 5:17 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 15 | 1228800 | ||
238580511 | raiax07 | B | Dec. 23, 2023, 5:10 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 15 | 1228800 | ||
238582340 | Tesseract4_MathForce | B | Dec. 23, 2023, 5:18 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 15 | 1228800 | ||
238625090 | _ZERO____ | B | Dec. 24, 2023, 5:43 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 15 | 1228800 | ||
238620015 | HTyin | B | Dec. 24, 2023, 4:26 a.m. | OK | GNU C++20 (64) | TESTS | 15 | 15 | 1228800 | ||
238610009 | PoloniumLuke | B | Dec. 23, 2023, 11:49 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 15 | 1228800 | ||
238603055 | tangyuanzi | B | Dec. 23, 2023, 8:43 p.m. | OK | GNU C++20 (64) | TESTS | 15 | 15 | 1228800 | ||
238611997 | SadFriedRice | B | Dec. 24, 2023, 1:16 a.m. | OK | Go | TESTS | 15 | 77 | 19865600 | ||
238612832 | habib_48 | B | Dec. 24, 2023, 1:44 a.m. | OK | Java 11 | TESTS | 15 | 202 | 24576000 | ||
238593601 | Pranav_Sharda | B | Dec. 23, 2023, 6:38 p.m. | OK | Java 11 | TESTS | 15 | 264 | 24678400 | ||
238590252 | rajat6726 | B | Dec. 23, 2023, 6:14 p.m. | OK | Java 11 | TESTS | 15 | 265 | 24576000 | ||
238584355 | klu_2100031866 | B | Dec. 23, 2023, 5:25 p.m. | OK | Java 11 | TESTS | 15 | 343 | 25292800 | ||
238584977 | muskan05gupta | B | Dec. 23, 2023, 5:27 p.m. | OK | Java 11 | TESTS | 15 | 343 | 25292800 | ||
238626158 | dilshar23 | B | Dec. 24, 2023, 5:57 a.m. | OK | Java 17 | TESTS | 15 | 296 | 40345600 | ||
238622421 | Ezoty | B | Dec. 24, 2023, 5:07 a.m. | OK | Java 17 | TESTS | 15 | 311 | 40243200 | ||
238600677 | anand_mishra_ | B | Dec. 23, 2023, 8:03 p.m. | OK | Java 17 | TESTS | 15 | 312 | 40345600 | ||
238625498 | Jha_coder1942 | B | Dec. 24, 2023, 5:49 a.m. | OK | Java 17 | TESTS | 15 | 358 | 40857600 | ||
238581569 | lucifer_locas | B | Dec. 23, 2023, 5:15 p.m. | OK | Java 17 | TESTS | 15 | 389 | 40755200 | ||
238596845 | amit_rcciit | B | Dec. 23, 2023, 7:11 p.m. | OK | Java 17 | TESTS | 15 | 467 | 40652800 | ||
238605932 | MrSharpedge | B | Dec. 23, 2023, 9:38 p.m. | OK | Java 21 | TESTS | 15 | 265 | 41779200 | ||
238598496 | mangos194 | B | Dec. 23, 2023, 7:33 p.m. | OK | Java 21 | TESTS | 15 | 342 | 41984000 | ||
238605110 | java_noob69 | B | Dec. 23, 2023, 9:20 p.m. | OK | Java 21 | TESTS | 15 | 343 | 57958400 | ||
238579654 | saksham294 | B | Dec. 23, 2023, 5:07 p.m. | OK | Java 21 | TESTS | 15 | 358 | 41881600 | ||
238610663 | newbornLingling0423 | B | Dec. 24, 2023, 12:19 a.m. | OK | Java 21 | TESTS | 15 | 373 | 41779200 | ||
238581916 | invincible777 | B | Dec. 23, 2023, 5:16 p.m. | OK | Java 8 | TESTS | 15 | 155 | 18944000 | ||
238580949 | _I_Am_No_One_ | B | Dec. 23, 2023, 5:12 p.m. | OK | Java 8 | TESTS | 15 | 186 | 18944000 | ||
238609563 | Terminators | B | Dec. 23, 2023, 11:31 p.m. | OK | Java 8 | TESTS | 15 | 187 | 18944000 | ||
238590018 | American_Eagle | B | Dec. 23, 2023, 6:13 p.m. | OK | Java 8 | TESTS | 15 | 187 | 18944000 | ||
238580779 | Eslam_Ahmed | B | Dec. 23, 2023, 5:12 p.m. | OK | Java 8 | TESTS | 15 | 187 | 18944000 | ||
238584339 | MarcAS | B | Dec. 23, 2023, 5:25 p.m. | OK | Java 8 | TESTS | 15 | 295 | 19660800 | ||
238593468 | ExtractStars | B | Dec. 23, 2023, 6:37 p.m. | OK | MS C++ 2017 | TESTS | 15 | 109 | 1126400 | ||
238582652 | Aditi_Khandelia | B | Dec. 23, 2023, 5:19 p.m. | OK | MS C++ 2017 | TESTS | 15 | 109 | 1228800 | ||
238592877 | ahtoh_ | B | Dec. 23, 2023, 6:31 p.m. | OK | Node.js | TESTS | 15 | 218 | 17510400 | ||
238602585 | ABC4 | B | Dec. 23, 2023, 8:35 p.m. | OK | Node.js | TESTS | 15 | 249 | 17715200 | ||
238593211 | lisashi | B | Dec. 23, 2023, 6:35 p.m. | OK | PyPy 3 | TESTS | 15 | 233 | 24883200 | ||
238598090 | lisashi | B | Dec. 23, 2023, 7:28 p.m. | OK | PyPy 3 | TESTS | 15 | 296 | 26419200 | ||
238591175 | jvatsal0709 | B | Dec. 23, 2023, 6:20 p.m. | OK | PyPy 3 | TESTS | 15 | 374 | 25702400 | ||
238593502 | Trollaxtous | B | Dec. 23, 2023, 6:37 p.m. | OK | PyPy 3 | TESTS | 15 | 390 | 26726400 | ||
238592623 | belyak_anya | B | Dec. 23, 2023, 6:29 p.m. | OK | PyPy 3 | TESTS | 15 | 514 | 27238400 | ||
238610328 | TychoElling | B | Dec. 24, 2023, 12:04 a.m. | OK | PyPy 3 | TESTS | 15 | 514 | 28979200 | ||
238604542 | rmr | B | Dec. 23, 2023, 9:08 p.m. | OK | PyPy 3-64 | TESTS | 15 | 93 | 32768000 | ||
238598764 | AyuAnchor | B | Dec. 23, 2023, 7:37 p.m. | OK | PyPy 3-64 | TESTS | 15 | 108 | 31436800 | ||
238604468 | rmr | B | Dec. 23, 2023, 9:07 p.m. | OK | PyPy 3-64 | TESTS | 15 | 109 | 32665600 | ||
238595409 | SamuelTull | B | Dec. 23, 2023, 6:56 p.m. | OK | PyPy 3-64 | TESTS | 15 | 109 | 33382400 | ||
238598134 | VitalyKo | B | Dec. 23, 2023, 7:28 p.m. | OK | PyPy 3-64 | TESTS | 15 | 109 | 34611200 | ||
238579902 | nonam33 | B | Dec. 23, 2023, 5:08 p.m. | OK | PyPy 3-64 | TESTS | 15 | 124 | 32256000 | ||
238597567 | DRDIV | B | Dec. 23, 2023, 7:20 p.m. | OK | PyPy 3-64 | TESTS | 15 | 124 | 32460800 | ||
238597099 | Mohamed_Hamed | B | Dec. 23, 2023, 7:15 p.m. | OK | PyPy 3-64 | TESTS | 15 | 124 | 33177600 | ||
238597011 | _M_H_M_ | B | Dec. 23, 2023, 7:14 p.m. | OK | PyPy 3-64 | TESTS | 15 | 124 | 33177600 | ||
238595480 | SamuelTull | B | Dec. 23, 2023, 6:56 p.m. | OK | PyPy 3-64 | TESTS | 15 | 124 | 33177600 | ||
238581196 | Jimanbanashi | B | Dec. 23, 2023, 5:13 p.m. | OK | Python 2 | TESTS | 15 | 405 | 4198400 | ||
238598075 | eugalt | B | Dec. 23, 2023, 7:27 p.m. | OK | Python 3 | TESTS | 15 | 46 | 7065600 | ||
238585354 | parthcpacc1 | B | Dec. 23, 2023, 5:28 p.m. | OK | Python 3 | TESTS | 15 | 124 | 6041600 | ||
238590968 | DrCoder9146 | B | Dec. 23, 2023, 6:19 p.m. | OK | Python 3 | TESTS | 15 | 187 | 6041600 | ||
238606199 | lapras100 | B | Dec. 23, 2023, 9:44 p.m. | OK | Python 3 | TESTS | 15 | 202 | 6144000 | ||
238606889 | The_Codegodfather | B | Dec. 23, 2023, 10:01 p.m. | OK | Python 3 | TESTS | 15 | 217 | 6041600 | ||
238578175 | rsg2100090066 | B | Dec. 23, 2023, 5:02 p.m. | OK | Python 3 | TESTS | 15 | 217 | 6041600 | ||
238608299 | maherayari24 | B | Dec. 23, 2023, 10:44 p.m. | OK | Python 3 | TESTS | 15 | 217 | 6144000 | ||
238578730 | im2belululu | B | Dec. 23, 2023, 5:04 p.m. | OK | Python 3 | TESTS | 15 | 218 | 6041600 | ||
238606210 | lapras100 | B | Dec. 23, 2023, 9:44 p.m. | OK | Python 3 | TESTS | 15 | 218 | 6144000 | ||
238607063 | Hodobox | B | Dec. 23, 2023, 10:06 p.m. | OK | Python 3 | TESTS | 15 | 233 | 6041600 | ||
238596786 | vstiff | B | Dec. 23, 2023, 7:11 p.m. | OK | Rust 2021 | TESTS | 15 | 15 | 1433600 |
Back to search problems