Bubble Cup 9 - Finals [Online Mirror]

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
717 Bubble Cup 9 - Finals [Online Mirror] FINISHED False 18000 302821223 Sept. 11, 2016, 9 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 380 ) F Heroes of Making Magic III PROGRAMMING data structures 2700

I’m strolling on sunshine, yeah-ah! And doesn’t it feel good! Well, it certainly feels good for our Heroes of Making Magic, who are casually walking on a one-directional road, fighting imps. Imps are weak and feeble creatures and they are not good at much. However, Heroes enjoy fighting them. For fun, if nothing else. Our Hero, Ignatius, simply adores imps. He is observing a line of imps, represented as a zero-indexed array of integers a of length n , where a i denotes the number of imps at the i -th position. Sometimes, imps can appear out of nowhere. When heroes fight imps, they select a segment of the line, start at one end of the segment, and finish on the other end, without ever exiting the segment. They can move exactly one cell left or right from their current position and when they do so, they defeat one imp on the cell that they moved to, so, the number of imps on that cell decreases by one. This also applies when heroes appear at one end of the segment, at the beginning of their walk. Their goal is to defeat all imps on the segment, without ever moving to an empty cell in it (without imps), since they would get bored. Since Ignatius loves imps, he doesn’t really want to fight them, so no imps are harmed during the events of this task. However, he would like you to tell him whether it would be possible for him to clear a certain segment of imps in the above mentioned way if he wanted to. You are given q queries, which have two types: 1 a b k — denotes that k imps appear at each cell from the interval a , b 2 a b - asks whether Ignatius could defeat all imps on the interval a , b in the way described above The first line contains a single integer n ( 1 ≤ n ≤ 200 000 ), the length of the array a . The following line contains n integers a 1 , a 2 , ..., a n ( 0 ≤ a i ≤ 5 000 ), the initial number of imps in each cell. The third line contains a single integer q ( 1 ≤ q ≤ 300 000 ), the number of queries. The remaining q lines contain one query

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
25287589 Dylans F March 6, 2017, 9:44 a.m. OK GNU C++ TESTS 11 280 13721600 2700
20786160 AkaneSasu F Sept. 20, 2016, 11:33 p.m. OK GNU C++ TESTS 11 343 13414400 2700
20671160 liujunhao F Sept. 17, 2016, 1:44 a.m. OK GNU C++ TESTS 11 358 5632000 2700
20671113 yuanxinyu402 F Sept. 17, 2016, 1:39 a.m. OK GNU C++ TESTS 11 358 5632000 2700
20671754 Totoro F Sept. 17, 2016, 2:49 a.m. OK GNU C++ TESTS 11 483 16896000 2700
41277507 vjudge3 F Aug. 6, 2018, 2:01 p.m. OK GNU C++ TESTS 11 546 21094400 2700
20610905 kiiiiii F Sept. 14, 2016, 9:58 a.m. OK GNU C++ TESTS 11 592 23040000 2700
23534148 vjudge5 F Jan. 4, 2017, 11:27 a.m. OK GNU C++ TESTS 11 592 25292800 2700
20564410 lichang F Sept. 13, 2016, 10:20 a.m. OK GNU C++ TESTS 11 670 39116800 2700
20562930 Talon_F F Sept. 13, 2016, 8:50 a.m. OK GNU C++ TESTS 11 670 41062400 2700
40983647 ReaLNero1 F July 30, 2018, 6:58 p.m. OK GNU C++11 TESTS 11 264 11673600 2700
23681111 petrescu F Jan. 10, 2017, 12:56 p.m. OK GNU C++11 TESTS 11 311 13721600 2700
50591713 xielinhan F Feb. 28, 2019, 7:51 a.m. OK GNU C++11 TESTS 11 420 15257600 2700
33522761 vjudge2 F Dec. 23, 2017, 1:15 a.m. OK GNU C++11 TESTS 11 436 17305600 2700
41271526 nickluo F Aug. 6, 2018, 10:37 a.m. OK GNU C++11 TESTS 11 483 12800000 2700
20532495 andrew.volchek netman teleport F Sept. 11, 2016, 1:24 p.m. OK GNU C++11 TESTS 11 483 27238400 2700
20530605 V--o_o--V Flyrise LHiC F Sept. 11, 2016, 12:08 p.m. OK GNU C++11 TESTS 11 483 30310400 2700
20617591 rqgao2014 F Sept. 14, 2016, 2:11 p.m. OK GNU C++11 TESTS 11 498 26419200 2700
57915514 luogu_bot3 F July 29, 2019, 12:55 a.m. OK GNU C++11 TESTS 11 514 14438400 2700
57879164 lopare F July 28, 2019, 6:57 a.m. OK GNU C++11 TESTS 11 514 21094400 2700
57880751 melancholic_fat_otaku F July 28, 2019, 7:40 a.m. OK GNU C++14 TESTS 11 436 10035200 2700
42308509 Taizong F Aug. 31, 2018, 12:49 p.m. OK GNU C++14 TESTS 11 561 14438400 2700
42308476 Taizong F Aug. 31, 2018, 12:48 p.m. OK GNU C++14 TESTS 11 561 14438400 2700
63906620 little_waxberry F Oct. 31, 2019, 6:50 a.m. OK GNU C++14 TESTS 11 561 28057600 2700
28322863 t90tank F July 6, 2017, 9:50 a.m. OK GNU C++14 TESTS 11 608 27545600 2700
22941891 NiroBC F Dec. 14, 2016, 5:19 a.m. OK GNU C++14 TESTS 11 623 22630400 2700
23378661 Ali.Pi F Dec. 28, 2016, 1:23 p.m. OK GNU C++14 TESTS 11 639 28364800 2700
27349932 yutaka1999 F May 26, 2017, 6:45 a.m. OK GNU C++14 TESTS 11 654 16793600 2700
31621179 wzf2000 F Oct. 23, 2017, 6:48 a.m. OK GNU C++14 TESTS 11 670 17203200 2700
25272762 romanasa F March 5, 2017, 7:47 p.m. OK GNU C++14 TESTS 11 701 34406400 2700
66555891 c0ontang17 F Dec. 9, 2019, 4:46 p.m. OK GNU C++17 TESTS 11 607 28057600 2700
66315853 hjk1030 F Dec. 5, 2019, 1:03 p.m. OK GNU C++17 TESTS 11 607 28057600 2700
45146113 Benq F Oct. 31, 2018, 4:58 p.m. OK GNU C++17 TESTS 11 732 10035200 2700
63905395 ppc_qjd F Oct. 31, 2019, 6:27 a.m. OK GNU C++17 TESTS 11 826 28876800 2700
62619266 Slaaava F Oct. 15, 2019, 12:22 p.m. OK GNU C++17 TESTS 11 1543 46489600 2700
44920887 Shayan.Kashefi_A F Oct. 26, 2018, 5:50 p.m. OK GNU C++17 TESTS 11 1918 43520000 2700
20529681 YakutovDmitriy niyaznigmatul F Sept. 11, 2016, 11:34 a.m. OK Java 8 TESTS 11 1840 14643200 2700

remove filters

Back to search problems