Avito Code Challenge 2018

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
981 Avito Code Challenge 2018 FINISHED False 10800 204390599 May 27, 2018, 2:50 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2123 ) E Addition on Segments PROGRAMMING bitmasks data structures divide and conquer dp 2100

B'Grisha come to a contest and faced the following problem. You are given an array of size n , initially consisting of zeros. The elements of the array are enumerated from 1 to n . You perform q operations on the array. The i -th operation is described with three integers l_i , r_i and x_i ( 1 <= q l_i <= q r_i <= q n , 1 <= q x_i <= q n ) and means that you should add x_i to each of the elements with indices l_i, l_i + 1, ldots, r_i . After all operations you should find the maximum in the array. Grisha is clever, so he solved the problem quickly. However something went wrong inside his head and now he thinks of the following question: "consider we applied some subset of the operations to the array. What are the possible values of the maximum in the array?" Help Grisha, find all integers y between 1 and n such that if you apply some subset (possibly empty) of the operations, then the maximum in the array becomes equal to y . The first line contains two integers n and q ( 1 <= q n, q <= q 10^{4} ) -- the length of the array and the number of queries in the initial problem. The following q lines contain queries, one per line. The i -th of these lines contains three integers l_i , r_i and x_i ( 1 <= q l_i <= q r_i <= q n , 1 <= q x_i <= q n ), denoting a query of adding x_i to the segment from l_i -th to r_i -th elements of the array, inclusive. In the first line print the only integer k , denoting the number of integers from 1 to n , inclusive, that can be equal to the maximum in the array after applying some subset (possibly empty) of the given operations. In the next line print these k integers from 1 to n -- the possible values of the maximum. Print these integers in increasing order. Consider the first example. If you consider the subset only of the first query, t'...

Tutorials

