Codeforces Round 661 (Div. 3)

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
1399 Codeforces Round 661 (Div. 3) FINISHED False 8100 140541863 Aug. 5, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 29670 ) C Boats Competition PROGRAMMING brute force

B"There are n people who want to participate in a boat competition. The weight of the i -th participant is w_i . Only teams consisting of two people can participate in this competition. As an organizer, you think that it's fair to allow only teams with the same total weight. So, if there are k teams (a_1, b_1) , (a_2, b_2) , ... , (a_k, b_k) , where a_i is the weight of the first participant of the i -th team and b_i is the weight of the second participant of the i -th team, then the condition a_1 + b_1 = a_2 + b_2 = ... = a_k + b_k = s , where s is the total weight of each team, should be satisfied. Your task is to choose such s that the number of teams people can create is the maximum possible. Note that each participant can be in no more than one team. You have to answer t independent test cases. The first line of the input contains one integer t ( 1 <= t <= 1000 ) -- the number of test cases. Then t test cases follow. The first line of the test case contains one integer n ( 1 <= n <= 50 ) -- the number of participants. The second line of the test case contains n integers w_1, w_2, ... , w_n ( 1 <= w_i <= n ), where w_i is the weight of the i -th participant. For each test case, print one integer k : the maximum number of teams people can compose with the total weight s , if you choose s optimally. In the first test case of the example, we can reach the optimal answer for s=6 . Then the first boat is used by participants 1 and 5 and the second boat is used by participants 2 and 4 (indices are the same as weights). In the second test case of the example, we can reach the optimal answer for s=12 . Then first 6 participants can form 3 pairs. In the third test case of the example, we can reach the optimal answer for s=3 . The answer is 4 "...

Tutorials

