Codeforces Round 715 (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
1509 Codeforces Round 715 (Div. 2) FINISHED False 8100 118769111 April 16, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 26159 ) A Average Height PROGRAMMING constructive algorithms

B"Sayaka Saeki is a member of the student council, which has n other members (excluding Sayaka). The i -th member has a height of a_i millimeters. It's the end of the school year and Sayaka wants to take a picture of all other members of the student council. Being the hard-working and perfectionist girl as she is, she wants to arrange all the members in a line such that the amount of photogenic consecutive pairs of members is as large as possible. A pair of two consecutive members u and v on a line is considered photogenic if their average height is an integer, i.e. frac{a_u + a_v}{2} is an integer. Help Sayaka arrange the other members to maximize the number of photogenic consecutive pairs. The first line contains a single integer t ( 1 <= t <= 500 ) -- the number of test cases. The first line of each test case contains a single integer n ( 2 <= n <= 2000 ) -- the number of other council members. The second line of each test case contains n integers a_1 , a_2 , ..., a_n ( 1 <= a_i <= 2 cdot 10^5 ) -- the heights of each of the other members in millimeters. It is guaranteed that the sum of n over all test cases does not exceed 2000 . For each test case, output on one line n integers representing the heights of the other members in the order, which gives the largest number of photogenic consecutive pairs. If there are multiple such orders, output any of them. In the first test case, there is one photogenic pair: (1, 1) is photogenic, as frac{1+1}{2}=1 is integer, while (1, 2) isn't, as frac{1+2}{2}=1.5 isn't integer. In the second test case, both pairs are photogenic. "...

Tutorials

