Good Bye 2021: 2022 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
1616 Good Bye 2021: 2022 is NEAR FINISHED False 7200 91031099 Dec. 29, 2021, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 22833 ) A Integer Diversity PROGRAMMING implementation 800

B'You are given n integers a_1, a_2, ldots, a_n . You choose any subset of the given numbers (possibly, none or all numbers) and negate these numbers (i. e. change x to (-x) ). What is the maximum number of different values in the array you can achieve? The first line of input contains one integer t ( 1 <= q t <= q 100 ): the number of test cases. The next lines contain the description of the t test cases, two lines per a test case. In the first line you are given one integer n ( 1 <= q n <= q 100 ): the number of integers in the array. The second line contains n integers a_1, a_2, ldots, a_n ( -100 <= q a_i <= q 100 ). For each test case, print one integer: the maximum number of different elements in the array that you can achieve negating numbers in the array. In the first example we can, for example, negate the first and the last numbers, achieving the array [-1, 1, 2, -2] with four different values. In the second example all three numbers are already different. In the third example negation does not change anything. '...

Tutorials

Good Bye 2021 -- Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
141131160 Bushra-borsha A Dec. 29, 2021, 6:16 p.m. OK Clang++17 Diagnostics TESTS 9 62 0 800
141177765 MUMINUR_RASHID A Dec. 30, 2021, 3:50 p.m. OK GNU C11 TESTS 9 15 0 800
141207703 Sadi123 A Dec. 31, 2021, 2:40 a.m. OK GNU C11 TESTS 9 15 0 800
141207984 zeeptobean A Dec. 31, 2021, 2:49 a.m. OK GNU C11 TESTS 9 15 0 800
141167340 rainboy A Dec. 30, 2021, 1:53 p.m. OK GNU C11 TESTS 9 15 0 800
141149056 Meghu.cnms A Dec. 30, 2021, 10:43 a.m. OK GNU C11 TESTS 9 15 0 800
141150073 Meghu.cnms A Dec. 30, 2021, 10:53 a.m. OK GNU C11 TESTS 9 15 0 800
141153195 Thalapathy_Karthick A Dec. 30, 2021, 11:23 a.m. OK GNU C11 TESTS 9 15 0 800
141159799 jitendra_777 A Dec. 30, 2021, 12:32 p.m. OK GNU C11 TESTS 9 15 0 800
141160546 H_a_c_kcode_gaurav A Dec. 30, 2021, 12:40 p.m. OK GNU C11 TESTS 9 15 0 800
141167089 jayindia024 A Dec. 30, 2021, 1:50 p.m. OK GNU C11 TESTS 9 15 0 800
141132968 kennyboi A Dec. 29, 2021, 6:30 p.m. OK GNU C++14 TESTS 9 0 0 800
141130057 A-_-A A Dec. 29, 2021, 6:08 p.m. OK GNU C++14 TESTS 9 0 0 800
141192768 Aditya_871 A Dec. 30, 2021, 6:58 p.m. OK GNU C++14 TESTS 9 0 0 800
141180022 shouvik_11 A Dec. 30, 2021, 4:18 p.m. OK GNU C++14 TESTS 9 0 0 800
141141710 DKingluvQAnh A Dec. 30, 2021, 9:15 a.m. OK GNU C++14 TESTS 9 0 0 800
141138282 StupidGuy13 A Dec. 30, 2021, 8:57 a.m. OK GNU C++14 TESTS 9 0 0 800
141208146 boat9436 A Dec. 31, 2021, 2:55 a.m. OK GNU C++14 TESTS 9 0 102400 800
141181077 walk_alone A Dec. 30, 2021, 4:31 p.m. OK GNU C++14 TESTS 9 0 102400 800
141173946 harshitgoyal A Dec. 30, 2021, 3:04 p.m. OK GNU C++14 TESTS 9 0 102400 800
141171392 rafi182916 A Dec. 30, 2021, 2:34 p.m. OK GNU C++14 TESTS 9 0 102400 800
141159298 Old_man_with_Piggy A Dec. 30, 2021, 12:27 p.m. OK GNU C++17 TESTS 9 0 0 800
141161913 O_R_E_O A Dec. 30, 2021, 12:55 p.m. OK GNU C++17 TESTS 9 0 0 800
141163731 craigfederighi A Dec. 30, 2021, 1:16 p.m. OK GNU C++17 TESTS 9 0 0 800
141166077 umangsingla617 A Dec. 30, 2021, 1:40 p.m. OK GNU C++17 TESTS 9 0 0 800
141169021 dyyyyyyyy A Dec. 30, 2021, 2:10 p.m. OK GNU C++17 TESTS 9 0 0 800
141170911 _raZu_ A Dec. 30, 2021, 2:28 p.m. OK GNU C++17 TESTS 9 0 0 800
141172824 saker.hajji A Dec. 30, 2021, 2:51 p.m. OK GNU C++17 TESTS 9 0 0 800
141179932 explore729 A Dec. 30, 2021, 4:17 p.m. OK GNU C++17 TESTS 9 0 0 800
141199214 heisenberg_5 A Dec. 30, 2021, 9:03 p.m. OK GNU C++17 TESTS 9 0 0 800
141209319 ADITYA_17 A Dec. 31, 2021, 3:35 a.m. OK GNU C++17 TESTS 9 0 0 800
141208988 InFaNg A Dec. 31, 2021, 3:26 a.m. OK GNU C++17 (64) TESTS 9 0 0 800
141193685 fuad161 A Dec. 30, 2021, 7:12 p.m. OK GNU C++17 (64) TESTS 9 0 0 800
141184209 rushabhj A Dec. 30, 2021, 5:09 p.m. OK GNU C++17 (64) TESTS 9 0 0 800
141174577 sed_life A Dec. 30, 2021, 3:11 p.m. OK GNU C++17 (64) TESTS 9 0 0 800
141173249 hara_1999 A Dec. 30, 2021, 2:56 p.m. OK GNU C++17 (64) TESTS 9 0 0 800
141167440 cringed A Dec. 30, 2021, 1:54 p.m. OK GNU C++17 (64) TESTS 9 0 0 800
141165810 Hemesh_DJ A Dec. 30, 2021, 1:37 p.m. OK GNU C++17 (64) TESTS 9 0 0 800
141210357 MoNir_ A Dec. 31, 2021, 4:05 a.m. OK GNU C++17 (64) TESTS 9 0 0 800
141165490 StAlkER05 A Dec. 30, 2021, 1:33 p.m. OK GNU C++17 (64) TESTS 9 0 0 800
141147381 lbm364dl A Dec. 30, 2021, 10:24 a.m. OK GNU C++17 (64) TESTS 9 0 0 800
141168916 deepak_changoi A Dec. 30, 2021, 2:09 p.m. OK GNU C++20 (64) TESTS 9 0 0 800
141208680 hello_NSG A Dec. 31, 2021, 3:15 a.m. OK GNU C++20 (64) TESTS 9 0 0 800
141206441 Osama.Rafat100 A Dec. 31, 2021, 1:55 a.m. OK GNU C++20 (64) TESTS 9 0 0 800
141205787 Anwar_Rizk A Dec. 31, 2021, 1:29 a.m. OK GNU C++20 (64) TESTS 9 0 0 800
141205619 wasa855 A Dec. 31, 2021, 1:22 a.m. OK GNU C++20 (64) TESTS 9 0 0 800
141188452 BlueDiamond A Dec. 30, 2021, 6 p.m. OK GNU C++20 (64) TESTS 9 0 0 800
141171520 4n0nym0us A Dec. 30, 2021, 2:35 p.m. OK GNU C++20 (64) TESTS 9 0 0 800
141169613 Sergey101 A Dec. 30, 2021, 2:15 p.m. OK GNU C++20 (64) TESTS 9 0 0 800
141166961 SpicyKong A Dec. 30, 2021, 1:49 p.m. OK GNU C++20 (64) TESTS 9 0 0 800
141162133 Vasu08 A Dec. 30, 2021, 12:58 p.m. OK GNU C++20 (64) TESTS 9 0 0 800
141142662 FlyInTheSky A Dec. 30, 2021, 9:28 a.m. OK Go TESTS 9 108 307200 800
141178101 amritagg A Dec. 30, 2021, 3:54 p.m. OK Java 11 TESTS 9 155 0 800
141157410 BiggEr. A Dec. 30, 2021, 12:07 p.m. OK Java 11 TESTS 9 155 0 800
141137987 dhruvil_8803 A Dec. 30, 2021, 8:52 a.m. OK Java 11 TESTS 9 156 0 800
141210853 Avadhesh A Dec. 31, 2021, 4:17 a.m. OK Java 11 TESTS 9 170 0 800
141142254 aayushdhakad A Dec. 30, 2021, 9:23 a.m. OK Java 11 TESTS 9 171 0 800
141172262 dhruvil_01 A Dec. 30, 2021, 2:45 p.m. OK Java 11 TESTS 9 171 0 800
141165014 ak_ankit A Dec. 30, 2021, 1:29 p.m. OK Java 11 TESTS 9 171 0 800
141150880 Aavesh A Dec. 30, 2021, 11:02 a.m. OK Java 11 TESTS 9 171 0 800
141132851 p_unit A Dec. 29, 2021, 6:29 p.m. OK Java 11 TESTS 9 171 0 800
141130836 Dhananjay22 A Dec. 29, 2021, 6:14 p.m. OK Java 11 TESTS 9 171 0 800
141166448 _Gupta_JI_ A Dec. 30, 2021, 1:43 p.m. OK Java 8 TESTS 9 78 0 800
141183273 unknownn2433 A Dec. 30, 2021, 4:58 p.m. OK Java 8 TESTS 9 93 0 800
141182950 guru1603 A Dec. 30, 2021, 4:53 p.m. OK Java 8 TESTS 9 93 0 800
141147331 pranavggupta06 A Dec. 30, 2021, 10:24 a.m. OK Java 8 TESTS 9 93 0 800
141193898 Push_back7 A Dec. 30, 2021, 7:15 p.m. OK Java 8 TESTS 9 93 0 800
141203319 durgapawani7 A Dec. 30, 2021, 11:38 p.m. OK Java 8 TESTS 9 93 0 800
141170674 cyberAce A Dec. 30, 2021, 2:26 p.m. OK Java 8 TESTS 9 108 0 800
141151887 201502010200 A Dec. 30, 2021, 11:12 a.m. OK Java 8 TESTS 9 108 0 800
141134246 ss1237 A Dec. 29, 2021, 6:43 p.m. OK Java 8 TESTS 9 108 0 800
141179814 Koka A Dec. 30, 2021, 4:15 p.m. OK Java 8 TESTS 9 108 0 800
141192980 _Astron A Dec. 30, 2021, 7:01 p.m. OK Kotlin 1.4 TESTS 9 108 0 800
141130792 Monish_San A Dec. 29, 2021, 6:13 p.m. OK Mono C# TESTS 9 46 819200 800
141163366 M7md3sam070 A Dec. 30, 2021, 1:12 p.m. OK MS C++ 2017 TESTS 9 15 0 800
141212985 Agumon A Dec. 31, 2021, 5:06 a.m. OK MS C++ 2017 TESTS 9 15 0 800
141208826 bkifhr10 A Dec. 31, 2021, 3:20 a.m. OK MS C++ 2017 TESTS 9 15 0 800
141203353 CtrlAlt A Dec. 30, 2021, 11:40 p.m. OK MS C++ 2017 TESTS 9 15 0 800
141155549 Damirca A Dec. 30, 2021, 11:46 a.m. OK MS C++ 2017 TESTS 9 15 0 800
141148496 giangnam A Dec. 30, 2021, 10:37 a.m. OK MS C++ 2017 TESTS 9 15 0 800
141146842 kgkarode930 A Dec. 30, 2021, 10:18 a.m. OK MS C++ 2017 TESTS 9 15 0 800
141141416 jV_ A Dec. 30, 2021, 9:11 a.m. OK MS C++ 2017 TESTS 9 15 0 800
141130976 Mehmet_DURMAZ A Dec. 29, 2021, 6:15 p.m. OK MS C++ 2017 TESTS 9 15 0 800
141159755 GeraltLUL A Dec. 30, 2021, 12:31 p.m. OK MS C++ 2017 TESTS 9 31 0 800
141176375 Anusha__123 A Dec. 30, 2021, 3:33 p.m. OK PyPy 3 TESTS 9 62 1536000 800
141147013 osama_a_rehman A Dec. 30, 2021, 10:20 a.m. OK PyPy 3 TESTS 9 77 1536000 800
141204087 spranjal A Dec. 31, 2021, 12:15 a.m. OK PyPy 3 TESTS 9 77 1638400 800
141168048 nikhil98 A Dec. 30, 2021, 2:01 p.m. OK PyPy 3 TESTS 9 77 2048000 800
141147698 VedantDeo A Dec. 30, 2021, 10:28 a.m. OK PyPy 3 TESTS 9 77 2150400 800
141141574 levonty A Dec. 30, 2021, 9:13 a.m. OK PyPy 3 TESTS 9 78 1536000 800
141143094 feelme A Dec. 30, 2021, 9:33 a.m. OK PyPy 3 TESTS 9 92 1945600 800
141202142 alexander.dvoreczky A Dec. 30, 2021, 10:47 p.m. OK PyPy 3 TESTS 9 93 1638400 800
141169611 vl342 A Dec. 30, 2021, 2:15 p.m. OK PyPy 3 TESTS 9 93 1740800 800
141152227 ON_THE_EDGE A Dec. 30, 2021, 11:15 a.m. OK PyPy 3 TESTS 9 93 1945600 800
141171160 Baradavka A Dec. 30, 2021, 2:31 p.m. OK PyPy 3-64 TESTS 9 77 1024000 800
141178602 ali_shafiee A Dec. 30, 2021, 4:01 p.m. OK PyPy 3-64 TESTS 9 78 1638400 800
141162752 2019286 A Dec. 30, 2021, 1:05 p.m. OK PyPy 3-64 TESTS 9 93 1433600 800
141147855 AKumar666 A Dec. 30, 2021, 10:29 a.m. OK PyPy 3-64 TESTS 9 93 1433600 800
141137928 nicku123 A Dec. 30, 2021, 8:51 a.m. OK PyPy 3-64 TESTS 9 93 1433600 800
141203055 AzulLapisLazuli A Dec. 30, 2021, 11:26 p.m. OK PyPy 3-64 TESTS 9 93 1536000 800
141147570 denk A Dec. 30, 2021, 10:26 a.m. OK PyPy 3-64 TESTS 9 93 1740800 800
141161677 strange-creator A Dec. 30, 2021, 12:52 p.m. OK PyPy 3-64 TESTS 9 93 1945600 800
141192315 abhishek402 A Dec. 30, 2021, 6:51 p.m. OK PyPy 3-64 TESTS 9 93 2867200 800
141144613 tflave A Dec. 30, 2021, 9:51 a.m. OK PyPy 3-64 TESTS 9 108 1433600 800
141195289 Ecola A Dec. 30, 2021, 7:40 p.m. OK Python 3 TESTS 9 31 0 800
141214974 mazzz A Dec. 31, 2021, 5:44 a.m. OK Python 3 TESTS 9 46 0 800
141212782 Prashant968 A Dec. 31, 2021, 5:02 a.m. OK Python 3 TESTS 9 46 0 800
141207684 Shajahansayyed A Dec. 31, 2021, 2:39 a.m. OK Python 3 TESTS 9 46 0 800
141201351 bronze_coder A Dec. 30, 2021, 10:14 p.m. OK Python 3 TESTS 9 46 0 800
141191749 md55 A Dec. 30, 2021, 6:43 p.m. OK Python 3 TESTS 9 46 0 800
141177357 danish2001 A Dec. 30, 2021, 3:45 p.m. OK Python 3 TESTS 9 46 0 800
141177215 aggarwalaashish915 A Dec. 30, 2021, 3:44 p.m. OK Python 3 TESTS 9 46 0 800
141173855 Rudolfsky A Dec. 30, 2021, 3:03 p.m. OK Python 3 TESTS 9 46 0 800
141173225 thisis_vishal A Dec. 30, 2021, 2:56 p.m. OK Python 3 TESTS 9 46 0 800
141181556 takezawa A Dec. 30, 2021, 4:36 p.m. OK Rust 2021 TESTS 9 15 102400 800
141178122 takezawa A Dec. 30, 2021, 3:55 p.m. OK Rust 2021 TESTS 9 15 102400 800
141189159 qwerty787788 A Dec. 30, 2021, 6:09 p.m. OK Rust 2021 TESTS 9 15 409600 800
141150667 Spheniscine A Dec. 30, 2021, 10:59 a.m. OK Rust 2021 TESTS 9 15 614400 800

remove filters

Back to search problems