Codeforces Round #661 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
90439110 vjudge1 C Aug. 20, 2020, 6:44 a.m. OK Clang++17 Diagnostics TESTS 54 156 0
90366359 pburgher C Aug. 19, 2020, 7:16 a.m. OK Clang++17 Diagnostics TESTS 54 296 5222400
89998140 fpc_coder C Aug. 15, 2020, 7:46 a.m. OK FPC TESTS 54 312 102400
91120088 nitinkumar1729 C Aug. 27, 2020, 9:26 a.m. OK GNU C11 TESTS 54 46 0
91582203 aNoobAgain C Sept. 1, 2020, 4:02 p.m. OK GNU C11 TESTS 54 46 0
90734837 prokofitch C Aug. 23, 2020, 7:23 a.m. OK GNU C11 TESTS 54 46 3891200
91318673 dongri C Aug. 30, 2020, 2:17 a.m. OK GNU C11 TESTS 54 62 0
90216161 kabir2018331125 C Aug. 17, 2020, 10:03 a.m. OK GNU C11 TESTS 54 187 307200
90054899 Chreonix C Aug. 16, 2020, 3:48 a.m. OK GNU C11 TESTS 54 202 0
91630530 jxlmane C Sept. 2, 2020, 10:10 a.m. OK GNU C11 TESTS 54 265 102400
90057160 Wenbo888 C Aug. 16, 2020, 4:57 a.m. OK GNU C11 TESTS 54 327 0
91638373 Igor_Zielinski C Sept. 2, 2020, 12:04 p.m. OK GNU C++11 TESTS 54 31 0
90018762 Juanzhang black_white_tony C Aug. 15, 2020, 12:40 p.m. OK GNU C++11 TESTS 54 31 0
90085732 luogu_bot3 C Aug. 16, 2020, 1:40 p.m. OK GNU C++11 TESTS 54 31 0
91106687 luogu_bot4 C Aug. 27, 2020, 6 a.m. OK GNU C++11 TESTS 54 46 0
91059888 luogu_bot2 C Aug. 26, 2020, 2:03 p.m. OK GNU C++11 TESTS 54 46 0
91059781 donehsf C Aug. 26, 2020, 2:02 p.m. OK GNU C++11 TESTS 54 46 0
90877196 PhoenixWright666 C Aug. 25, 2020, 7:19 a.m. OK GNU C++11 TESTS 54 46 0
90859638 thotmas123 C Aug. 24, 2020, 11:44 p.m. OK GNU C++11 TESTS 54 46 0
91663379 Emily1997 C Sept. 2, 2020, 5:27 p.m. OK GNU C++11 TESTS 54 46 0
91508939 eudanip C Aug. 31, 2020, 4:21 p.m. OK GNU C++11 TESTS 54 46 0
90868500 noveece C Aug. 25, 2020, 4:56 a.m. OK GNU C++14 TESTS 54 46 0
90497481 dragon_twister C Aug. 20, 2020, 9:55 p.m. OK GNU C++14 TESTS 54 46 0
91546432 Untitled2017 C Sept. 1, 2020, 7:52 a.m. OK GNU C++14 TESTS 54 46 0
91590623 CodeKing88 C Sept. 1, 2020, 5:56 p.m. OK GNU C++14 TESTS 54 46 0
91590683 Platinum88 C Sept. 1, 2020, 5:57 p.m. OK GNU C++14 TESTS 54 46 0
91608438 abhinav0911 C Sept. 2, 2020, 3:31 a.m. OK GNU C++14 TESTS 54 46 0
91630696 sobhanbera C Sept. 2, 2020, 10:13 a.m. OK GNU C++14 TESTS 54 46 0
91701540 subhajitt C Sept. 3, 2020, 8:46 a.m. OK GNU C++14 TESTS 54 46 0
91099209 Azrael142857 C Aug. 27, 2020, 3:03 a.m. OK GNU C++14 TESTS 54 46 0
90902095 DejaVu C Aug. 25, 2020, 1:14 p.m. OK GNU C++14 TESTS 54 46 0
91272601 gc18072001 C Aug. 29, 2020, 9:31 a.m. OK GNU C++17 TESTS 54 46 0
91643614 passawayy_ C Sept. 2, 2020, 1:16 p.m. OK GNU C++17 TESTS 54 46 0
91614195 strchar C Sept. 2, 2020, 5:42 a.m. OK GNU C++17 TESTS 54 46 0
91519709 ahmedibrahim404 C Aug. 31, 2020, 7:15 p.m. OK GNU C++17 TESTS 54 46 0
91496591 kevin_007 C Aug. 31, 2020, 1:50 p.m. OK GNU C++17 TESTS 54 46 0
91313059 pedro.racchetti C Aug. 29, 2020, 9:22 p.m. OK GNU C++17 TESTS 54 46 0
91270306 ZASAZ_Admin C Aug. 29, 2020, 8:56 a.m. OK GNU C++17 TESTS 54 46 0
91249378 newuser24324 C Aug. 29, 2020, 12:55 a.m. OK GNU C++17 TESTS 54 46 0
91121462 invtronx C Aug. 27, 2020, 9:47 a.m. OK GNU C++17 TESTS 54 46 0
90877139 QiuYu C Aug. 25, 2020, 7:18 a.m. OK GNU C++17 TESTS 54 46 0
90285391 Don_McMeMad C Aug. 18, 2020, 7:21 a.m. OK GNU C++17 (64) TESTS 54 46 0
90153134 Bielik C Aug. 16, 2020, 4:37 p.m. OK GNU C++17 (64) TESTS 54 46 0
91017342 Linter97 C Aug. 26, 2020, 4:51 a.m. OK GNU C++17 (64) TESTS 54 46 0
91041088 Swastik15 C Aug. 26, 2020, 10:29 a.m. OK GNU C++17 (64) TESTS 54 46 0
91061526 IMCV C Aug. 26, 2020, 2:19 p.m. OK GNU C++17 (64) TESTS 54 46 0
91314159 Noob_lord C Aug. 29, 2020, 10:02 p.m. OK GNU C++17 (64) TESTS 54 46 0
91579459 Catalyst259 C Sept. 1, 2020, 3:28 p.m. OK GNU C++17 (64) TESTS 54 46 0
91657939 ChethanJ C Sept. 2, 2020, 4:11 p.m. OK GNU C++17 (64) TESTS 54 46 0
91671961 Phortox C Sept. 2, 2020, 7:56 p.m. OK GNU C++17 (64) TESTS 54 46 0
91692094 Scissors_Ss C Sept. 3, 2020, 6:19 a.m. OK GNU C++17 (64) TESTS 54 46 0
91550924 BamgoeSN C Sept. 1, 2020, 9:01 a.m. OK Go TESTS 54 61 307200
90519260 CtrlCV C Aug. 21, 2020, 9:27 a.m. OK Go TESTS 54 499 10854400
90060849 B_w_c C Aug. 16, 2020, 6:23 a.m. OK Haskell TESTS 54 186 102400
91090784 stormovik C Aug. 26, 2020, 8:55 p.m. OK Java 11 TESTS 54 202 0
91044863 Smir C Aug. 26, 2020, 11:19 a.m. OK Java 11 TESTS 54 218 0
90013096 prabum07 C Aug. 15, 2020, 11:10 a.m. OK Java 11 TESTS 54 218 0
90510782 Ruins C Aug. 21, 2020, 7:33 a.m. OK Java 11 TESTS 54 218 23961600
90311438 TheManWithNoName C Aug. 18, 2020, 1:25 p.m. OK Java 11 TESTS 54 233 0
91500342 gjals1 C Aug. 31, 2020, 2:36 p.m. OK Java 11 TESTS 54 249 0
91028778 saurabhjdas786 C Aug. 26, 2020, 7:32 a.m. OK Java 11 TESTS 54 249 0
90228766 Prathmesh13 C Aug. 17, 2020, 12:46 p.m. OK Java 11 TESTS 54 249 0
90223379 ankurkandi97 C Aug. 17, 2020, 11:38 a.m. OK Java 11 TESTS 54 249 0
90629220 Miguel0312 C Aug. 21, 2020, 6:32 p.m. OK Java 11 TESTS 54 280 24473600
91264034 GortenMorsa C Aug. 29, 2020, 7:18 a.m. OK Java 8 TESTS 54 124 0
90042980 AnandOza C Aug. 15, 2020, 7:23 p.m. OK Java 8 TESTS 54 124 0
91687170 Homie_smk C Sept. 3, 2020, 4:47 a.m. OK Java 8 TESTS 54 139 0
90077998 Im_So_Fucking_Bad C Aug. 16, 2020, 11:33 a.m. OK Java 8 TESTS 54 139 0
91704002 toufique_husein C Sept. 3, 2020, 9:25 a.m. OK Java 8 TESTS 54 140 0
90466496 stevenz C Aug. 20, 2020, 1:33 p.m. OK Java 8 TESTS 54 140 0
90085348 hassanU C Aug. 16, 2020, 1:34 p.m. OK Java 8 TESTS 54 140 0
90633089 Mihir_Gajera1 C Aug. 21, 2020, 7:24 p.m. OK Java 8 TESTS 54 140 29081600
91614808 wannacry123 C Sept. 2, 2020, 5:53 a.m. OK Java 8 TESTS 54 155 0
90310652 Ernestas C Aug. 18, 2020, 1:15 p.m. OK Java 8 TESTS 54 155 0
90046828 cokifigue C Aug. 15, 2020, 9:25 p.m. OK JavaScript TESTS 54 124 3072000
91333189 Mirimax C Aug. 30, 2020, 10:17 a.m. OK Kotlin TESTS 54 171 20684800
90046735 Jothef C Aug. 15, 2020, 9:21 p.m. OK Kotlin TESTS 54 936 1433600
90175369 Mosyagin C Aug. 16, 2020, 8:14 p.m. OK Mono C# TESTS 54 78 2457600
91292486 hhsaffar C Aug. 29, 2020, 2:40 p.m. OK Mono C# TESTS 54 124 6860800
90803611 VisiOrigin C Aug. 24, 2020, 7:18 a.m. OK Mono C# TESTS 54 1762 15564800
90437807 vjudge2 C Aug. 20, 2020, 6:24 a.m. OK MS C++ TESTS 54 62 0
90467684 misha_m13 C Aug. 20, 2020, 1:48 p.m. OK MS C++ TESTS 54 1170 5427200
91703190 gao_wu_di C Sept. 3, 2020, 9:12 a.m. OK MS C++ 2017 TESTS 54 62 0
90489367 CFWudanna C Aug. 20, 2020, 6:31 p.m. OK MS C++ 2017 TESTS 54 62 512000
91551283 psb2942 C Sept. 1, 2020, 9:08 a.m. OK MS C++ 2017 TESTS 54 77 0
90470665 wei.youmn C Aug. 20, 2020, 2:22 p.m. OK MS C++ 2017 TESTS 54 78 0
90380520 jjimo C Aug. 19, 2020, 10:46 a.m. OK MS C++ 2017 TESTS 54 78 0
90448851 vjudge3 C Aug. 20, 2020, 9:08 a.m. OK MS C++ 2017 TESTS 54 78 0
90382645 544432 C Aug. 19, 2020, 11:16 a.m. OK MS C++ 2017 TESTS 54 78 0
90824235 201912100 C Aug. 24, 2020, 12:17 p.m. OK MS C++ 2017 TESTS 54 78 3686400
90425647 Sherlock_An C Aug. 20, 2020, 1 a.m. OK MS C++ 2017 TESTS 54 93 0
90443292 vjudge4 C Aug. 20, 2020, 7:47 a.m. OK MS C++ 2017 TESTS 54 93 0
91277641 yumtam C Aug. 29, 2020, 10:47 a.m. OK PyPy 2 TESTS 54 248 3174400
90308915 _k_g_ kkb_10 voidmemories C Aug. 18, 2020, 12:51 p.m. OK PyPy 2 TESTS 54 343 73113600
90183937 brettlee C Aug. 17, 2020, 1:22 a.m. OK PyPy 3 TESTS 54 280 6041600
90359216 vjudge4 C Aug. 19, 2020, 5:25 a.m. OK PyPy 3 TESTS 54 280 6860800
90446926 Polusummator C Aug. 20, 2020, 8:40 a.m. OK PyPy 3 TESTS 54 280 7065600
90009596 Gauranshu C Aug. 15, 2020, 10:19 a.m. OK PyPy 3 TESTS 54 280 7065600
90201954 greed2411 C Aug. 17, 2020, 6:52 a.m. OK PyPy 3 TESTS 54 280 8499200
90491514 ajpg307 C Aug. 20, 2020, 7:12 p.m. OK PyPy 3 TESTS 54 295 4096000
91114869 alphaomega420 C Aug. 27, 2020, 8:06 a.m. OK PyPy 3 TESTS 54 296 6348800
90359254 ryuk_kcm C Aug. 19, 2020, 5:26 a.m. OK PyPy 3 TESTS 54 296 6348800
90047855 gab_nog C Aug. 15, 2020, 10:10 p.m. OK PyPy 3 TESTS 54 296 6553600
90332532 avikram553 C Aug. 18, 2020, 5:25 p.m. OK PyPy 3 TESTS 54 296 6656000
91546497 iehn C Sept. 1, 2020, 7:53 a.m. OK Python 3 TESTS 54 655 1740800
90201926 greed2411 C Aug. 17, 2020, 6:52 a.m. OK Python 3 TESTS 54 764 307200
90865874 ajnatarajan C Aug. 25, 2020, 3:57 a.m. OK Python 3 TESTS 54 1076 307200
90701249 AlifArifin C Aug. 22, 2020, 3:53 p.m. OK Python 3 TESTS 54 1107 7372800
91236229 Dmitrii5 C Aug. 28, 2020, 6:20 p.m. OK Python 3 TESTS 54 1123 307200
90719274 HETRAKESHFADIA C Aug. 22, 2020, 10:57 p.m. OK Python 3 TESTS 54 1138 7372800
91327899 Firebat C Aug. 30, 2020, 7:57 a.m. OK Python 3 TESTS 54 1154 7270400
90455135 Excelsior4U C Aug. 20, 2020, 10:47 a.m. OK Python 3 TESTS 54 1169 614400
91066409 giacomo.degol C Aug. 26, 2020, 3:06 p.m. OK Python 3 TESTS 54 1185 409600
90325428 shubs_22 C Aug. 18, 2020, 3:59 p.m. OK Python 3 TESTS 54 1200 307200
90780556 survived C Aug. 23, 2020, 7:01 p.m. OK Rust TESTS 54 62 3788800

remove filters

Back to search problems