Codeforces Global Round 23

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
1746 Codeforces Global Round 23 FINISHED False 8100 71421863 Oct. 15, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 20061 ) A Maxmina PROGRAMMING constructive algorithms greedy

B'You have an array a of size n consisting only of zeroes and ones and an integer k . In one operation you can do one of the following: Determine if it 's possible to turn a into [1] after several (possibly zero) operations. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 1000 ). The description of the test cases follows. The first line of each test case contains two integers n and k ( 2 <= k <= n <= 50 ), the size of array a and the length of segments that you can perform second type operation on. The second line contains n integers a_{1}, a_{2}, ldots, a_{n} ( a_i is 0 or 1 ), elements of array a . For each test case, if it is possible to turn a into [1] , print "YES", otherwise print "NO". In the first test case, you can perform the second type operation on second and third elements so a becomes [0, 1] , then you can perform the second type operation on first and second elements, so a turns to [1] . In the fourth test case, it 's obvious to see that you can 't make any 1 , no matter what you do. In the fifth test case, you can first perform a type 2 operation on the first three elements so that a becomes [1, 0, 0, 1] , then perform a type 2 operation on the elements in positions two through four, so that a becomes [1, 1] , and finally perform the first type operation on the remaining elements, so that a becomes [1] . '...

Tutorials

Codeforces Global Round 23 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
176389000 hussein_billo A Oct. 15, 2022, 6:31 p.m. OK C# 10 TESTS 11 46 1843200
176431880 jay0424 A Oct. 16, 2022, 5:55 a.m. OK Clang++17 Diagnostics TESTS 11 46 0
176385956 Lazar-Wolfe A Oct. 15, 2022, 6:12 p.m. OK Clang++17 Diagnostics TESTS 11 202 7372800
176411657 ksnitc25 A Oct. 16, 2022, 1:24 a.m. OK Clang++20 Diagnostics TESTS 11 171 0

remove filters

Back to search problems