Educational Codeforces Round 54 (Rated for 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
1076 Educational Codeforces Round 54 (Rated for Div. 2) FINISHED False 7200 195492324 Nov. 12, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 628 ) G Array Game PROGRAMMING data structures games 2700

B"Consider a following game between two players: There is an array b_1 , b_2 , ..., b_k , consisting of positive integers. Initially a chip is placed into the first cell of the array, and b_1 is decreased by 1 . Players move in turns. Each turn the current player has to do the following: if the index of the cell where the chip is currently placed is x , then he or she has to choose an index y in [x, min(k, x + m)] such that b_y > 0 , move the chip to the cell y and decrease b_y by 1 . If it's impossible to make a valid move, the current player loses the game. Your task is the following: you are given an array a consisting of n positive integers, and q queries to it. There are two types of queries: The first line contains three integers n , m and q ( 1 <= n, q <= 2 cdot 10^5 , 1 <= m <= 5 ) -- the number of elements in a , the parameter described in the game and the number of queries, respectively. The second line contains n integers a_1 , a_2 , ..., a_n ( 1 <= a_i <= 10^{12} ) -- the elements of array a . Then q lines follow, each containing a query. There are two types of queries. The query of the first type is denoted by a line 1 l r d ( 1 <= l <= r <= n , 1 <= d <= 10^{12} ) and means that for every i in [l, r] you should increase a_i by d . The query of the second type is denoted by a line 2 l r ( 1 <= l <= r <= n ) and means that you have to determine who will win the game if it is played on the subarray of a from index l to index r (inclusive). There is at least one query of type 2 . For each query of type 2 print 1 if the first player wins in the corresponding game, or 2 if the second player wins. "...

Tutorials

E

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
53034458 Scut82 G April 20, 2019, 5:44 a.m. OK GNU C++11 TESTS 20 249 43315200 2700
53034456 Scut82 G April 20, 2019, 5:44 a.m. OK GNU C++11 TESTS 20 249 43315200 2700
48657211 ReaLNero1 G Jan. 21, 2019, 3:36 a.m. OK GNU C++11 TESTS 20 295 99840000 2700
46271095 vjudge2 G Nov. 27, 2018, 8:13 a.m. OK GNU C++11 TESTS 20 312 32665600 2700
53033937 Scut82 G April 20, 2019, 5:06 a.m. OK GNU C++11 TESTS 20 327 42496000 2700
53033935 Scut82 G April 20, 2019, 5:06 a.m. OK GNU C++11 TESTS 20 327 42496000 2700
46356742 AH_ljq G Nov. 29, 2018, 8:45 a.m. OK GNU C++11 TESTS 20 327 99840000 2700
46208000 shreya_2004 G Nov. 25, 2018, 3:31 p.m. OK GNU C++11 TESTS 20 342 7680000 2700
64696534 ddytxdy G Nov. 11, 2019, 1:30 p.m. OK GNU C++11 TESTS 20 342 41676800 2700
45801354 zhouyuyang G Nov. 16, 2018, 1:30 p.m. OK GNU C++11 TESTS 20 358 28876800 2700
61077696 beginend G Sept. 22, 2019, 3:08 p.m. OK GNU C++14 TESTS 20 389 45670400 2700
45661891 neal G Nov. 13, 2018, 7:08 a.m. OK GNU C++14 TESTS 20 390 7680000 2700
51823650 jslijin G March 25, 2019, 1:09 p.m. OK GNU C++14 TESTS 20 405 40857600 2700
45794574 NiroBC G Nov. 16, 2018, 9:39 a.m. OK GNU C++14 TESTS 20 420 28876800 2700
45668946 mayaohua2003 G Nov. 13, 2018, 9:22 a.m. OK GNU C++14 TESTS 20 467 40857600 2700
46063914 __ShaW G Nov. 22, 2018, 2:58 p.m. OK GNU C++14 TESTS 20 467 42496000 2700
46063616 __ShaW G Nov. 22, 2018, 2:45 p.m. OK GNU C++14 TESTS 20 467 42496000 2700
45785926 Drin_E G Nov. 16, 2018, 1:34 a.m. OK GNU C++14 TESTS 20 483 40038400 2700
46828473 spiderbatman G Dec. 9, 2018, 8:07 p.m. OK GNU C++14 TESTS 20 483 43315200 2700
46031492 __ShaW G Nov. 21, 2018, 1:58 p.m. OK GNU C++14 TESTS 20 514 42496000 2700
45652921 ecnerwala G Nov. 13, 2018, 3:31 a.m. OK GNU C++17 TESTS 20 374 11366400 2700
45881961 user202729_ G Nov. 17, 2018, 2:19 p.m. OK GNU C++17 TESTS 20 420 21094400 2700
45672345 johnchen902 G Nov. 13, 2018, 11:21 a.m. OK GNU C++17 TESTS 20 452 27340800 2700
45849965 Benq G Nov. 16, 2018, 10:17 p.m. OK GNU C++17 TESTS 20 467 26009600 2700
45669265 MAMBA G Nov. 13, 2018, 9:33 a.m. OK GNU C++17 TESTS 20 498 43520000 2700
45668970 MAMBA G Nov. 13, 2018, 9:23 a.m. OK GNU C++17 TESTS 20 498 43520000 2700
45829893 anpans G Nov. 16, 2018, 4:03 p.m. OK GNU C++17 TESTS 20 499 26009600 2700
46412278 SheepRanger G Nov. 30, 2018, 5:34 p.m. OK GNU C++17 TESTS 20 514 39526400 2700
67143452 arshiamoeini G Dec. 18, 2019, 7:49 a.m. OK GNU C++17 TESTS 20 654 46489600 2700
45668700 MAMBA G Nov. 13, 2018, 9:15 a.m. OK GNU C++17 TESTS 20 686 43520000 2700
67677248 dalt G Dec. 27, 2019, 3:29 a.m. OK Java 8 TESTS 20 2105 169164800 2700
68379176 kost G Jan. 7, 2020, 10:25 p.m. OK Rust TESTS 20 2449 10035200 2700

remove filters

Back to search problems