Codeforces Round 876 (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
1839 Codeforces Round 876 (Div. 2) FINISHED False 7200 51463463 June 3, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17666 ) A The Good Array PROGRAMMING greedy math

B'You are given two integers n and k . An array a_1, a_2, ldots, a_n of length n , consisting of zeroes and ones is good if for all integers i from 1 to n both of the following conditions are satisfied: Here, lceil frac{i}{k} rceil denotes the result of division of i by k , rounded up. For example, lceil frac{6}{3} rceil = 2 , lceil frac{11}{5} rceil = lceil 2.2 rceil = 3 and lceil frac{7}{4} rceil = lceil 1.75 rceil = 2 . Find the minimum possible number of ones in a good array. Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The only line of each test case contains two integers n , k ( 2 <= n <= 100 , 1 <= k <= n ) -- the length of array and parameter k from the statement. For each test case output one integer -- the minimum possible number of ones in a good array. It can be shown that under the given constraints at least one good array always exists. In the first test case, n = 3 and k = 2 : Thus, the answer is 2 . In the second test case, n = 5 and k = 2 : In the third test case, n = 9 and k = 3 : In the fourth test case, n = 7 and k = 1 . The only good array is [ , 1, 1, 1, 1, 1, 1, 1 , ] , so the answer is 7 . '...

Tutorials