Codeforces Round #715 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
113264520 ashif.rabbani A April 16, 2021, 6:11 p.m. OK GNU C11 TESTS 9 30 0
113261867 Ankur1717 A April 16, 2021, 5:43 p.m. OK GNU C11 TESTS 9 30 0
113252474 Sarayu_Rangu A April 16, 2021, 4:39 p.m. OK GNU C11 TESTS 9 31 0
113249430 yashnatani29 A April 16, 2021, 4:31 p.m. OK GNU C11 TESTS 9 31 0
113294789 Ulzl00 A April 17, 2021, 5:27 a.m. OK GNU C11 TESTS 9 31 0
113292632 Adi1443 A April 17, 2021, 4:53 a.m. OK GNU C11 TESTS 9 31 0
113287973 noobdecoder A April 17, 2021, 3:25 a.m. OK GNU C11 TESTS 9 31 0
113287830 bananasarenotfruits A April 17, 2021, 3:22 a.m. OK GNU C11 TESTS 9 31 0
113269301 vats.tarang A April 16, 2021, 7:19 p.m. OK GNU C11 TESTS 9 31 0
113265996 robotdude A April 16, 2021, 6:30 p.m. OK GNU C11 TESTS 9 31 0
113289592 Nazmun_Naher A April 17, 2021, 3:56 a.m. OK GNU C++11 TESTS 9 15 0
113289461 ankit9413 A April 17, 2021, 3:54 a.m. OK GNU C++11 TESTS 9 15 0
113288831 Shahajalal22 A April 17, 2021, 3:41 a.m. OK GNU C++11 TESTS 9 15 0
113287915 firdav__002 A April 17, 2021, 3:24 a.m. OK GNU C++11 TESTS 9 15 0
113295197 tanishq1306 A April 17, 2021, 5:33 a.m. OK GNU C++11 TESTS 9 15 0
113293561 ZeesangPie A April 17, 2021, 5:09 a.m. OK GNU C++11 TESTS 9 15 0
113291647 12anitatasnim A April 17, 2021, 4:36 a.m. OK GNU C++11 TESTS 9 15 0
113290659 codebuster01 A April 17, 2021, 4:18 a.m. OK GNU C++11 TESTS 9 15 0
113290365 rhz A April 17, 2021, 4:12 a.m. OK GNU C++11 TESTS 9 15 0
113289735 panwangyang A April 17, 2021, 3:59 a.m. OK GNU C++11 TESTS 9 15 0
113283764 _Ruri_ A April 17, 2021, 1:39 a.m. OK GNU C++14 TESTS 9 15 0
113283357 tsaqifAdot A April 17, 2021, 1:24 a.m. OK GNU C++14 TESTS 9 15 0
113295392 Iklaq_ahmad A April 17, 2021, 5:35 a.m. OK GNU C++14 TESTS 9 15 0
113297404 Naseem17 A April 17, 2021, 6 a.m. OK GNU C++14 TESTS 9 15 0
113293656 lit2019070 A April 17, 2021, 5:11 a.m. OK GNU C++14 TESTS 9 15 0
113292907 bluespider A April 17, 2021, 4:58 a.m. OK GNU C++14 TESTS 9 15 0
113291928 18ucs134 A April 17, 2021, 4:41 a.m. OK GNU C++14 TESTS 9 15 0
113290738 saksham.gupta1304 A April 17, 2021, 4:19 a.m. OK GNU C++14 TESTS 9 15 0
113290339 ishika251298 A April 17, 2021, 4:12 a.m. OK GNU C++14 TESTS 9 15 0
113285211 1zerp A April 17, 2021, 2:22 a.m. OK GNU C++14 TESTS 9 15 0
113290210 Mr.TLE A April 17, 2021, 4:09 a.m. OK GNU C++17 TESTS 9 15 0
113289979 daksh_ A April 17, 2021, 4:05 a.m. OK GNU C++17 TESTS 9 15 0
113296008 noddy2.0 A April 17, 2021, 5:43 a.m. OK GNU C++17 TESTS 9 15 0
113294744 ZstuGuoYi A April 17, 2021, 5:27 a.m. OK GNU C++17 TESTS 9 15 0
113294286 TanayKulkarni A April 17, 2021, 5:20 a.m. OK GNU C++17 TESTS 9 15 0
113293485 ShlokG A April 17, 2021, 5:08 a.m. OK GNU C++17 TESTS 9 15 0
113292924 dhanyabodapati A April 17, 2021, 4:58 a.m. OK GNU C++17 TESTS 9 15 0
113292117 mrm36 A April 17, 2021, 4:44 a.m. OK GNU C++17 TESTS 9 15 0
113291211 bkifhr10 A April 17, 2021, 4:28 a.m. OK GNU C++17 TESTS 9 15 0
113290446 chinaN0.1 A April 17, 2021, 4:14 a.m. OK GNU C++17 TESTS 9 15 0
113287695 nlog A April 17, 2021, 3:19 a.m. OK GNU C++17 (64) TESTS 9 15 0
113296849 Bondo A April 17, 2021, 5:54 a.m. OK GNU C++17 (64) TESTS 9 15 0
113294625 lutljs A April 17, 2021, 5:25 a.m. OK GNU C++17 (64) TESTS 9 15 0
113293789 hossainzarif A April 17, 2021, 5:13 a.m. OK GNU C++17 (64) TESTS 9 15 0
113293033 the_tester_ A April 17, 2021, 5 a.m. OK GNU C++17 (64) TESTS 9 15 0
113291707 hello_codeforces A April 17, 2021, 4:37 a.m. OK GNU C++17 (64) TESTS 9 15 0
113291061 vjudge3 A April 17, 2021, 4:25 a.m. OK GNU C++17 (64) TESTS 9 15 0
113290343 golden.duck A April 17, 2021, 4:12 a.m. OK GNU C++17 (64) TESTS 9 15 0
113273595 AbdElrahmanTarek112 A April 16, 2021, 8:26 p.m. OK GNU C++17 (64) TESTS 9 15 0
113273265 ale_naser_pastoriza A April 16, 2021, 8:21 p.m. OK GNU C++17 (64) TESTS 9 15 0
113295512 diwakargupta815 A April 17, 2021, 5:37 a.m. OK Java 11 TESTS 9 186 0
113287070 Moaaz-Mahmoud A April 17, 2021, 3:05 a.m. OK Java 11 TESTS 9 187 0
113257892 ypa A April 16, 2021, 5:13 p.m. OK Java 11 TESTS 9 187 0
113263083 harshhrk A April 16, 2021, 5:56 p.m. OK Java 11 TESTS 9 202 0
113270701 jaynils A April 16, 2021, 7:40 p.m. OK Java 11 TESTS 9 202 0
113264361 alpha_one A April 16, 2021, 6:09 p.m. OK Java 11 TESTS 9 202 0
113296670 KGECian_23 A April 17, 2021, 5:51 a.m. OK Java 11 TESTS 9 202 0
113296471 Adi_7861 A April 17, 2021, 5:49 a.m. OK Java 11 TESTS 9 202 0
113273234 Kunal_30 A April 16, 2021, 8:21 p.m. OK Java 11 TESTS 9 217 0
113292805 teenGraph A April 17, 2021, 4:56 a.m. OK Java 11 TESTS 9 217 0
113266813 kocko A April 16, 2021, 6:41 p.m. OK Java 8 TESTS 9 109 0
113260286 akshay_3110 A April 16, 2021, 5:29 p.m. OK Java 8 TESTS 9 109 0
113278139 TheSawan A April 16, 2021, 10:12 p.m. OK Java 8 TESTS 9 109 0
113262963 _maverick A April 16, 2021, 5:55 p.m. OK Java 8 TESTS 9 109 0
113285623 sks_saurav A April 17, 2021, 2:33 a.m. OK Java 8 TESTS 9 124 0
113258152 PRIYANSH_TOMAR A April 16, 2021, 5:14 p.m. OK Java 8 TESTS 9 124 0
113293672 The_Sam A April 17, 2021, 5:11 a.m. OK Java 8 TESTS 9 124 0
113275816 RonWonWon A April 16, 2021, 9:09 p.m. OK Java 8 TESTS 9 124 0
113293340 tryingDream A April 17, 2021, 5:06 a.m. OK Java 8 TESTS 9 140 0
113279238 K0ka A April 16, 2021, 10:47 p.m. OK Java 8 TESTS 9 140 0
113290588 Mahfel A April 17, 2021, 4:16 a.m. OK JavaScript TESTS 9 15 1228800
113284859 pallav12 A April 17, 2021, 2:12 a.m. OK Kotlin TESTS 9 155 0
113286246 razdeep A April 17, 2021, 2:48 a.m. OK Kotlin TESTS 9 155 102400
113259652 abijeetshyamm A April 16, 2021, 5:24 p.m. OK Kotlin TESTS 9 170 102400
113286183 razdeep A April 17, 2021, 2:47 a.m. OK Kotlin TESTS 9 171 102400
113260199 TRR A April 16, 2021, 5:28 p.m. OK Mono C# TESTS 9 46 307200
113283478 NewLul A April 17, 2021, 1:28 a.m. OK MS C++ 2017 TESTS 9 15 307200
113258944 BrClaud A April 16, 2021, 5:19 p.m. OK MS C++ 2017 TESTS 9 30 0
113291984 tchelidze A April 17, 2021, 4:42 a.m. OK MS C++ 2017 TESTS 9 31 0
113267707 aleksikangas A April 16, 2021, 6:54 p.m. OK MS C++ 2017 TESTS 9 31 0
113249987 df1120 A April 16, 2021, 4:32 p.m. OK MS C++ 2017 TESTS 9 31 0
113284174 mban259 A April 17, 2021, 1:52 a.m. OK .NET Core C# TESTS 9 92 512000
113285650 chrisfcoder A April 17, 2021, 2:34 a.m. OK .NET Core C# TESTS 9 93 409600
113269431 blin00 A April 16, 2021, 7:21 p.m. OK PyPy 3 TESTS 9 109 2560000
113292745 not_tehlka A April 17, 2021, 4:55 a.m. OK PyPy 3 TESTS 9 124 2457600
113269931 maniram477 A April 16, 2021, 7:28 p.m. OK PyPy 3 TESTS 9 124 2457600
113288643 SPD_9X2 A April 17, 2021, 3:38 a.m. OK PyPy 3 TESTS 9 124 2867200
113258031 akshitm16 A April 16, 2021, 5:13 p.m. OK PyPy 3 TESTS 9 124 2867200
113284565 Liberator187 A April 17, 2021, 2:03 a.m. OK PyPy 3 TESTS 9 124 2969600
113286266 majay1638 A April 17, 2021, 2:48 a.m. OK PyPy 3 TESTS 9 124 3276800
113275342 Munchy_1 A April 16, 2021, 8:59 p.m. OK PyPy 3 TESTS 9 124 3788800
113265429 AlexMayhem A April 16, 2021, 6:22 p.m. OK PyPy 3 TESTS 9 139 3584000
113294956 satyamshree22 A April 17, 2021, 5:30 a.m. OK PyPy 3 TESTS 9 139 3788800
113297289 spiderAddict A April 17, 2021, 5:59 a.m. OK Python 3 TESTS 9 61 0
113293704 Saucemaster102 A April 17, 2021, 5:11 a.m. OK Python 3 TESTS 9 62 0
113292413 sriramadheeraj A April 17, 2021, 4:49 a.m. OK Python 3 TESTS 9 62 0
113289031 delta1908 A April 17, 2021, 3:46 a.m. OK Python 3 TESTS 9 62 0
113285534 ankurg A April 17, 2021, 2:31 a.m. OK Python 3 TESTS 9 62 0
113269939 agarus A April 16, 2021, 7:28 p.m. OK Python 3 TESTS 9 62 0
113268639 shivam_hbtu A April 16, 2021, 7:09 p.m. OK Python 3 TESTS 9 62 0
113266695 coder_abhi_2000 A April 16, 2021, 6:39 p.m. OK Python 3 TESTS 9 62 0
113266110 Aadat_se_majboor A April 16, 2021, 6:31 p.m. OK Python 3 TESTS 9 62 0
113265687 anshjain A April 16, 2021, 6:26 p.m. OK Python 3 TESTS 9 62 0

remove filters

Back to search problems