Codeforces Round 565 (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
1176 Codeforces Round 565 (Div. 3) FINISHED False 7200 171732299 June 9, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17215 ) B Merge it! PROGRAMMING math 1100

B'You are given an array a consisting of n integers a_1, a_2, ... , a_n . In one operation you can choose two elements of the array and replace them with the element equal to their sum (it does not matter where you insert the new element). For example, from the array [2, 1, 4] you can obtain the following arrays: [3, 4] , [1, 6] and [2, 5] . Your task is to find the maximum possible number of elements divisible by 3 that are in the array after performing this operation an arbitrary (possibly, zero) number of times. You have to answer t independent queries. The first line contains one integer t ( 1 <= t <= 1000 ) -- the number of queries. The first line of each query contains one integer n ( 1 <= n <= 100 ). The second line of each query contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ). For each query print one integer in a single line -- the maximum possible number of elements divisible by 3 that are in the array after performing described operation an arbitrary (possibly, zero) number of times. In the first query of the example you can apply the following sequence of operations to obtain 3 elements divisible by 3 : [3, 1, 2, 3, 1] rightarrow [3, 3, 3, 1] . In the second query you can obtain 3 elements divisible by 3 with the following sequence of operations: [1, 1, 1, 1, 1, 2, 2] rightarrow [1, 1, 1, 1, 2, 3] rightarrow [1, 1, 1, 3, 3] rightarrow [2, 1, 3, 3] rightarrow [3, 3, 3] . '...

Tutorials

