Codeforces Round 698 (Div. 2)

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
1478 Codeforces Round 698 (Div. 2) FINISHED False 8100 125508310 Jan. 28, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9941 ) C Nezzar and Symmetric Array PROGRAMMING constructive algorithms implementation math sortings 1700

B'Long time ago there was a symmetric array a_1,a_2, ldots,a_{2n} consisting of 2n distinct integers. Array a_1,a_2, ldots,a_{2n} is called symmetric if for each integer 1 <= i <= 2n , there exists an integer 1 <= j <= 2n such that a_i = -a_j . For each integer 1 <= i <= 2n , Nezzar wrote down an integer d_i equal to the sum of absolute differences from a_i to all integers in a , i. e. d_i = sum_{j = 1}^{2n} {|a_i - a_j|} . Now a million years has passed and Nezzar can barely remember the array d and totally forget a . Nezzar wonders if there exists any symmetric array a consisting of 2n distinct integers that generates the array d . The first line contains a single integer t ( 1 <= t <= 10^5 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= n <= 10^5 ). The second line of each test case contains 2n integers d_1, d_2, ldots, d_{2n} ( 0 <= d_i <= 10^{12} ). It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case, print "YES" in a single line if there exists a possible array a . Otherwise, print "NO". You can print letters in any case (upper or lower). In the first test case, a=[1,-3,-1,3] is one possible symmetric array that generates the array d=[8,12,8,12] . In the second test case, it can be shown that there is no symmetric array consisting of distinct integers that can generate array d . '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
105795184 qdnoip C Jan. 29, 2021, 1:43 a.m. OK Clang++17 Diagnostics TESTS 38 358 2662400 1700
105784093 Gassa C Jan. 28, 2021, 7:57 p.m. OK D TESTS 38 186 24371200 1700
105807323 cheese-cracker C Jan. 29, 2021, 5:47 a.m. OK D TESTS 38 217 13516800 1700
105760206 daut-dlang C Jan. 28, 2021, 4:31 p.m. OK D TESTS 38 217 16896000 1700
105760260 wjhh C Jan. 28, 2021, 4:31 p.m. OK FPC TESTS 38 358 6451200 1700
105775813 akash456 C Jan. 28, 2021, 6:04 p.m. OK GNU C11 TESTS 38 451 3174400 1700
105774575 74Nanashi C Jan. 28, 2021, 5:53 p.m. OK GNU C++11 TESTS 38 46 1433600 1700
105807012 fishcathu. C Jan. 29, 2021, 5:43 a.m. OK GNU C++11 TESTS 38 46 1638400 1700
105761085 DJQ C Jan. 28, 2021, 4:33 p.m. OK GNU C++11 TESTS 38 46 1638400 1700
105761665 PigeonG C Jan. 28, 2021, 4:35 p.m. OK GNU C++11 TESTS 38 46 2457600 1700
105797267 Exp_min C Jan. 29, 2021, 2:46 a.m. OK GNU C++11 TESTS 38 46 3174400 1700
105798961 qdnoip C Jan. 29, 2021, 3:25 a.m. OK GNU C++11 TESTS 38 46 3174400 1700
105798844 qdnoip C Jan. 29, 2021, 3:22 a.m. OK GNU C++11 TESTS 38 46 3174400 1700
105798630 Exp_min C Jan. 29, 2021, 3:18 a.m. OK GNU C++11 TESTS 38 46 3174400 1700
105795594 asdf1229 C Jan. 29, 2021, 1:56 a.m. OK GNU C++11 TESTS 38 46 3174400 1700
105792644 bkifhr9 C Jan. 29, 2021, 12:05 a.m. OK GNU C++11 TESTS 38 46 4812800 1700
105800050 bkifhr10 C Jan. 29, 2021, 3:48 a.m. OK GNU C++14 TESTS 38 93 1638400 1700
105772692 Rishabhv333 C Jan. 28, 2021, 5:37 p.m. OK GNU C++14 TESTS 38 93 1638400 1700
105772071 ertuan C Jan. 28, 2021, 5:33 p.m. OK GNU C++14 TESTS 38 93 1638400 1700
105765573 karimulla1098 C Jan. 28, 2021, 4:45 p.m. OK GNU C++14 TESTS 38 93 1638400 1700
105796343 illustrious_dust C Jan. 29, 2021, 2:21 a.m. OK GNU C++14 TESTS 38 93 2457600 1700
105776983 manjeet.sheoran7 C Jan. 28, 2021, 6:17 p.m. OK GNU C++14 TESTS 38 93 3174400 1700
105775672 WhalesonG0622 C Jan. 28, 2021, 6:03 p.m. OK GNU C++14 TESTS 38 93 3174400 1700
105771700 ranger2k C Jan. 28, 2021, 5:31 p.m. OK GNU C++14 TESTS 38 93 3174400 1700
105783061 abhi_sinha60 C Jan. 28, 2021, 7:40 p.m. OK GNU C++14 TESTS 38 93 3276800 1700
105766059 VivekRamnani C Jan. 28, 2021, 4:46 p.m. OK GNU C++14 TESTS 38 93 3481600 1700
105792600 colazcy C Jan. 29, 2021, 12:03 a.m. OK GNU C++17 TESTS 38 61 5324800 1700
105759836 Yuri123581321 C Jan. 28, 2021, 4:30 p.m. OK GNU C++17 TESTS 38 93 1536000 1700
105800265 Rebro C Jan. 29, 2021, 3:52 a.m. OK GNU C++17 TESTS 38 93 1638400 1700
105797018 DotCoM C Jan. 29, 2021, 2:39 a.m. OK GNU C++17 TESTS 38 93 2457600 1700
105800520 vinkle C Jan. 29, 2021, 3:57 a.m. OK GNU C++17 TESTS 38 93 3174400 1700
105791562 Matei C Jan. 28, 2021, 11:20 p.m. OK GNU C++17 TESTS 38 93 3174400 1700
105785449 1-gon C Jan. 28, 2021, 8:23 p.m. OK GNU C++17 TESTS 38 93 3174400 1700
105790945 SundayJerry C Jan. 28, 2021, 10:56 p.m. OK GNU C++17 TESTS 38 93 4300800 1700
105804328 do_not_know C Jan. 29, 2021, 5:03 a.m. OK GNU C++17 TESTS 38 93 4812800 1700
105803707 thesatyakidas.00220033 C Jan. 29, 2021, 4:53 a.m. OK GNU C++17 TESTS 38 93 4812800 1700
105795268 vjudge3 C Jan. 29, 2021, 1:46 a.m. OK GNU C++17 (64) TESTS 38 61 26112000 1700
105798403 JYJin C Jan. 29, 2021, 3:12 a.m. OK GNU C++17 (64) TESTS 38 62 1638400 1700
105785853 robosapien C Jan. 28, 2021, 8:32 p.m. OK GNU C++17 (64) TESTS 38 62 1638400 1700
105780705 RP_21 C Jan. 28, 2021, 7:05 p.m. OK GNU C++17 (64) TESTS 38 62 1638400 1700
105774247 Maksim1744 C Jan. 28, 2021, 5:50 p.m. OK GNU C++17 (64) TESTS 38 62 3993600 1700
105795283 black_white_tony C Jan. 29, 2021, 1:47 a.m. OK GNU C++17 (64) TESTS 38 62 26112000 1700
105801486 DanielMontes C Jan. 29, 2021, 4:15 a.m. OK GNU C++17 (64) TESTS 38 77 1638400 1700
105800675 vioalbert C Jan. 29, 2021, 4 a.m. OK GNU C++17 (64) TESTS 38 77 1638400 1700
105791823 BitSane C Jan. 28, 2021, 11:31 p.m. OK GNU C++17 (64) TESTS 38 77 1638400 1700
105786430 surang_orz C Jan. 28, 2021, 8:45 p.m. OK GNU C++17 (64) TESTS 38 77 1638400 1700
105803029 atishay127 C Jan. 29, 2021, 4:42 a.m. OK Java 11 TESTS 38 249 6656000 1700
105799148 michaelwang23 C Jan. 29, 2021, 3:29 a.m. OK Java 11 TESTS 38 265 9113600 1700
105788003 harshitgulati11 C Jan. 28, 2021, 9:24 p.m. OK Java 11 TESTS 38 311 7168000 1700
105782452 future_me C Jan. 28, 2021, 7:30 p.m. OK Java 11 TESTS 38 342 5632000 1700
105786450 decoder_1671 C Jan. 28, 2021, 8:46 p.m. OK Java 11 TESTS 38 343 35430400 1700
105770914 aym_05 C Jan. 28, 2021, 5:27 p.m. OK Java 11 TESTS 38 358 4710400 1700
105766423 saurabh_kl C Jan. 28, 2021, 4:46 p.m. OK Java 11 TESTS 38 373 13516800 1700
105763616 adarsh_goku C Jan. 28, 2021, 4:40 p.m. OK Java 11 TESTS 38 405 11059200 1700
105782059 BlueBirdie C Jan. 28, 2021, 7:25 p.m. OK Java 11 TESTS 38 405 18432000 1700
105777481 _merlin_ C Jan. 28, 2021, 6:23 p.m. OK Java 11 TESTS 38 420 16896000 1700
105784155 nandit C Jan. 28, 2021, 7:58 p.m. OK Java 8 TESTS 38 233 1536000 1700
105777569 Abdallah_Ragab00 C Jan. 28, 2021, 6:24 p.m. OK Java 8 TESTS 38 234 14131200 1700
105794812 bush117 C Jan. 29, 2021, 1:31 a.m. OK Java 8 TESTS 38 248 15667200 1700
105761283 maan08 C Jan. 28, 2021, 4:34 p.m. OK Java 8 TESTS 38 249 14131200 1700
105763962 blackhorse C Jan. 28, 2021, 4:41 p.m. OK Java 8 TESTS 38 249 14131200 1700
105769987 SlowLegendaryNoobMaster C Jan. 28, 2021, 5:23 p.m. OK Java 8 TESTS 38 249 16896000 1700
105783923 ElragolEl3enab C Jan. 28, 2021, 7:53 p.m. OK Java 8 TESTS 38 264 14131200 1700
105770520 gagan_6730 C Jan. 28, 2021, 5:25 p.m. OK Java 8 TESTS 38 280 10342400 1700
105771548 an09mous C Jan. 28, 2021, 5:30 p.m. OK Java 8 TESTS 38 280 13414400 1700
105804451 if_you_see_k C Jan. 29, 2021, 5:05 a.m. OK Java 8 TESTS 38 296 10547200 1700
105803523 Spheniscine C Jan. 29, 2021, 4:50 a.m. OK Kotlin TESTS 38 202 1740800 1700
105803121 Spheniscine C Jan. 29, 2021, 4:43 a.m. OK Kotlin TESTS 38 217 1945600 1700
105803378 Spheniscine C Jan. 29, 2021, 4:48 a.m. OK Kotlin TESTS 38 233 1945600 1700
105774737 arvindf232 C Jan. 28, 2021, 5:54 p.m. OK Kotlin TESTS 38 264 6144000 1700
105762568 pallav12 C Jan. 28, 2021, 4:37 p.m. OK Kotlin TESTS 38 842 54579200 1700
105803126 ch_hui C Jan. 29, 2021, 4:43 a.m. OK MS C++ 2017 TESTS 38 156 6451200 1700
105763007 cosinechicken C Jan. 28, 2021, 4:38 p.m. OK MS C++ 2017 TESTS 38 311 5939200 1700
105763035 porridge_tl C Jan. 28, 2021, 4:38 p.m. OK MS C++ 2017 TESTS 38 389 4812800 1700
105767887 Suny_ C Jan. 28, 2021, 4:49 p.m. OK MS C++ 2017 TESTS 38 546 1638400 1700
105770811 abc___cba C Jan. 28, 2021, 5:26 p.m. OK MS C++ 2017 TESTS 38 577 5939200 1700
105771625 wu_sir C Jan. 28, 2021, 5:30 p.m. OK MS C++ 2017 TESTS 38 592 1638400 1700
105762633 Ash_2k C Jan. 28, 2021, 4:37 p.m. OK MS C++ 2017 TESTS 38 592 2457600 1700
105770584 MikuSakula C Jan. 28, 2021, 5:25 p.m. OK MS C++ 2017 TESTS 38 592 3276800 1700
105771639 Kolychestiy C Jan. 28, 2021, 5:31 p.m. OK MS C++ 2017 TESTS 38 592 3993600 1700
105786249 Bidrift C Jan. 28, 2021, 8:41 p.m. OK MS C++ 2017 TESTS 38 608 5836800 1700
105762814 saratcsss C Jan. 28, 2021, 4:38 p.m. OK .NET Core C# TESTS 38 420 33689600 1700
105794030 beethoven97 C Jan. 29, 2021, 1:05 a.m. OK PyPy 2 TESTS 38 514 24371200 1700
105794040 beethoven97 C Jan. 29, 2021, 1:05 a.m. OK PyPy 2 TESTS 38 530 24473600 1700
105794064 beethoven97 C Jan. 29, 2021, 1:06 a.m. OK PyPy 2 TESTS 38 545 21094400 1700
105767184 realnimish C Jan. 28, 2021, 4:48 p.m. OK PyPy 2 TESTS 38 545 30208000 1700
105801878 grandb369 C Jan. 29, 2021, 4:22 a.m. OK PyPy 3 TESTS 38 390 25907200 1700
105770833 Kaleab_Asfaw C Jan. 28, 2021, 5:26 p.m. OK PyPy 3 TESTS 38 420 38912000 1700
105766997 donuthole C Jan. 28, 2021, 4:48 p.m. OK PyPy 3 TESTS 38 467 29798400 1700
105761984 chabeg C Jan. 28, 2021, 4:35 p.m. OK PyPy 3 TESTS 38 514 33689600 1700
105773566 stunner45 C Jan. 28, 2021, 5:44 p.m. OK PyPy 3 TESTS 38 530 30617600 1700
105779146 bhavyrajdev0 C Jan. 28, 2021, 6:44 p.m. OK PyPy 3 TESTS 38 530 33996800 1700
105792538 jimm89 C Jan. 29, 2021, 12:01 a.m. OK PyPy 3 TESTS 38 530 43008000 1700
105800324 shiviDON C Jan. 29, 2021, 3:53 a.m. OK PyPy 3 TESTS 38 545 29593600 1700
105762444 rishabhsingh054 C Jan. 28, 2021, 4:37 p.m. OK PyPy 3 TESTS 38 592 37990400 1700
105798176 srijan.sarkar C Jan. 29, 2021, 3:07 a.m. OK PyPy 3 TESTS 38 592 41779200 1700
105784675 Marshmello C Jan. 28, 2021, 8:07 p.m. OK Python 2 TESTS 38 1185 16281600 1700
105761426 tomu.hirata C Jan. 28, 2021, 4:34 p.m. OK Python 3 TESTS 38 529 18432000 1700
105800390 shiviDON C Jan. 29, 2021, 3:54 a.m. OK Python 3 TESTS 38 592 18432000 1700
105763566 pandasamanvaya C Jan. 28, 2021, 4:40 p.m. OK Python 3 TESTS 38 670 17408000 1700
105763902 hxu10 C Jan. 28, 2021, 4:40 p.m. OK Python 3 TESTS 38 670 17715200 1700
105798318 red_knife C Jan. 29, 2021, 3:10 a.m. OK Python 3 TESTS 38 998 18329600 1700
105797043 red_knife C Jan. 29, 2021, 2:40 a.m. OK Python 3 TESTS 38 1029 18329600 1700
105779459 shivam_hbtu C Jan. 28, 2021, 6:48 p.m. OK Python 3 TESTS 38 1154 18432000 1700
105779279 shivam_2018 C Jan. 28, 2021, 6:46 p.m. OK Python 3 TESTS 38 1154 18432000 1700
105798345 Amit_01 C Jan. 29, 2021, 3:11 a.m. OK Python 3 TESTS 38 1185 17408000 1700
105776238 womri1998 C Jan. 28, 2021, 6:09 p.m. OK Python 3 TESTS 38 1216 17408000 1700
105804802 satylogin C Jan. 29, 2021, 5:11 a.m. OK Rust TESTS 38 93 5529600 1700
105774136 GraphTheory C Jan. 28, 2021, 5:49 p.m. OK Rust TESTS 38 124 9318400 1700

remove filters

Back to search problems