Codeforces Round #876 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
208366095 ansergeyg A June 3, 2023, 8:26 p.m. OK C# 10 TESTS 3 61 2150400
208377189 makima_do A June 4, 2023, 2:18 a.m. OK C# 10 TESTS 3 92 2355200
208358496 mohitdsa03 A June 3, 2023, 6:32 p.m. OK Clang++17 Diagnostics TESTS 3 155 0
208354523 yanK A June 3, 2023, 5:50 p.m. OK Clang++20 Diagnostics TESTS 3 139 0
208341319 Subham-Maurya A June 3, 2023, 4:18 p.m. OK GNU C11 TESTS 3 31 0
208342113 prattay56 A June 3, 2023, 4:20 p.m. OK GNU C11 TESTS 3 31 0
208341906 K_Vivek_Kumar A June 3, 2023, 4:20 p.m. OK GNU C11 TESTS 3 46 0
208334036 klu_2000031318 A June 3, 2023, 3:53 p.m. OK GNU C11 TESTS 3 46 0
208356626 iffatul_anon A June 3, 2023, 6:11 p.m. OK GNU C11 TESTS 3 46 0
208334673 jayanth_20 A June 3, 2023, 3:55 p.m. OK GNU C11 TESTS 3 46 0
208338376 WASIF_74 A June 3, 2023, 4:07 p.m. OK GNU C11 TESTS 3 46 0
208339033 Sabia123Trisha A June 3, 2023, 4:09 p.m. OK GNU C11 TESTS 3 46 0
208339887 kirill483 A June 3, 2023, 4:12 p.m. OK GNU C11 TESTS 3 46 0
208340212 2000032077cse A June 3, 2023, 4:14 p.m. OK GNU C11 TESTS 3 46 0
208336971 Darpan_10 A June 3, 2023, 4:03 p.m. OK GNU C++14 TESTS 3 0 0
208386968 m99_Tanishq A June 4, 2023, 5:43 a.m. OK GNU C++14 TESTS 3 0 0
208378983 Fuad37 A June 4, 2023, 3:05 a.m. OK GNU C++14 TESTS 3 0 0
208373830 phannguyenquocbao A June 4, 2023, 12:20 a.m. OK GNU C++14 TESTS 3 0 0
208339747 HarshKh_13 A June 3, 2023, 4:12 p.m. OK GNU C++14 TESTS 3 0 0
208337316 Rashoo A June 3, 2023, 4:04 p.m. OK GNU C++14 TESTS 3 0 0
208386336 chandler1837 A June 4, 2023, 5:34 a.m. OK GNU C++14 TESTS 3 15 0
208388043 navi_here A June 4, 2023, 5:58 a.m. OK GNU C++14 TESTS 3 15 0
208388194 Dog_E A June 4, 2023, 6 a.m. OK GNU C++14 TESTS 3 15 0
208385386 Astral_Rider A June 4, 2023, 5:18 a.m. OK GNU C++14 TESTS 3 15 0
208382747 oupengfu A June 4, 2023, 4:27 a.m. OK GNU C++17 TESTS 3 0 0
208378264 md_afique A June 4, 2023, 2:47 a.m. OK GNU C++17 TESTS 3 0 0
208375107 adelian A June 4, 2023, 1:09 a.m. OK GNU C++17 TESTS 3 0 0
208374666 normalusername A June 4, 2023, 12:52 a.m. OK GNU C++17 TESTS 3 0 0
208374068 _AAhhmmeedd A June 4, 2023, 12:31 a.m. OK GNU C++17 TESTS 3 0 0
208361519 _parthiv_saikia_ A June 3, 2023, 7:14 p.m. OK GNU C++17 TESTS 3 0 0
208361772 ak5113165 A June 3, 2023, 7:18 p.m. OK GNU C++17 TESTS 3 0 0
208361337 god_or_what A June 3, 2023, 7:11 p.m. OK GNU C++17 TESTS 3 0 0
208360840 dhakaprashant666 A June 3, 2023, 7:04 p.m. OK GNU C++17 TESTS 3 0 0
208360172 Bassel_Alhomsi55 A June 3, 2023, 6:54 p.m. OK GNU C++17 TESTS 3 0 0
208385985 GreenBeer A June 4, 2023, 5:29 a.m. OK GNU C++17 (64) TESTS 3 0 0
208380260 Ceased.xp A June 4, 2023, 3:33 a.m. OK GNU C++17 (64) TESTS 3 0 0
208379879 bulletpoke A June 4, 2023, 3:24 a.m. OK GNU C++17 (64) TESTS 3 0 0
208377756 gluchie A June 4, 2023, 2:32 a.m. OK GNU C++17 (64) TESTS 3 0 0
208377699 Once_I_Liked_AGirl A June 4, 2023, 2:31 a.m. OK GNU C++17 (64) TESTS 3 0 0
208377493 Once_I_Liked_AGirl A June 4, 2023, 2:25 a.m. OK GNU C++17 (64) TESTS 3 0 0
208372429 efficient A June 3, 2023, 11:19 p.m. OK GNU C++17 (64) TESTS 3 0 0
208372018 HelmOptimum A June 3, 2023, 11:02 p.m. OK GNU C++17 (64) TESTS 3 0 0
208371931 OutOfThisWorld A June 3, 2023, 10:58 p.m. OK GNU C++17 (64) TESTS 3 0 0
208363287 TheScrasse A June 3, 2023, 7:40 p.m. OK GNU C++17 (64) TESTS 3 0 0
208381862 Hritik12 A June 4, 2023, 4:07 a.m. OK GNU C++20 (64) TESTS 3 0 0
208382625 BitwiseXOR A June 4, 2023, 4:24 a.m. OK GNU C++20 (64) TESTS 3 0 0
208382864 nilay__patel A June 4, 2023, 4:29 a.m. OK GNU C++20 (64) TESTS 3 0 0
208384844 Roshack A June 4, 2023, 5:09 a.m. OK GNU C++20 (64) TESTS 3 0 0
208384845 samurai108 A June 4, 2023, 5:09 a.m. OK GNU C++20 (64) TESTS 3 0 0
208384875 OPRao A June 4, 2023, 5:10 a.m. OK GNU C++20 (64) TESTS 3 0 0
208385070 deep_aman A June 4, 2023, 5:13 a.m. OK GNU C++20 (64) TESTS 3 0 0
208386677 406 A June 4, 2023, 5:39 a.m. OK GNU C++20 (64) TESTS 3 0 0
208386761 Misaqwwe_ A June 4, 2023, 5:40 a.m. OK GNU C++20 (64) TESTS 3 0 0
208386917 v1p3r_jr A June 4, 2023, 5:42 a.m. OK GNU C++20 (64) TESTS 3 0 0
208361868 ayane A June 3, 2023, 7:20 p.m. OK Go TESTS 3 15 102400
208340500 sobii A June 3, 2023, 4:15 p.m. OK Go TESTS 3 31 4710400
208333696 Charan_tej2409 A June 3, 2023, 3:52 p.m. OK Go TESTS 3 265 716800
208365735 InfinitePath A June 3, 2023, 8:20 p.m. OK Java 11 TESTS 3 156 0
208362205 wat2 A June 3, 2023, 7:25 p.m. OK Java 11 TESTS 3 170 0
208353098 vishal_sahu A June 3, 2023, 5:36 p.m. OK Java 11 TESTS 3 171 0
208341600 336699go A June 3, 2023, 4:19 p.m. OK Java 11 TESTS 3 171 0
208337256 yinzhusu A June 3, 2023, 4:03 p.m. OK Java 11 TESTS 3 171 0
208380443 Akhil_Chennupati A June 4, 2023, 3:36 a.m. OK Java 11 TESTS 3 186 0
208380663 mangos194 A June 4, 2023, 3:40 a.m. OK Java 11 TESTS 3 187 0
208376726 shubhargava A June 4, 2023, 2:06 a.m. OK Java 11 TESTS 3 234 0
208334992 venkataramana21 A June 3, 2023, 3:56 p.m. OK Java 11 TESTS 3 248 0
208375282 Un_sung A June 4, 2023, 1:16 a.m. OK Java 11 TESTS 3 249 0
208375858 kkz666 A June 4, 2023, 1:38 a.m. OK Java 17 TESTS 3 124 0
208342850 LeetCodeforces_Null A June 3, 2023, 4:23 p.m. OK Java 17 TESTS 3 155 102400
208377039 imsnto A June 4, 2023, 2:14 a.m. OK Java 17 TESTS 3 170 0
208334582 happy_rose A June 3, 2023, 3:55 p.m. OK Java 17 TESTS 3 186 1024000
208371976 ahmed.elbakly A June 3, 2023, 11 p.m. OK Java 17 TESTS 3 187 0
208385169 vikash_45 A June 4, 2023, 5:15 a.m. OK Java 17 TESTS 3 202 204800
208333974 rishabhkumrawat02 A June 3, 2023, 3:53 p.m. OK Java 17 TESTS 3 217 0
208376955 imsnto A June 4, 2023, 2:12 a.m. OK Java 17 TESTS 3 217 307200
208334866 Puneet1914 A June 3, 2023, 3:56 p.m. OK Java 17 TESTS 3 233 204800
208364865 rohit_nehara A June 3, 2023, 8:06 p.m. OK Java 17 TESTS 3 234 307200
208385197 Imcyj123 A June 4, 2023, 5:15 a.m. OK Java 8 TESTS 3 93 0
208341663 RahulAhuja2901 A June 3, 2023, 4:19 p.m. OK Java 8 TESTS 3 93 0
208379734 harsh_1806 A June 4, 2023, 3:21 a.m. OK Java 8 TESTS 3 108 0
208353555 tejasS-27 A June 3, 2023, 5:41 p.m. OK Java 8 TESTS 3 108 0
208359437 NerfThis A June 3, 2023, 6:44 p.m. OK Java 8 TESTS 3 109 0
208352108 Extradict A June 3, 2023, 5:26 p.m. OK Java 8 TESTS 3 109 0
208349046 raj_shahh A June 3, 2023, 5:03 p.m. OK Java 8 TESTS 3 139 38297600
208348232 vatsal_04 A June 3, 2023, 4:59 p.m. OK Java 8 TESTS 3 140 0
208340747 Asnkkzk A June 3, 2023, 4:16 p.m. OK Java 8 TESTS 3 155 0
208367677 pra1hamgup1a A June 3, 2023, 8:55 p.m. OK Java 8 TESTS 3 155 0
208351564 Mingshaozii A June 3, 2023, 5:21 p.m. OK MS C++ 2017 TESTS 3 15 0
208336762 wdploveacm A June 3, 2023, 4:02 p.m. OK MS C++ 2017 TESTS 3 31 0
208335897 SackSia A June 3, 2023, 3:59 p.m. OK MS C++ 2017 TESTS 3 31 0
208336500 pulkits03 A June 3, 2023, 4:01 p.m. OK MS C++ 2017 TESTS 3 46 0
208340596 Venkatesh_jyothula A June 3, 2023, 4:15 p.m. OK MS C++ 2017 TESTS 3 46 0
208386145 NajlSadek A June 4, 2023, 5:31 a.m. OK MS C++ 2017 TESTS 3 46 0
208342352 09062010aqbcqq A June 3, 2023, 4:21 p.m. OK MS C++ 2017 TESTS 3 46 0
208339784 EbuYandex A June 3, 2023, 4:12 p.m. OK MS C++ 2017 TESTS 3 46 0
208339261 Luiz2002 A June 3, 2023, 4:10 p.m. OK MS C++ 2017 TESTS 3 46 0
208337550 challanagasujan A June 3, 2023, 4:04 p.m. OK MS C++ 2017 TESTS 3 46 0
208336158 dylan7rdgz A June 3, 2023, 4 p.m. OK Node.js TESTS 3 186 4915200
208338302 2000030077_manvitha A June 3, 2023, 4:07 p.m. OK Perl TESTS 3 15 0
208338898 KrishnaSasank03 A June 3, 2023, 4:09 p.m. OK PHP TESTS 3 61 0
208356266 aki79 A June 3, 2023, 6:07 p.m. OK PHP TESTS 3 77 0
208355294 Ysb04 A June 3, 2023, 5:58 p.m. OK PyPy 3 TESTS 3 186 3993600
208353833 alpy123 A June 3, 2023, 5:43 p.m. OK PyPy 3 TESTS 3 217 4710400
208355145 pammuyap A June 3, 2023, 5:56 p.m. OK PyPy 3 TESTS 3 248 5017600
208349771 Sentiro A June 3, 2023, 5:07 p.m. OK PyPy 3 TESTS 3 249 5427200
208334417 monji A June 3, 2023, 3:54 p.m. OK PyPy 3 TESTS 3 249 6041600
208363386 julondonor A June 3, 2023, 7:42 p.m. OK PyPy 3 TESTS 3 264 3686400
208337146 dwaraganathan15 A June 3, 2023, 4:03 p.m. OK PyPy 3 TESTS 3 264 5632000
208336879 kKkKk1121 A June 3, 2023, 4:02 p.m. OK PyPy 3 TESTS 3 265 4403200
208348343 shadowfieend A June 3, 2023, 4:59 p.m. OK PyPy 3 TESTS 3 280 4915200
208383338 Dittu A June 4, 2023, 4:40 a.m. OK PyPy 3 TESTS 3 280 6246400
208376780 God_Man A June 4, 2023, 2:07 a.m. OK PyPy 3-64 TESTS 3 46 2764800
208357212 thuonguyenvan A June 3, 2023, 6:17 p.m. OK PyPy 3-64 TESTS 3 62 5529600
208378623 AD0 A June 4, 2023, 2:56 a.m. OK PyPy 3-64 TESTS 3 77 3891200
208361770 ossau_guildo A June 3, 2023, 7:18 p.m. OK PyPy 3-64 TESTS 3 77 4096000
208364968 AndreiZherder A June 3, 2023, 8:08 p.m. OK PyPy 3-64 TESTS 3 92 4608000
208387792 Ana_naS A June 4, 2023, 5:54 a.m. OK PyPy 3-64 TESTS 3 92 5324800
208377235 nealzane A June 4, 2023, 2:19 a.m. OK PyPy 3-64 TESTS 3 92 6246400
208349846 vedantmishra69 A June 3, 2023, 5:08 p.m. OK PyPy 3-64 TESTS 3 93 4915200
208356807 RobinFromTheHood A June 3, 2023, 6:13 p.m. OK PyPy 3-64 TESTS 3 93 5324800
208337322 magde.spb A June 3, 2023, 4:04 p.m. OK PyPy 3-64 TESTS 3 93 5632000
208383523 meta7 A June 4, 2023, 4:43 a.m. OK Python 3 TESTS 3 46 307200
208349738 yulix A June 3, 2023, 5:07 p.m. OK Python 3 TESTS 3 46 409600
208338454 Faithnhope A June 3, 2023, 4:07 p.m. OK Python 3 TESTS 3 46 819200
208382451 omUniyal A June 4, 2023, 4:20 a.m. OK Python 3 TESTS 3 62 307200
208382644 sakethp23 A June 4, 2023, 4:25 a.m. OK Python 3 TESTS 3 77 0
208381240 unabletofind A June 4, 2023, 3:53 a.m. OK Python 3 TESTS 3 77 0
208353815 astha17 A June 3, 2023, 5:43 p.m. OK Python 3 TESTS 3 77 0
208337607 Saitejakalva A June 3, 2023, 4:05 p.m. OK Python 3 TESTS 3 77 0
208335060 smam-mahdi A June 3, 2023, 3:56 p.m. OK Python 3 TESTS 3 77 0
208381985 hhh5589 A June 4, 2023, 4:09 a.m. OK Python 3 TESTS 3 77 1331200
208336541 Jeevitesh_Baluvu123 A June 3, 2023, 4:01 p.m. OK Ruby 3 TESTS 3 327 204800

remove filters

Back to search problems