67598

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55413273 hywer B June 10, 2019, 10:20 p.m. OK Clang++17 Diagnostics TESTS 6 62 0 1100
55582431 xzxxzx401 B June 15, 2019, 7:32 a.m. OK Clang++17 Diagnostics TESTS 6 62 0 1100
55854249 kartik_ B June 21, 2019, 6:10 a.m. OK Clang++17 Diagnostics TESTS 6 62 0 1100
68868844 vjudge5 B Jan. 15, 2020, 2:28 p.m. OK Clang++17 Diagnostics TESTS 6 93 0 1100
55431704 quheyayaya B June 11, 2019, 11:45 a.m. OK Clang++17 Diagnostics TESTS 6 514 0 1100
57510447 vjudge3 B July 22, 2019, 1:35 p.m. OK Clang++17 Diagnostics TESTS 6 529 0 1100
56731345 vjudge1 B July 9, 2019, 1:39 a.m. OK Clang++17 Diagnostics TESTS 6 545 0 1100
56076221 shenqihao B June 26, 2019, 12:57 p.m. OK Clang++17 Diagnostics TESTS 6 546 0 1100
55551577 polyomino B June 14, 2019, 7:26 a.m. OK Clang++17 Diagnostics TESTS 6 561 1024000 1100
55396698 Denor B June 10, 2019, 12:06 p.m. OK Delphi TESTS 6 30 102400 1100
56154600 LaSWeeG B June 27, 2019, 9:38 a.m. OK Delphi TESTS 6 46 0 1100
59060032 Craspedacusta B Aug. 18, 2019, 9 p.m. OK FPC TESTS 6 46 0 1100
57467153 CPLNY B July 21, 2019, 4:05 p.m. OK FPC TESTS 6 46 0 1100
57325034 Meibisu B July 19, 2019, 11:45 a.m. OK FPC TESTS 6 46 0 1100
55425254 Arteni_Cristi B June 11, 2019, 8:36 a.m. OK FPC TESTS 6 46 0 1100
55995584 bin9638 B June 24, 2019, 10:12 a.m. OK FPC TESTS 6 46 102400 1100
55401154 omlgg B June 10, 2019, 2:08 p.m. OK FPC TESTS 6 62 102400 1100
57365163 sansen B July 20, 2019, 8:59 a.m. OK GNU C11 TESTS 6 15 0 1100
61583194 Samyak005 B Oct. 1, 2019, 3:19 a.m. OK GNU C11 TESTS 6 31 0 1100
65319287 DevJewel B Nov. 18, 2019, 6:53 p.m. OK GNU C11 TESTS 6 31 0 1100
66082157 vjudge5 B Dec. 1, 2019, 1:05 a.m. OK GNU C11 TESTS 6 31 0 1100
67652773 mth1908 B Dec. 26, 2019, 12:47 p.m. OK GNU C11 TESTS 6 31 0 1100
68542486 n0.0b B Jan. 10, 2020, 3:42 p.m. OK GNU C11 TESTS 6 31 0 1100
59255148 6553368 B Aug. 22, 2019, 6:16 a.m. OK GNU C11 TESTS 6 31 0 1100
60437610 Triansh B Sept. 12, 2019, 11:19 a.m. OK GNU C11 TESTS 6 31 0 1100
61047894 nikhilreddy123 B Sept. 22, 2019, 5:21 a.m. OK GNU C11 TESTS 6 31 0 1100
63979280 ivan.kraus B Nov. 1, 2019, 9:40 a.m. OK GNU C11 TESTS 6 31 0 1100
69907958 cornivores B Jan. 31, 2020, 2:37 p.m. OK GNU C++11 TESTS 6 15 0 1100
55422397 luogu_bot4 B June 11, 2019, 7:12 a.m. OK GNU C++11 TESTS 6 15 0 1100
55434141 wannaAC B June 11, 2019, 1:04 p.m. OK GNU C++11 TESTS 6 15 0 1100
55610714 ReaLNero1 B June 16, 2019, 5:32 a.m. OK GNU C++11 TESTS 6 15 0 1100
55813569 The_Crossing B June 20, 2019, 5:20 a.m. OK GNU C++11 TESTS 6 15 0 1100
56304415 loi.ys B June 30, 2019, 10:53 a.m. OK GNU C++11 TESTS 6 15 0 1100
56753023 AyoAyowei B July 9, 2019, 12:42 p.m. OK GNU C++11 TESTS 6 15 0 1100
58840268 BestMSN B Aug. 15, 2019, 1:33 a.m. OK GNU C++11 TESTS 6 15 0 1100
59119200 maximumhanyu B Aug. 20, 2019, 3:50 a.m. OK GNU C++11 TESTS 6 15 0 1100
55389258 metamorphosis00 B June 10, 2019, 8:56 a.m. OK GNU C++11 TESTS 6 15 819200 1100
55418105 k2nt B June 11, 2019, 4:21 a.m. OK GNU C++14 TESTS 6 15 0 1100
55504042 s_da_sailor B June 12, 2019, 4:45 p.m. OK GNU C++14 TESTS 6 15 0 1100
55536051 pro_gram B June 13, 2019, 4:28 p.m. OK GNU C++14 TESTS 6 15 0 1100
56261150 tokitsukaze B June 29, 2019, 8:07 a.m. OK GNU C++14 TESTS 6 15 102400 1100
64758016 NEZZ B Nov. 12, 2019, 5:47 p.m. OK GNU C++14 TESTS 6 30 0 1100
63964822 rfpermen B Nov. 1, 2019, 6:45 a.m. OK GNU C++14 TESTS 6 30 0 1100
58830250 Sajjat004 B Aug. 14, 2019, 5:36 p.m. OK GNU C++14 TESTS 6 30 0 1100
57010762 sonalangeena B July 14, 2019, 9:07 a.m. OK GNU C++14 TESTS 6 30 0 1100
56527589 aadarsh18 B July 4, 2019, 5:54 p.m. OK GNU C++14 TESTS 6 30 0 1100
56000966 Theofratus B June 24, 2019, 12:59 p.m. OK GNU C++14 TESTS 6 30 0 1100
55501408 vjudge2 B June 12, 2019, 3:17 p.m. OK GNU C++17 TESTS 6 15 307200 1100
56003601 Bjorneer B June 24, 2019, 2:17 p.m. OK GNU C++17 TESTS 6 30 0 1100
69173638 vjudge2 B Jan. 20, 2020, 7:10 a.m. OK GNU C++17 TESTS 6 30 0 1100
67464761 cdza B Dec. 23, 2019, 10:37 a.m. OK GNU C++17 TESTS 6 30 0 1100
55396789 linkhck B June 10, 2019, 12:08 p.m. OK GNU C++17 TESTS 6 30 0 1100
55411351 igba B June 10, 2019, 8:11 p.m. OK GNU C++17 TESTS 6 30 0 1100
59249574 junar B Aug. 22, 2019, 2:51 a.m. OK GNU C++17 TESTS 6 30 614400 1100
69212058 N.light2000 B Jan. 20, 2020, 8:39 p.m. OK GNU C++17 TESTS 6 31 0 1100
68943867 vjudge1 B Jan. 16, 2020, 3:23 p.m. OK GNU C++17 TESTS 6 31 0 1100
69711781 vjudge3 B Jan. 29, 2020, 7:20 a.m. OK GNU C++17 TESTS 6 31 0 1100
55939606 dandarprox B June 22, 2019, 3:50 p.m. OK Go TESTS 6 30 0 1100
58045732 sighduck B July 30, 2019, 11:10 p.m. OK Go TESTS 6 93 0 1100
55644390 nickname15 B June 16, 2019, 11:51 a.m. OK Haskell TESTS 6 234 102400 1100
55648459 nickname15 B June 16, 2019, 1:22 p.m. OK Haskell TESTS 6 249 102400 1100
58391622 vjudge4 B Aug. 6, 2019, 1:55 p.m. OK Haskell TESTS 6 280 25292800 1100
58391855 vjudge1 B Aug. 6, 2019, 2:01 p.m. OK Haskell TESTS 6 296 25190400 1100
58390980 vjudge1 B Aug. 6, 2019, 1:41 p.m. OK Haskell TESTS 6 296 25292800 1100
58391911 plavelo B Aug. 6, 2019, 2:02 p.m. OK Haskell TESTS 6 296 25292800 1100
61320464 iaro B Sept. 26, 2019, 12:25 p.m. OK Haskell TESTS 6 311 28467200 1100
67991484 satya_p54 B Dec. 31, 2019, 5:14 a.m. OK Java 11 TESTS 6 202 0 1100
66679505 phamleyennhi B Dec. 12, 2019, 12:35 p.m. OK Java 11 TESTS 6 327 0 1100
69183170 Baba-Yaga-0 B Jan. 20, 2020, 11 a.m. OK Java 11 TESTS 6 342 0 1100
55504838 kukreja-vlk B June 12, 2019, 5:13 p.m. OK Java 8 TESTS 6 108 0 1100
56754893 Exterald B July 9, 2019, 1:28 p.m. OK Java 8 TESTS 6 109 0 1100
56400599 r_sutaria B July 1, 2019, 4:39 p.m. OK Java 8 TESTS 6 109 0 1100
55430620 abhi.raj21jan B June 11, 2019, 11:15 a.m. OK Java 8 TESTS 6 109 0 1100
55421289 In_The_Name_Of_Love B June 11, 2019, 6:38 a.m. OK Java 8 TESTS 6 109 0 1100
55409816 Ahmad_Elsagheer B June 10, 2019, 6:54 p.m. OK Java 8 TESTS 6 109 0 1100
55408099 eslam.221 B June 10, 2019, 5:47 p.m. OK Java 8 TESTS 6 109 0 1100
55405699 amolpratap007 B June 10, 2019, 4:24 p.m. OK Java 8 TESTS 6 109 0 1100
55403245 Kharouba B June 10, 2019, 3:09 p.m. OK Java 8 TESTS 6 109 0 1100
55393423 darshan287 B June 10, 2019, 10:45 a.m. OK Java 8 TESTS 6 109 0 1100
56552848 I.A.K.O.V B July 5, 2019, 10:41 a.m. OK Kotlin TESTS 6 124 0 1100
56552944 I.A.K.O.V B July 5, 2019, 10:44 a.m. OK Kotlin TESTS 6 140 0 1100
55410324 Jamb0t B June 10, 2019, 7:16 p.m. OK Kotlin TESTS 6 140 0 1100
55650177 bavian B June 16, 2019, 2:11 p.m. OK Kotlin TESTS 6 233 0 1100
55415305 max_kibble B June 11, 2019, 1:31 a.m. OK Kotlin TESTS 6 233 204800 1100
55388485 sashamc B June 10, 2019, 8:38 a.m. OK Kotlin TESTS 6 234 0 1100
55390257 agogik B June 10, 2019, 9:22 a.m. OK Kotlin TESTS 6 234 204800 1100
56735108 mendel_vv B July 9, 2019, 4:38 a.m. OK Kotlin TESTS 6 249 204800 1100
56041264 Spheniscine B June 25, 2019, 2:26 p.m. OK Kotlin TESTS 6 249 1126400 1100
55423419 alex_t B June 11, 2019, 7:46 a.m. OK Kotlin TESTS 6 264 307200 1100
55611706 og.kostya B June 16, 2019, 6:14 a.m. OK Mono C# TESTS 6 46 0 1100
55403706 treasuryonly B June 10, 2019, 3:23 p.m. OK Mono C# TESTS 6 62 3072000 1100
55483373 m1_k3 B June 12, 2019, 6:36 a.m. OK Mono C# TESTS 6 77 409600 1100
55400733 TRR B June 10, 2019, 1:56 p.m. OK Mono C# TESTS 6 77 3072000 1100
55590248 maxkh B June 15, 2019, 11:55 a.m. OK Mono C# TESTS 6 77 3072000 1100
60327499 imran92 B Sept. 10, 2019, 3:05 a.m. OK Mono C# TESTS 6 77 3072000 1100
55583666 eulerscheZahl B June 15, 2019, 8:14 a.m. OK Mono C# TESTS 6 77 6758400 1100
60919104 iaro B Sept. 20, 2019, 9:44 a.m. OK Mono C# TESTS 6 92 6656000 1100
61353782 nadilk B Sept. 27, 2019, 9:35 a.m. OK Mono C# TESTS 6 93 6758400 1100
55873091 Stage1 B June 21, 2019, 3:54 p.m. OK Mono C# TESTS 6 108 6758400 1100
55433944 vjudge1 B June 11, 2019, 12:57 p.m. OK MS C++ TESTS 6 30 0 1100
69187033 vjudge5 B Jan. 20, 2020, 12:18 p.m. OK MS C++ TESTS 6 30 0 1100
68752577 vjudge2 B Jan. 14, 2020, 7:12 a.m. OK MS C++ TESTS 6 30 0 1100
57361724 vjudge5 B July 20, 2019, 7:58 a.m. OK MS C++ TESTS 6 30 0 1100
56555218 vjudge2 B July 5, 2019, 12:01 p.m. OK MS C++ TESTS 6 30 0 1100
56554300 vjudge5 B July 5, 2019, 11:37 a.m. OK MS C++ TESTS 6 30 0 1100
55545805 vjudge5 B June 14, 2019, 2:23 a.m. OK MS C++ TESTS 6 30 0 1100
56552968 vjudge4 B July 5, 2019, 10:45 a.m. OK MS C++ TESTS 6 30 102400 1100
69222491 vjudge1 B Jan. 21, 2020, 5:31 a.m. OK MS C++ TESTS 6 31 0 1100
69218655 vjudge3 B Jan. 21, 2020, 3 a.m. OK MS C++ TESTS 6 31 0 1100
56832446 lyk1012 B July 11, 2019, 7:36 a.m. OK MS C++ 2017 TESTS 6 31 0 1100
57567504 vjudge4 B July 23, 2019, 3:34 a.m. OK MS C++ 2017 TESTS 6 46 0 1100
57623564 ZSTU-2018329621261 B July 24, 2019, 6:06 a.m. OK MS C++ 2017 TESTS 6 46 0 1100
58709528 116c B Aug. 13, 2019, 11:42 a.m. OK MS C++ 2017 TESTS 6 46 0 1100
68697194 vjudge2 B Jan. 13, 2020, 8:18 a.m. OK MS C++ 2017 TESTS 6 46 0 1100
68697602 vjudge5 B Jan. 13, 2020, 8:25 a.m. OK MS C++ 2017 TESTS 6 46 0 1100
68968931 vjudge4 B Jan. 17, 2020, 6:15 a.m. OK MS C++ 2017 TESTS 6 46 0 1100
69010487 vjudge2 B Jan. 18, 2020, 3:14 a.m. OK MS C++ 2017 TESTS 6 46 0 1100
69087788 vjudge3 B Jan. 19, 2020, 8:59 a.m. OK MS C++ 2017 TESTS 6 46 0 1100
69186945 vjudge4 B Jan. 20, 2020, 12:16 p.m. OK MS C++ 2017 TESTS 6 46 0 1100
57620802 romanporsh B July 24, 2019, 4:34 a.m. OK PascalABC.NET TESTS 6 374 307200 1100
56038866 lostamok B June 25, 2019, 1:22 p.m. OK PHP TESTS 6 46 0 1100
55555672 mayakin B June 14, 2019, 9:45 a.m. OK PHP TESTS 6 46 0 1100
56038798 lostamok B June 25, 2019, 1:21 p.m. OK PHP TESTS 6 171 0 1100
58683092 -Morass- B Aug. 12, 2019, 8:11 p.m. OK PyPy 2 TESTS 6 170 2969600 1100
56520987 OverloadedCode B July 4, 2019, 2:54 p.m. OK PyPy 2 TESTS 6 186 3481600 1100
56730116 homie B July 9, 2019, 12:16 a.m. OK PyPy 2 TESTS 6 202 3891200 1100
55390674 eeeli B June 10, 2019, 9:34 a.m. OK PyPy 2 TESTS 6 202 3993600 1100
55736133 yumtam B June 19, 2019, 4:09 a.m. OK PyPy 2 TESTS 6 202 4505600 1100
56056598 OpalDshawn B June 26, 2019, 12:39 a.m. OK PyPy 2 TESTS 6 217 2662400 1100
55971261 Msarang7 B June 23, 2019, 2:56 p.m. OK PyPy 2 TESTS 6 218 3276800 1100
59385020 raj_1999 B Aug. 24, 2019, 5:56 a.m. OK PyPy 2 TESTS 6 233 4096000 1100
55586427 smunjal96 B June 15, 2019, 9:48 a.m. OK PyPy 2 TESTS 6 234 3993600 1100
56402324 gatsko B July 1, 2019, 5:27 p.m. OK PyPy 2 TESTS 6 280 11776000 1100
55531145 nivan B June 13, 2019, 1:39 p.m. OK PyPy 3 TESTS 6 217 6451200 1100
55592288 Kirillov_Alexey B June 15, 2019, 1:05 p.m. OK PyPy 3 TESTS 6 248 8601600 1100
57853357 Pokeylope B July 27, 2019, 2:02 p.m. OK PyPy 3 TESTS 6 249 5632000 1100
56385090 Rusu B July 1, 2019, 10:10 a.m. OK PyPy 3 TESTS 6 249 6246400 1100
56423292 vyassamir B July 2, 2019, 8:24 a.m. OK PyPy 3 TESTS 6 249 6656000 1100
57316885 socha B July 19, 2019, 8:32 a.m. OK PyPy 3 TESTS 6 280 5836800 1100
68993960 arp106 B Jan. 17, 2020, 4:26 p.m. OK PyPy 3 TESTS 6 280 6860800 1100
58885776 kmshihabuddin B Aug. 16, 2019, 2:05 a.m. OK PyPy 3 TESTS 6 280 8192000 1100
55393211 Aidos B June 10, 2019, 10:39 a.m. OK PyPy 3 TESTS 6 280 8294400 1100
55716206 yfo B June 18, 2019, 12:50 p.m. OK PyPy 3 TESTS 6 280 8499200 1100
55401661 lorem B June 10, 2019, 2:21 p.m. OK Python 2 TESTS 6 217 102400 1100
55608959 tang0404 B June 16, 2019, 3:58 a.m. OK Python 2 TESTS 6 218 102400 1100
55424531 29029 B June 11, 2019, 8:15 a.m. OK Python 2 TESTS 6 218 102400 1100
56282966 alexandra.ioana.alan B June 29, 2019, 5:50 p.m. OK Python 2 TESTS 6 233 0 1100
55412319 kpiiitb B June 10, 2019, 9:08 p.m. OK Python 2 TESTS 6 233 102400 1100
55393549 Madhur1906 B June 10, 2019, 10:49 a.m. OK Python 2 TESTS 6 233 102400 1100
55925794 ashu249 B June 22, 2019, 9:16 a.m. OK Python 2 TESTS 6 234 102400 1100
55686696 cagdas B June 17, 2019, 3:52 p.m. OK Python 2 TESTS 6 234 102400 1100
55428949 GayathriVenkatesh B June 11, 2019, 10:24 a.m. OK Python 2 TESTS 6 234 102400 1100
55724478 blackscholar B June 18, 2019, 4:58 p.m. OK Python 2 TESTS 6 249 102400 1100
68993686 riskingh B Jan. 17, 2020, 4:20 p.m. OK Python 3 TESTS 6 139 512000 1100
68226146 h8191 B Jan. 5, 2020, 7:13 a.m. OK Python 3 TESTS 6 140 614400 1100
58464163 robert.chinem B Aug. 8, 2019, 6:21 p.m. OK Python 3 TESTS 6 140 614400 1100
55393980 piyushohri_1 B June 10, 2019, 11 a.m. OK Python 3 TESTS 6 140 614400 1100
55431601 kafZZZ B June 11, 2019, 11:42 a.m. OK Python 3 TESTS 6 140 921600 1100
55389126 365050244 B June 10, 2019, 8:54 a.m. OK Python 3 TESTS 6 140 921600 1100
68996145 grigory51 B Jan. 17, 2020, 5:28 p.m. OK Python 3 TESTS 6 155 307200 1100
68008589 stars_in_the_sky B Dec. 31, 2019, 2:32 p.m. OK Python 3 TESTS 6 155 307200 1100
66486654 _viru_ B Dec. 8, 2019, 6:43 a.m. OK Python 3 TESTS 6 155 307200 1100
55487533 pi0110 B June 12, 2019, 8:34 a.m. OK Python 3 TESTS 6 155 307200 1100
60922306 iaro B Sept. 20, 2019, 11:07 a.m. OK Rust TESTS 6 31 102400 1100
56062414 3pointer B June 26, 2019, 6:13 a.m. OK Scala TESTS 6 498 0 1100

remove filters

Back to search problems