VK Cup 2017 - Round 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
773 VK Cup 2017 - Round 3 FINISHED False 10800 282233723 May 7, 2017, 3:45 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 508 ) E Blog Post Rating PROGRAMMING data structures sortings 2900

It's well-known that blog posts are an important part of Codeforces platform. Every blog post has a global characteristic changing over time — its community rating . A newly created blog post's community rating is 0. Codeforces users may visit the blog post page and rate it, changing its community rating by +1 or -1. Consider the following model of Codeforces users' behavior. The i -th user has his own estimated blog post rating denoted by an integer a i . When a user visits a blog post page, he compares his estimated blog post rating to its community rating. If his estimated rating is higher, he rates the blog post with +1 (thus, the blog post's community rating increases by 1). If his estimated rating is lower, he rates the blog post with -1 (decreasing its community rating by 1). If the estimated rating and the community rating are equal, user doesn't rate the blog post at all (in this case we'll say that user rates the blog post for 0). In any case, after this procedure user closes the blog post page and never opens it again. Consider a newly created blog post with the initial community rating of 0. For each of n Codeforces users, numbered from 1 to n , his estimated blog post rating a i is known. For each k from 1 to n , inclusive, the following question is asked. Let users with indices from 1 to k , in some order , visit the blog post page, rate the blog post and close the page. Each user opens the blog post only after the previous user closes it. What could be the maximum possible community rating of the blog post after these k visits? The first line contains a single integer n ( 1 ≤ n ≤ 5·10 5 ) — the number of Codeforces users. The second line contains n integers a 1 , a 2 , ..., a n ( - 5·10 5 ≤ a i ≤ 5·10 5 ) — estimated blog post ratings for users in order from 1 to n . For each k from 1 to n , output a single integer equal to the maximum possible community rating of the blog post after users with indices from 1 to k , in some order, visit the

Tutorials

VK Cup 2017 Round 3 + Codeforces Round #412 -- Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
40982289 ReaLNero1 E July 30, 2018, 6:21 p.m. OK GNU C++ TESTS 84 373 32051200 2900
28121709 MasterJH5574 E June 28, 2017, 1:50 p.m. OK GNU C++ TESTS 84 514 33996800 2900
28107260 MarkF E June 28, 2017, 3:41 a.m. OK GNU C++ TESTS 84 545 39936000 2900
34698380 vjudge5 E Jan. 30, 2018, 5:32 a.m. OK GNU C++ TESTS 84 545 66150400 2900
28107607 Dream-Reality E June 28, 2017, 4:21 a.m. OK GNU C++ TESTS 84 561 82227200 2900
34697839 vjudge1 E Jan. 30, 2018, 5 a.m. OK GNU C++ TESTS 84 607 27136000 2900
26940249 RomaWhite witua E May 7, 2017, 5:57 p.m. OK GNU C++ TESTS 84 982 55808000 2900
27356422 krijgertje E May 26, 2017, 1:29 p.m. OK GNU C++ TESTS 84 1138 54067200 2900
28107608 Chloe_fan E June 28, 2017, 4:21 a.m. OK GNU C++ TESTS 84 1325 50278400 2900
27937879 xjtt E June 21, 2017, 5:44 a.m. OK GNU C++ TESTS 84 1622 56217600 2900
60658610 ezhjw E Sept. 16, 2019, 2:37 a.m. OK GNU C++11 TESTS 84 389 46387200 2900
58883759 user02 E Aug. 16, 2019, 12:13 a.m. OK GNU C++11 TESTS 84 452 22016000 2900
27485559 rxdoi E June 1, 2017, 1:30 p.m. OK GNU C++11 TESTS 84 452 48128000 2900
57770990 py_ultron E July 26, 2019, 12:47 a.m. OK GNU C++11 TESTS 84 483 64102400 2900
58637324 dyxg E Aug. 12, 2019, 1:22 a.m. OK GNU C++11 TESTS 84 499 68096000 2900
58855226 user02 E Aug. 15, 2019, 9:02 a.m. OK GNU C++11 TESTS 84 529 22016000 2900
57876786 lopare E July 28, 2019, 5:51 a.m. OK GNU C++11 TESTS 84 529 64102400 2900
34789881 zhouyuyang E Feb. 1, 2018, 5:15 a.m. OK GNU C++11 TESTS 84 545 50176000 2900
26937947 zemen Zlobober E May 7, 2017, 5:30 p.m. OK GNU C++11 TESTS 84 686 49664000 2900
26953320 Tinsane E May 8, 2017, 9:05 a.m. OK GNU C++11 TESTS 84 732 38502400 2900
58419356 daniel14311531 E Aug. 7, 2019, 7 a.m. OK GNU C++14 TESTS 84 530 48128000 2900
38601515 _ChenKerui E May 25, 2018, 5:58 a.m. OK GNU C++14 TESTS 84 592 48128000 2900
38599371 shaochengxi E May 25, 2018, 2:26 a.m. OK GNU C++14 TESTS 84 732 64102400 2900
26956753 ainta E May 8, 2017, 12:41 p.m. OK GNU C++14 TESTS 84 748 25190400 2900
27153199 WuHongxun E May 16, 2017, 7:49 a.m. OK GNU C++14 TESTS 84 764 40038400 2900
38575093 qiqi20021026 E May 24, 2018, 2:32 a.m. OK GNU C++14 TESTS 84 764 128307200 2900
69554445 Zetr0 E Jan. 26, 2020, 8:07 a.m. OK GNU C++14 TESTS 84 1014 62156800 2900
26999823 apiadu E May 10, 2017, 4:25 p.m. OK GNU C++14 TESTS 84 1029 46387200 2900
26962718 Belonogov E May 8, 2017, 6:45 p.m. OK GNU C++14 TESTS 84 1075 20377600 2900
26939482 V--o_o--V LHiC E May 7, 2017, 5:48 p.m. OK GNU C++14 TESTS 84 1107 16281600 2900
58473078 Romeolong E Aug. 9, 2019, 1:40 a.m. OK GNU C++17 TESTS 84 483 155340800 2900
54981822 hjk1030 E June 2, 2019, 1:33 p.m. OK GNU C++17 TESTS 84 577 66150400 2900
48924108 zhangqingqi E Jan. 25, 2019, 9:24 a.m. OK GNU C++17 TESTS 84 1154 84684800 2900
26992178 Los_Angelos_Laycurse E May 10, 2017, 8:18 a.m. OK MS C++ TESTS 84 2807 35635200 2900

remove filters

Back to search problems