Codeforces Round 799 (Div. 4)

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
1692 Codeforces Round 799 (Div. 4) FINISHED False 8100 76605899 June 14, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 34508 ) B All Distinct PROGRAMMING greedy sortings

B'Sho has an array a consisting of n integers. An operation consists of choosing two distinct indices i and j and removing a_i and a_j from the array. For example, for the array [2, 3, 4, 2, 5] , Sho can choose to remove indices 1 and 3 . After this operation, the array becomes [3, 2, 5] . Note that after any operation, the length of the array is reduced by two. After he made some operations, Sho has an array that has only distinct elements. In addition, he made operations such that the resulting array is the longest possible. More formally, the array after Sho has made his operations respects these criteria: Output the length of the final array. The first line contains a single integer t ( 1 <= q t <= q 10^3 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= q n <= q 50 ) -- the length of the array. The second line of each test case contains n integers a_i ( 1 <= q a_i <= q 10^4 ) -- the elements of the array. For each test case, output a single integer -- the length of the final array. Remember that in the final array, all elements are different, and its length is maximum. For the first test case Sho can perform operations as follows: For the second test case Sho can perform operations as follows: '...

Tutorials

Codeforces Round #799 (Div. 4) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
160683130 chrisfcoder B June 15, 2022, 2:19 a.m. OK C# 10 TESTS 3 46 3174400
160676491 bluemegane B June 14, 2022, 10:05 p.m. OK C# 8 TESTS 3 77 3072000
160665072 UCHiha_SasUKE___ B June 14, 2022, 6:36 p.m. OK Clang++17 Diagnostics TESTS 3 249 2150400
160689886 Wii B June 15, 2022, 4:33 a.m. OK FPC TESTS 3 31 409600
160694647 darkwhite0 B June 15, 2022, 5:44 a.m. OK GNU C11 TESTS 3 15 0
160690574 aniksd_01 B June 15, 2022, 4:43 a.m. OK GNU C11 TESTS 3 15 0
160654920 f20211631 B June 14, 2022, 5:08 p.m. OK GNU C11 TESTS 3 15 0
160655243 akarshan_07 B June 14, 2022, 5:10 p.m. OK GNU C11 TESTS 3 15 0
160662866 _Paradox_ B June 14, 2022, 6:13 p.m. OK GNU C11 TESTS 3 15 0
160673486 unique_asash B June 14, 2022, 8:42 p.m. OK GNU C11 TESTS 3 15 409600
160665007 MohammadDallash B June 14, 2022, 6:35 p.m. OK GNU C11 TESTS 3 30 0
160657178 manorath13 B June 14, 2022, 5:23 p.m. OK GNU C11 TESTS 3 31 0
160663038 SP2003 B June 14, 2022, 6:14 p.m. OK GNU C11 TESTS 3 31 0
160654928 wallbreaker_01 B June 14, 2022, 5:08 p.m. OK GNU C11 TESTS 3 31 0
160680753 awnb B June 15, 2022, 1:10 a.m. OK GNU C++14 TESTS 3 0 102400
160680730 Darketic B June 15, 2022, 1:09 a.m. OK GNU C++14 TESTS 3 0 102400
160673087 Simon.A.C.Yang B June 14, 2022, 8:34 p.m. OK GNU C++14 TESTS 3 0 102400
160666795 nush.kgp20 B June 14, 2022, 6:58 p.m. OK GNU C++14 TESTS 3 0 102400
160665495 _MostaFiz B June 14, 2022, 6:41 p.m. OK GNU C++14 TESTS 3 0 102400
160691292 anujnaruka02 B June 15, 2022, 4:54 a.m. OK GNU C++14 TESTS 3 0 102400
160688822 chen_zhe_ B June 15, 2022, 4:15 a.m. OK GNU C++14 TESTS 3 0 102400
160688176 Naim_Hasan_Pappu B June 15, 2022, 4:03 a.m. OK GNU C++14 TESTS 3 0 102400
160685452 Rohan27s B June 15, 2022, 3:11 a.m. OK GNU C++14 TESTS 3 0 102400
160682354 KK_1729 B June 15, 2022, 1:59 a.m. OK GNU C++14 TESTS 3 0 102400
160674950 jonatas57 B June 14, 2022, 9:16 p.m. OK GNU C++17 TESTS 3 0 0
160687628 Dr_xx_Cash B June 15, 2022, 3:54 a.m. OK GNU C++17 TESTS 3 0 0
160692263 Vgt_Dog B June 15, 2022, 5:10 a.m. OK GNU C++17 TESTS 3 0 102400
160691649 Dhruvil_Kakadiya B June 15, 2022, 5 a.m. OK GNU C++17 TESTS 3 0 102400
160691334 S_T_A_R_K B June 15, 2022, 4:55 a.m. OK GNU C++17 TESTS 3 0 102400
160691132 sushrut22 B June 15, 2022, 4:51 a.m. OK GNU C++17 TESTS 3 0 102400
160691011 Shine_mah B June 15, 2022, 4:49 a.m. OK GNU C++17 TESTS 3 0 102400
160691870 adit19shah B June 15, 2022, 5:03 a.m. OK GNU C++17 TESTS 3 0 102400
160689684 manohar_naga B June 15, 2022, 4:29 a.m. OK GNU C++17 TESTS 3 0 102400
160692165 jvhab B June 15, 2022, 5:08 a.m. OK GNU C++17 TESTS 3 0 102400
160679319 julianferres B June 15, 2022, 12:10 a.m. OK GNU C++17 (64) TESTS 3 0 0
160689918 shadow_noxx B June 15, 2022, 4:33 a.m. OK GNU C++17 (64) TESTS 3 0 0
160687865 aliasgar_45 B June 15, 2022, 3:58 a.m. OK GNU C++17 (64) TESTS 3 0 0
160682098 mayar25 B June 15, 2022, 1:51 a.m. OK GNU C++17 (64) TESTS 3 0 0
160680248 nsp-0111 B June 15, 2022, 12:51 a.m. OK GNU C++17 (64) TESTS 3 0 0
160675739 Maram B June 14, 2022, 9:39 p.m. OK GNU C++17 (64) TESTS 3 0 0
160668651 israil445 B June 14, 2022, 7:22 p.m. OK GNU C++17 (64) TESTS 3 0 0
160665294 _mikasa B June 14, 2022, 6:39 p.m. OK GNU C++17 (64) TESTS 3 0 0
160663210 Richw818 B June 14, 2022, 6:16 p.m. OK GNU C++17 (64) TESTS 3 0 0
160656827 Kural_63 B June 14, 2022, 5:20 p.m. OK GNU C++17 (64) TESTS 3 0 0
160683035 Pranav.exe B June 15, 2022, 2:17 a.m. OK GNU C++20 (64) TESTS 3 0 0
160684376 vermagautam1805 B June 15, 2022, 2:49 a.m. OK GNU C++20 (64) TESTS 3 0 0
160685490 jenish_k B June 15, 2022, 3:12 a.m. OK GNU C++20 (64) TESTS 3 0 0
160685677 necro_mancer B June 15, 2022, 3:16 a.m. OK GNU C++20 (64) TESTS 3 0 0
160686096 dibbyo_roy B June 15, 2022, 3:25 a.m. OK GNU C++20 (64) TESTS 3 0 0
160688384 the_zexplorer B June 15, 2022, 4:07 a.m. OK GNU C++20 (64) TESTS 3 0 0
160691210 pranav.cse.20001 B June 15, 2022, 4:53 a.m. OK GNU C++20 (64) TESTS 3 0 0
160691311 Akorac B June 15, 2022, 4:55 a.m. OK GNU C++20 (64) TESTS 3 0 0
160691514 raggarwalg01 B June 15, 2022, 4:58 a.m. OK GNU C++20 (64) TESTS 3 0 0
160693422 TonoY B June 15, 2022, 5:26 a.m. OK GNU C++20 (64) TESTS 3 0 0
160681968 kamannb B June 15, 2022, 1:47 a.m. OK Java 11 TESTS 3 156 0
160694124 parascoding1 B June 15, 2022, 5:37 a.m. OK Java 11 TESTS 3 170 0
160659366 deepakjoshi6102 B June 14, 2022, 5:41 p.m. OK Java 11 TESTS 3 170 0
160661151 tusharpruth B June 14, 2022, 5:56 p.m. OK Java 11 TESTS 3 171 0
160682481 JustJie B June 15, 2022, 2:02 a.m. OK Java 11 TESTS 3 171 0
160680821 b_coder1 B June 15, 2022, 1:13 a.m. OK Java 11 TESTS 3 171 0
160655982 FernandezRoberto B June 14, 2022, 5:15 p.m. OK Java 11 TESTS 3 171 0
160655873 MunirKP B June 14, 2022, 5:14 p.m. OK Java 11 TESTS 3 171 0
160676373 codebook_2000 B June 14, 2022, 10:01 p.m. OK Java 11 TESTS 3 186 0
160692755 LoudSilence B June 15, 2022, 5:16 a.m. OK Java 11 TESTS 3 186 0
160689641 _Gupta_JI_ B June 15, 2022, 4:29 a.m. OK Java 8 TESTS 3 93 0
160680070 changes561 B June 15, 2022, 12:44 a.m. OK Java 8 TESTS 3 108 0
160688535 moyan_01 B June 15, 2022, 4:10 a.m. OK Java 8 TESTS 3 108 0
160680895 ayafayed B June 15, 2022, 1:16 a.m. OK Java 8 TESTS 3 109 0
160660386 Mohamed308 B June 14, 2022, 5:50 p.m. OK Java 8 TESTS 3 109 0
160654720 WrongAnswerOnTestCase2 B June 14, 2022, 5:07 p.m. OK Java 8 TESTS 3 109 0
160682306 imsd_14 B June 15, 2022, 1:57 a.m. OK Java 8 TESTS 3 124 0
160670626 Kokot B June 14, 2022, 7:50 p.m. OK Java 8 TESTS 3 124 0
160655632 Eslam_Ahmed B June 14, 2022, 5:12 p.m. OK Java 8 TESTS 3 124 0
160695448 swaggy_baba B June 15, 2022, 5:55 a.m. OK Java 8 TESTS 3 140 0
160676990 Hakiobo B June 14, 2022, 10:21 p.m. OK Kotlin 1.4 TESTS 3 109 819200
160660173 aslamhossin B June 14, 2022, 5:48 p.m. OK Kotlin 1.6 TESTS 3 265 1228800
160655267 mohamedbakr B June 14, 2022, 5:10 p.m. OK Mono C# TESTS 3 46 6758400
160687022 A_Pier B June 15, 2022, 3:43 a.m. OK MS C++ 2017 TESTS 3 31 0
160678350 Abdelrahmanmagdi B June 14, 2022, 11:19 p.m. OK MS C++ 2017 TESTS 3 31 0
160673585 mahmoudahmad3043 B June 14, 2022, 8:44 p.m. OK MS C++ 2017 TESTS 3 31 0
160657098 danthanhhuynhpham B June 14, 2022, 5:22 p.m. OK MS C++ 2017 TESTS 3 31 0
160661081 Priyanka1505 B June 14, 2022, 5:56 p.m. OK MS C++ 2017 TESTS 3 46 0
160684411 TemporalBloom B June 15, 2022, 2:49 a.m. OK MS C++ 2017 TESTS 3 46 0
160676969 OriolBG B June 14, 2022, 10:20 p.m. OK Node.js TESTS 3 61 4198400
160670425 hxu10 B June 14, 2022, 7:47 p.m. OK PyPy 3 TESTS 3 108 2867200
160692474 ramjeeraghu B June 15, 2022, 5:13 a.m. OK PyPy 3 TESTS 3 140 3379200
160684425 islamkhan B June 15, 2022, 2:50 a.m. OK PyPy 3 TESTS 3 155 4505600
160681168 shrey_cf234 B June 15, 2022, 1:24 a.m. OK PyPy 3 TESTS 3 171 5120000
160679418 Ilya_Is2022 B June 15, 2022, 12:16 a.m. OK PyPy 3 TESTS 3 186 5017600
160693435 lakshay_jain B June 15, 2022, 5:26 a.m. OK PyPy 3 TESTS 3 186 6348800
160671966 Beerus789 B June 14, 2022, 8:14 p.m. OK PyPy 3 TESTS 3 187 6041600
160689022 thukrake_mera_pyaar B June 15, 2022, 4:19 a.m. OK PyPy 3 TESTS 3 217 7577600
160676724 osama_a_rehman B June 14, 2022, 10:12 p.m. OK PyPy 3 TESTS 3 264 6758400
160674346 crapcode B June 14, 2022, 9:02 p.m. OK PyPy 3-64 TESTS 3 61 2969600
160663866 HadesKraken B June 14, 2022, 6:23 p.m. OK PyPy 3-64 TESTS 3 62 3584000
160674863 nealzane B June 14, 2022, 9:14 p.m. OK PyPy 3-64 TESTS 3 77 2969600
160660970 iron_nicko B June 14, 2022, 5:55 p.m. OK PyPy 3-64 TESTS 3 77 3276800
160662776 gesuta B June 14, 2022, 6:12 p.m. OK PyPy 3-64 TESTS 3 77 3686400
160675247 sagamantus B June 14, 2022, 9:25 p.m. OK PyPy 3-64 TESTS 3 108 4710400
160662313 only_for_kav_tripathi B June 14, 2022, 6:07 p.m. OK PyPy 3-64 TESTS 3 108 6348800
160676049 zubra.bubra B June 14, 2022, 9:50 p.m. OK PyPy 3-64 TESTS 3 124 6758400
160684902 EpicChadGamer B June 15, 2022, 3 a.m. OK PyPy 3-64 TESTS 3 124 9932800
160661309 shubh67678 B June 14, 2022, 5:58 p.m. OK PyPy 3-64 TESTS 3 140 6553600
160690695 roshan_kumar B June 15, 2022, 4:45 a.m. OK Python 3 TESTS 3 30 0
160690956 edusanketdk B June 15, 2022, 4:48 a.m. OK Python 3 TESTS 3 31 0
160668697 ransonrobbie3 B June 14, 2022, 7:23 p.m. OK Python 3 TESTS 3 31 0
160667598 kunj_gandhi889 B June 14, 2022, 7:08 p.m. OK Python 3 TESTS 3 31 0
160665756 harsh_pahwa_ B June 14, 2022, 6:44 p.m. OK Python 3 TESTS 3 31 0
160682907 Harsh_324 B June 15, 2022, 2:13 a.m. OK Python 3 TESTS 3 46 0
160681491 Uchia_Sasuke B June 15, 2022, 1:33 a.m. OK Python 3 TESTS 3 46 0
160681371 Muhammad.Daniyal B June 15, 2022, 1:30 a.m. OK Python 3 TESTS 3 46 0
160679860 chaotic28 B June 15, 2022, 12:36 a.m. OK Python 3 TESTS 3 46 0
160679551 dbit B June 15, 2022, 12:22 a.m. OK Python 3 TESTS 3 46 0
160679156 Ayalla B June 15, 2022, 12:02 a.m. OK Ruby 3 TESTS 3 218 204800
160692887 T0RA B June 15, 2022, 5:18 a.m. OK Rust 2021 TESTS 3 0 409600
160661222 Thallium54 B June 14, 2022, 5:57 p.m. OK Rust 2021 TESTS 3 0 512000
160690688 Sempr B June 15, 2022, 4:45 a.m. OK Rust 2021 TESTS 3 0 921600
160663365 isaiah_hex B June 14, 2022, 6:17 p.m. OK Rust 2021 TESTS 3 31 409600

remove filters

Back to search problems