Good Bye 2022: 2023 is NEAR

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
1770 Good Bye 2022: 2023 is NEAR FINISHED False 9000 64855463 Dec. 30, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8796 ) C Koxia and Number Theory PROGRAMMING chinese remainder theorem math number theory

B'Joi has an array a of n positive integers. Koxia wants you to determine whether there exists a positive integer x > 0 such that gcd(a_i+x,a_j+x)=1 for all 1 <= q i < j <= q n . Here gcd(y, z) denotes the greatest common divisor (GCD) of integers y and z . Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains an integer n ( 2 <= q n <= q 100 ) -- the size of the array. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 1 <= q a_i <= q {10}^{18} ). It is guaranteed that the sum of n over all test cases does not exceed 1000 . For each test case, output "YES" (without quotes) if there exists a positive integer x such that gcd(a_i+x,a_j+x)=1 for all 1 <= q i < j <= q n , and "NO" (without quotes) otherwise. You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses. In the first test case, we can set x = 4 . This is valid because: In the second test case, any choice of x makes gcd(a_1 + x, a_2 + x) = gcd(3+x,3+x)=3+x . Therefore, no such x exists. '...

Tutorials

Good Bye 2022 -- Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
187461506 Furukawa__Nagisa C Dec. 31, 2022, 3:46 p.m. OK Clang++17 Diagnostics TESTS 22 46 5222400
187386387 TheHoodieGang C Dec. 30, 2022, 8:02 p.m. OK Clang++20 Diagnostics TESTS 21 46 8396800
187407073 ruban C Dec. 31, 2022, 5:09 a.m. OK FPC TESTS 22 15 16076800
187487482 icyM3tra C Jan. 1, 2023, 1:17 a.m. OK GNU C++14 TESTS 25 0 0
187440324 linlexiao C Dec. 31, 2022, 11:38 a.m. OK GNU C++14 TESTS 22 0 0
187410595 vishal123verma C Dec. 31, 2022, 5:58 a.m. OK GNU C++14 TESTS 22 0 0
187399591 zltzlt C Dec. 31, 2022, 2:28 a.m. OK GNU C++14 TESTS 22 0 0
187382444 Akshat2003 C Dec. 30, 2022, 7:11 p.m. OK GNU C++14 TESTS 21 0 102400
187485306 Intracon C Dec. 31, 2022, 11:19 p.m. OK GNU C++14 TESTS 25 15 0
187470309 utk_6 C Dec. 31, 2022, 5:33 p.m. OK GNU C++14 TESTS 22 15 0
187466161 mann_0310 C Dec. 31, 2022, 4:43 p.m. OK GNU C++14 TESTS 22 15 0
187464473 _martynas C Dec. 31, 2022, 4:23 p.m. OK GNU C++14 TESTS 22 15 0
187462997 luogu_bot1 C Dec. 31, 2022, 4:03 p.m. OK GNU C++14 TESTS 22 15 0
187393385 DJeniUp C Dec. 30, 2022, 10:35 p.m. OK GNU C++17 TESTS 22 0 0
187459034 Thakrar_Parth C Dec. 31, 2022, 3:15 p.m. OK GNU C++17 TESTS 22 0 102400
187404545 LeNcyer C Dec. 31, 2022, 4:23 a.m. OK GNU C++17 TESTS 22 0 102400
187382623 shano123 C Dec. 30, 2022, 7:13 p.m. OK GNU C++17 TESTS 21 0 102400
187467572 MishkatIT C Dec. 31, 2022, 5:02 p.m. OK GNU C++17 TESTS 22 0 204800
187456495 gowtham_g30 C Dec. 31, 2022, 2:46 p.m. OK GNU C++17 TESTS 22 0 204800
187404410 sky9313 C Dec. 31, 2022, 4:20 a.m. OK GNU C++17 TESTS 22 0 204800
187404211 tiger_34 C Dec. 31, 2022, 4:15 a.m. OK GNU C++17 TESTS 22 0 204800
187396622 AloneInDeepWaters C Dec. 31, 2022, 12:51 a.m. OK GNU C++17 TESTS 22 0 204800
187392893 zero7 C Dec. 30, 2022, 10:18 p.m. OK GNU C++17 TESTS 22 0 204800
187488181 luanmenglei C Jan. 1, 2023, 1:47 a.m. OK GNU C++17 (64) TESTS 25 0 0
187488140 Gepengjie007 C Jan. 1, 2023, 1:46 a.m. OK GNU C++17 (64) TESTS 25 0 0
187473638 aviral10 C Dec. 31, 2022, 6:16 p.m. OK GNU C++17 (64) TESTS 24 0 0
187457537 subhadip8617 C Dec. 31, 2022, 2:58 p.m. OK GNU C++17 (64) TESTS 22 0 0
187444281 luanmenglei C Dec. 31, 2022, 12:24 p.m. OK GNU C++17 (64) TESTS 22 0 0
187436640 dimss C Dec. 31, 2022, 10:55 a.m. OK GNU C++17 (64) TESTS 22 0 0
187415735 ......77 C Dec. 31, 2022, 6:54 a.m. OK GNU C++17 (64) TESTS 22 0 0
187410016 Once_I_Liked_AGirl C Dec. 31, 2022, 5:51 a.m. OK GNU C++17 (64) TESTS 22 0 0
187407185 nik_015 C Dec. 31, 2022, 5:11 a.m. OK GNU C++17 (64) TESTS 22 0 0
187400800 Qualified C Dec. 31, 2022, 2:57 a.m. OK GNU C++17 (64) TESTS 22 0 0
187485660 SummerSS C Dec. 31, 2022, 11:35 p.m. OK GNU C++20 (64) TESTS 25 0 0
187485209 cocoadel C Dec. 31, 2022, 11:14 p.m. OK GNU C++20 (64) TESTS 25 0 0
187479741 _0Istahak C Dec. 31, 2022, 8:16 p.m. OK GNU C++20 (64) TESTS 25 0 0
187479600 kusumit C Dec. 31, 2022, 8:12 p.m. OK GNU C++20 (64) TESTS 25 0 0
187475775 opcoder_0521 C Dec. 31, 2022, 6:52 p.m. OK GNU C++20 (64) TESTS 25 0 0
187473840 gittingudder C Dec. 31, 2022, 6:18 p.m. OK GNU C++20 (64) TESTS 24 0 0
187471617 TimVen74 C Dec. 31, 2022, 5:49 p.m. OK GNU C++20 (64) TESTS 23 0 0
187468962 __Singh__ C Dec. 31, 2022, 5:18 p.m. OK GNU C++20 (64) TESTS 22 0 0
187468088 SilverSurge C Dec. 31, 2022, 5:08 p.m. OK GNU C++20 (64) TESTS 22 0 0
187464178 Nafis_Ahmed_174 C Dec. 31, 2022, 4:19 p.m. OK GNU C++20 (64) TESTS 22 0 0
187401406 0x3F C Dec. 31, 2022, 3:12 a.m. OK Go TESTS 22 15 204800
187401384 0x3F C Dec. 31, 2022, 3:11 a.m. OK Go TESTS 22 31 204800
187429708 codelegend C Dec. 31, 2022, 9:35 a.m. OK Haskell TESTS 22 62 0
187393041 tushar_104 C Dec. 30, 2022, 10:23 p.m. OK Java 11 TESTS 22 170 0
187495407 __Serendipity C Jan. 1, 2023, 5:46 a.m. OK Java 11 TESTS 25 171 0
187446177 La_Pagla C Dec. 31, 2022, 12:45 p.m. OK Java 11 TESTS 22 171 0
187394693 ahmedyasserX C Dec. 30, 2022, 11:27 p.m. OK Java 11 TESTS 22 171 0
187388131 pakkapapad C Dec. 30, 2022, 8:29 p.m. OK Java 11 TESTS 22 171 0
187393772 uttaran_das C Dec. 30, 2022, 10:51 p.m. OK Java 11 TESTS 22 187 0
187393522 uttaran_das C Dec. 30, 2022, 10:41 p.m. OK Java 11 TESTS 22 187 0
187418700 rounakchauhan70 C Dec. 31, 2022, 7:25 a.m. OK Java 11 TESTS 22 202 0
187391118 ETHANHUNTMI5 C Dec. 30, 2022, 9:31 p.m. OK Java 11 TESTS 22 218 0
187420014 Pranav_Sharda C Dec. 31, 2022, 7:40 a.m. OK Java 11 TESTS 22 233 0
187451822 Vrutik_2809 C Dec. 31, 2022, 1:49 p.m. OK Java 17 TESTS 22 186 614400
187491744 namitnayan C Jan. 1, 2023, 4:05 a.m. OK Java 17 TESTS 25 202 716800
187416994 not_just_rr C Dec. 31, 2022, 7:07 a.m. OK Java 17 TESTS 22 202 716800
187477062 cosefordes C Dec. 31, 2022, 7:17 p.m. OK Java 17 TESTS 25 218 819200
187401889 Yu_212 C Dec. 31, 2022, 3:23 a.m. OK Java 17 TESTS 22 218 921600
187441750 imprayas12 C Dec. 31, 2022, 11:55 a.m. OK Java 17 TESTS 22 265 819200
187469453 Swapniltri C Dec. 31, 2022, 5:23 p.m. OK Java 8 TESTS 22 93 0
187439749 gaju_01 C Dec. 31, 2022, 11:32 a.m. OK Java 8 TESTS 22 93 0
187385793 DeyaAbuElwan C Dec. 30, 2022, 7:54 p.m. OK Java 8 TESTS 21 108 0
187433381 gaju_01 C Dec. 31, 2022, 10:18 a.m. OK Java 8 TESTS 22 109 0
187429070 yashpandey73 C Dec. 31, 2022, 9:28 a.m. OK Java 8 TESTS 22 109 0
187406219 Cromyl C Dec. 31, 2022, 4:55 a.m. OK Java 8 TESTS 22 109 0
187400292 amit_roy C Dec. 31, 2022, 2:45 a.m. OK Java 8 TESTS 22 109 0
187443992 Mohamed308 C Dec. 31, 2022, 12:21 p.m. OK Java 8 TESTS 22 124 0
187437762 Mohamed_Ahmed C Dec. 31, 2022, 11:08 a.m. OK Java 8 TESTS 22 124 0
187424811 swarup_312 C Dec. 31, 2022, 8:39 a.m. OK Java 8 TESTS 22 124 0
187399654 Koo_Pung-Kei C Dec. 31, 2022, 2:30 a.m. OK Kotlin 1.7 TESTS 22 296 6041600
187400407 Koo_Pung-Kei C Dec. 31, 2022, 2:48 a.m. OK Kotlin 1.7 TESTS 22 374 12288000
187450664 Aksurana C Dec. 31, 2022, 1:36 p.m. OK MS C++ 2017 TESTS 22 15 0
187448058 Aksurana C Dec. 31, 2022, 1:07 p.m. OK MS C++ 2017 TESTS 22 15 0
187389806 Vitru C Dec. 30, 2022, 8:59 p.m. OK MS C++ 2017 TESTS 22 15 0
187384922 tatianyi C Dec. 30, 2022, 7:42 p.m. OK MS C++ 2017 TESTS 21 15 0
187393590 gaspar.kristijan C Dec. 30, 2022, 10:43 p.m. OK MS C++ 2017 TESTS 22 30 0
187442947 YMSeah C Dec. 31, 2022, 12:09 p.m. OK PyPy 3 TESTS 22 108 2048000
187420771 Scorsese C Dec. 31, 2022, 7:50 a.m. OK PyPy 3 TESTS 22 108 2355200
187495994 Calabash_yang C Jan. 1, 2023, 6 a.m. OK PyPy 3 TESTS 25 140 3584000
187384284 Lyle0711 C Dec. 30, 2022, 7:33 p.m. OK PyPy 3 TESTS 21 156 4710400
187438310 rajeshpenugonda C Dec. 31, 2022, 11:15 a.m. OK PyPy 3 TESTS 22 171 8294400
187471721 cholebhature C Dec. 31, 2022, 5:51 p.m. OK PyPy 3-64 TESTS 23 61 1843200
187406664 Sunayoru C Dec. 31, 2022, 5:02 a.m. OK PyPy 3-64 TESTS 22 62 1740800
187405342 Youarenotgood C Dec. 31, 2022, 4:40 a.m. OK PyPy 3-64 TESTS 22 62 2048000
187390854 JadMch C Dec. 30, 2022, 9:24 p.m. OK PyPy 3-64 TESTS 22 62 2150400
187384979 flownn C Dec. 30, 2022, 7:43 p.m. OK PyPy 3-64 TESTS 21 62 2355200
187405312 ankit_x C Dec. 31, 2022, 4:39 a.m. OK PyPy 3-64 TESTS 22 62 2457600
187396484 hvbird C Dec. 31, 2022, 12:45 a.m. OK PyPy 3-64 TESTS 22 62 2764800
187407895 gesuta C Dec. 31, 2022, 5:21 a.m. OK PyPy 3-64 TESTS 22 62 2867200
187407810 treesxg C Dec. 31, 2022, 5:20 a.m. OK PyPy 3-64 TESTS 22 62 2867200
187441731 xy961218 C Dec. 31, 2022, 11:55 a.m. OK PyPy 3-64 TESTS 22 62 3174400
187470911 mdshadesh C Dec. 31, 2022, 5:40 p.m. OK Python 3 TESTS 22 46 0
187464494 slickk C Dec. 31, 2022, 4:23 p.m. OK Python 3 TESTS 22 46 0
187445096 tgupta1729 C Dec. 31, 2022, 12:34 p.m. OK Python 3 TESTS 22 46 0
187445007 tgupta1729 C Dec. 31, 2022, 12:32 p.m. OK Python 3 TESTS 22 46 0
187397162 dung.321046 C Dec. 31, 2022, 1:10 a.m. OK Python 3 TESTS 22 46 0
187386230 Jassi_2003 C Dec. 30, 2022, 8 p.m. OK Python 3 TESTS 21 46 0
187382952 protogrammer C Dec. 30, 2022, 7:17 p.m. OK Python 3 TESTS 21 46 0
187406088 Anlx2000 C Dec. 31, 2022, 4:53 a.m. OK Python 3 TESTS 22 61 0
187387356 i_love_Ramona C Dec. 30, 2022, 8:17 p.m. OK Python 3 TESTS 22 61 0
187445062 tgupta1729 C Dec. 31, 2022, 12:33 p.m. OK Python 3 TESTS 22 62 0
187398420 IorMemorE C Dec. 31, 2022, 1:55 a.m. OK Rust 2021 TESTS 22 15 0
187401317 Spheniscine C Dec. 31, 2022, 3:09 a.m. OK Rust 2021 TESTS 22 15 102400

remove filters

Back to search problems