Avito Code Challenge 2018 — разбор

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
39044523 rr_ E June 8, 2018, 11:35 a.m. OK D TESTS 76 311 4198400 2100
38671871 Gassa E May 27, 2018, 4:38 p.m. OK D TESTS 76 841 4198400 2100
38818185 forlfs E June 1, 2018, 4:44 a.m. OK GNU C TESTS 76 124 3481600 2100
40365680 vjudge1 E July 15, 2018, 5:38 a.m. OK GNU C++ TESTS 76 77 204800 2100
40365656 renhao E July 15, 2018, 5:38 a.m. OK GNU C++ TESTS 76 77 204800 2100
38720571 Anson529 E May 29, 2018, 1:59 p.m. OK GNU C++ TESTS 76 78 204800 2100
38697172 SeeYouAgain E May 28, 2018, 2:40 p.m. OK GNU C++ TESTS 76 78 204800 2100
38682267 Scut82 E May 28, 2018, 1:17 a.m. OK GNU C++ TESTS 76 78 204800 2100
38667567 JOHNKRAM E May 27, 2018, 3:49 p.m. OK GNU C++ TESTS 76 78 1433600 2100
40253703 vjudge1 E July 13, 2018, 7:46 a.m. OK GNU C++ TESTS 76 93 204800 2100
38694594 Atlantis592 E May 28, 2018, 12:52 p.m. OK GNU C++ TESTS 76 93 204800 2100
38684453 tolight E May 28, 2018, 4:39 a.m. OK GNU C++ TESTS 76 93 204800 2100
40253669 vjudge2 E July 13, 2018, 7:44 a.m. OK GNU C++ TESTS 76 93 307200 2100
61699389 vjudge1 E Oct. 2, 2019, 8:01 a.m. OK GNU C++11 TESTS 76 62 1536000 2100
38805049 lokiii E May 31, 2018, 2:30 p.m. OK GNU C++11 TESTS 76 62 3686400 2100
53384324 mmmod_lqs E April 27, 2019, 2:24 a.m. OK GNU C++11 TESTS 76 77 1331200 2100
38670108 Inner_x_Peace E May 27, 2018, 4:16 p.m. OK GNU C++11 TESTS 76 77 1843200 2100
38878152 66666a E June 2, 2018, 7:44 a.m. OK GNU C++11 TESTS 76 77 3686400 2100
44721828 Captain_Paul E Oct. 23, 2018, 5:42 a.m. OK GNU C++11 TESTS 76 78 204800 2100
44719643 Captain_Paul E Oct. 23, 2018, 3:23 a.m. OK GNU C++11 TESTS 76 78 204800 2100
43707360 xymtxdy E Oct. 2, 2018, 11:29 p.m. OK GNU C++11 TESTS 76 78 204800 2100
38703123 chenyx2001 E May 28, 2018, 7:27 p.m. OK GNU C++11 TESTS 76 78 204800 2100
38717098 wxh571001500 E May 29, 2018, 11:33 a.m. OK GNU C++11 TESTS 76 78 307200 2100
39010732 zhouzhendong E June 7, 2018, 6:43 a.m. OK GNU C++14 TESTS 76 62 204800 2100
38687733 f-zyj E May 28, 2018, 7:56 a.m. OK GNU C++14 TESTS 76 62 204800 2100
38684073 Zxyelf E May 28, 2018, 4:08 a.m. OK GNU C++14 TESTS 76 62 204800 2100
38683989 Zxyelf E May 28, 2018, 4:01 a.m. OK GNU C++14 TESTS 76 62 204800 2100
39808097 kyleliu E June 30, 2018, 9:41 p.m. OK GNU C++14 TESTS 76 62 1536000 2100
40254803 vjudge3 E July 13, 2018, 8:25 a.m. OK GNU C++14 TESTS 76 77 204800 2100
38717661 vjudge3 E May 29, 2018, 11:58 a.m. OK GNU C++14 TESTS 76 77 204800 2100
56304571 whyamievenhere E June 30, 2019, 10:59 a.m. OK GNU C++14 TESTS 76 77 1536000 2100
51118610 _rs_ E March 10, 2019, 8:09 a.m. OK GNU C++14 TESTS 76 77 2764800 2100
39736182 kut_kjb1994 E June 28, 2018, 7:58 a.m. OK GNU C++14 TESTS 76 78 204800 2100
38678823 xsc E May 27, 2018, 7:51 p.m. OK GNU C++17 TESTS 76 46 1433600 2100
38668539 khadaev E May 27, 2018, 3:58 p.m. OK GNU C++17 TESTS 76 46 1638400 2100
38701432 karasek E May 28, 2018, 5:57 p.m. OK GNU C++17 TESTS 76 61 1536000 2100
40932143 ReaLNero1 E July 30, 2018, 1:36 a.m. OK GNU C++17 TESTS 76 61 1638400 2100
47180591 P___ E Dec. 17, 2018, 8:29 p.m. OK GNU C++17 TESTS 76 61 26521600 2100
38666595 Kaban-5 E May 27, 2018, 3:39 p.m. OK GNU C++17 TESTS 76 62 1638400 2100
38693492 FalseMirror E May 28, 2018, 12:08 p.m. OK GNU C++17 TESTS 76 62 1740800 2100
38665419 voidmax E May 27, 2018, 3:30 p.m. OK GNU C++17 TESTS 76 62 1945600 2100
38673076 JKS_PL E May 27, 2018, 4:56 p.m. OK GNU C++17 TESTS 76 62 2355200 2100
58478093 neal E Aug. 9, 2019, 4 a.m. OK GNU C++17 TESTS 76 62 3481600 2100
38670049 eatmore E May 27, 2018, 4:15 p.m. OK Java 8 TESTS 76 186 0 2100
41507447 happybelly E Aug. 11, 2018, 9:57 p.m. OK Java 8 TESTS 76 233 0 2100
38665604 uwi E May 27, 2018, 3:31 p.m. OK Java 8 TESTS 76 233 0 2100
41507405 happybelly E Aug. 11, 2018, 9:54 p.m. OK Java 8 TESTS 76 234 0 2100
38705868 Asgar E May 28, 2018, 11:15 p.m. OK Java 8 TESTS 76 280 0 2100
38672049 Slamur E May 27, 2018, 4:40 p.m. OK Java 8 TESTS 76 280 0 2100
38664980 qwerty787788 E May 27, 2018, 3:26 p.m. OK Java 8 TESTS 76 295 0 2100
38802466 ayushchaurasia2879 E May 31, 2018, 12:50 p.m. OK Java 8 TESTS 76 295 20684800 2100
69399212 yaoct E Jan. 23, 2020, 7:43 a.m. OK Java 8 TESTS 76 374 0 2100
46204974 polyakoff E Nov. 25, 2018, 1:42 p.m. OK Java 8 TESTS 76 389 0 2100
38678072 schoenus E May 27, 2018, 7:26 p.m. OK Mono C# TESTS 76 249 72089600 2100
61752909 vjudge4 E Oct. 3, 2019, 4:17 a.m. OK MS C++ TESTS 76 109 204800 2100
61683412 vjudge5 E Oct. 2, 2019, 2:35 a.m. OK MS C++ TESTS 76 139 2252800 2100
61785278 vjudge4 E Oct. 3, 2019, 2:17 p.m. OK MS C++ TESTS 76 139 2457600 2100
62685817 vjudge5 E Oct. 16, 2019, 2:02 p.m. OK MS C++ TESTS 76 140 1638400 2100
61780286 vjudge2 E Oct. 3, 2019, 12:58 p.m. OK MS C++ TESTS 76 187 2355200 2100
38787757 Los_Angelos_Laycurse E May 31, 2018, 1:46 a.m. OK MS C++ TESTS 76 327 4096000 2100
38690334 wa1tz719 E May 28, 2018, 9:56 a.m. OK MS C++ TESTS 76 1075 307200 2100
38978032 pericle E June 5, 2018, 7:41 p.m. OK MS C++ TESTS 76 1981 3891200 2100
61901517 AleksanderBalobanov E Oct. 5, 2019, 8:42 a.m. OK MS C++ 2017 TESTS 76 202 6041600 2100
50290458 introibo E Feb. 21, 2019, 5:09 p.m. OK PyPy 2 TESTS 76 826 2560000 2100
63270123 sansen E Oct. 24, 2019, 3:26 a.m. OK Rust TESTS 76 561 1024000 2100

remove filters

Back to search problems