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
( 692 ) G Magic multisets PROGRAMMING data structures 2400

B'In the School of Magic in Dirtpolis a lot of interesting objects are studied on Computer Science lessons. Consider, for example, the magic multiset. If you try to add an integer to it that is already presented in the multiset, each element in the multiset duplicates. For example, if you try to add the integer 2 to the multiset {1, 2, 3, 3 } , you will get {1, 1, 2, 2, 3, 3, 3, 3 } . If you try to add an integer that is not presented in the multiset, it is simply added to it. For example, if you try to add the integer 4 to the multiset {1, 2, 3, 3 } , you will get {1, 2, 3, 3, 4 } . Also consider an array of n initially empty magic multisets, enumerated from 1 to n . You are to answer q queries of the form "add an integer x to all multisets with indices l, l + 1, ldots, r " and "compute the sum of sizes of multisets with indices l, l + 1, ldots, r ". The answers for the second type queries can be large, so print the answers modulo 998244353 . The first line contains two integers n and q ( 1 <= q n, q <= q 2 cdot 10^{5} ) -- the number of magic multisets in the array and the number of queries, respectively. The next q lines describe queries, one per line. Each line starts with an integer t ( 1 <= q t <= q 2 ) -- the type of the query. If t equals 1 , it is followed by three integers l , r , x ( 1 <= q l <= q r <= q n , 1 <= q x <= q n ) meaning that you should add x to all multisets with indices from l to r inclusive. If t equals 2 , it is followed by two integers l , r ( 1 <= q l <= q r <= q n ) meaning that you should compute the sum of sizes of all multisets with indices from l to r inclusive. For each query of the second type print the sum of sizes of multisets on the given segment. The answers can be large, so print them modulo 998244353 . '...

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
38774223 Anson529 G May 30, 2018, 1:14 p.m. OK GNU C++ TESTS 48 576 22732800 2400
38928062 nwi G June 3, 2018, 6:21 p.m. OK GNU C++ TESTS 48 623 20377600 2400
40393805 Dis_19260817 G July 16, 2018, 3:16 a.m. OK GNU C++ TESTS 48 655 76083200 2400
40932129 ReaLNero1 G July 30, 2018, 1:36 a.m. OK GNU C++ TESTS 48 686 20275200 2400
38788481 Worldwide_D G May 31, 2018, 2:54 a.m. OK GNU C++ TESTS 48 702 39219200 2400
40393999 Dis_19260817 G July 16, 2018, 3:27 a.m. OK GNU C++ TESTS 48 702 76083200 2400
38683556 Scut82 G May 28, 2018, 3:25 a.m. OK GNU C++ TESTS 48 732 18636800 2400
40394020 Dis_19260817 G July 16, 2018, 3:29 a.m. OK GNU C++ TESTS 48 763 76083200 2400
38708062 DenyWorldTree G May 29, 2018, 3:07 a.m. OK GNU C++ TESTS 48 951 28364800 2400
40408580 Wuweizheng G July 16, 2018, 11:12 a.m. OK GNU C++ TESTS 48 966 24985600 2400
60908452 CYJJJian G Sept. 20, 2019, 4:15 a.m. OK GNU C++11 TESTS 48 498 35737600 2400
51390589 introibo G March 16, 2019, 10:08 p.m. OK GNU C++11 TESTS 48 592 16179200 2400
51390473 introibo G March 16, 2019, 10:02 p.m. OK GNU C++11 TESTS 48 592 16179200 2400
51390291 introibo G March 16, 2019, 9:48 p.m. OK GNU C++11 TESTS 48 592 16179200 2400
51390244 introibo G March 16, 2019, 9:45 p.m. OK GNU C++11 TESTS 48 592 16179200 2400
51390171 introibo G March 16, 2019, 9:41 p.m. OK GNU C++11 TESTS 48 592 16179200 2400
51391014 introibo G March 16, 2019, 10:37 p.m. OK GNU C++11 TESTS 48 607 16179200 2400
51390807 introibo G March 16, 2019, 10:24 p.m. OK GNU C++11 TESTS 48 607 16179200 2400
51390037 introibo G March 16, 2019, 9:33 p.m. OK GNU C++11 TESTS 48 607 16179200 2400
51389944 introibo G March 16, 2019, 9:29 p.m. OK GNU C++11 TESTS 48 608 16384000 2400
38667922 tourist G May 27, 2018, 3:52 p.m. OK GNU C++14 TESTS 48 592 20377600 2400
38672421 ainta G May 27, 2018, 4:46 p.m. OK GNU C++14 TESTS 48 685 18124800 2400
48562195 vjudge1 G Jan. 19, 2019, 7:51 a.m. OK GNU C++14 TESTS 48 702 19558400 2400
47317959 _Sakits G Dec. 21, 2018, 5:43 a.m. OK GNU C++14 TESTS 48 702 40345600 2400
38689174 shdut G May 28, 2018, 9:03 a.m. OK GNU C++14 TESTS 48 748 18739200 2400
38770243 wcz112 G May 30, 2018, 11:12 a.m. OK GNU C++14 TESTS 48 748 26828800 2400
44769746 cz_xuyixuan G Oct. 24, 2018, 11:47 a.m. OK GNU C++14 TESTS 48 763 18841600 2400
38678608 Ali_Pi G May 27, 2018, 7:42 p.m. OK GNU C++14 TESTS 48 779 28467200 2400
69597305 Cyanic G Jan. 27, 2020, 5:37 a.m. OK GNU C++14 TESTS 48 795 18841600 2400
38768424 _LowestJN G May 30, 2018, 10:12 a.m. OK GNU C++14 TESTS 48 795 28569600 2400
48505860 Nakagawa.Kanon G Jan. 17, 2019, 5:35 p.m. OK GNU C++17 TESTS 48 514 13721600 2400
39857698 aryanc403 G July 2, 2018, 5:29 a.m. OK GNU C++17 TESTS 48 624 20377600 2400
53803387 markotee G May 5, 2019, 8:58 p.m. OK GNU C++17 TESTS 48 686 15462400 2400
38678360 alex9801 G May 27, 2018, 7:33 p.m. OK GNU C++17 TESTS 48 732 17510400 2400
38686590 alex9801 G May 28, 2018, 6:58 a.m. OK GNU C++17 TESTS 48 764 17510400 2400
42004157 des1997 G Aug. 23, 2018, 5:13 p.m. OK GNU C++17 TESTS 48 795 106598400 2400
38673865 KrK G May 27, 2018, 5:08 p.m. OK GNU C++17 TESTS 48 842 21811200 2400
38690907 lintoto G May 28, 2018, 10:22 a.m. OK GNU C++17 TESTS 48 888 132608000 2400
41584776 BackOnTrack G Aug. 14, 2018, 10:23 a.m. OK GNU C++17 TESTS 48 904 23142400 2400
38673797 maximumSHOT G May 27, 2018, 5:07 p.m. OK GNU C++17 TESTS 48 919 22016000 2400
42135635 happybelly G Aug. 26, 2018, 11:27 p.m. OK Java 8 TESTS 48 1357 30720000 2400
42113768 happybelly G Aug. 26, 2018, 8:09 a.m. OK Java 8 TESTS 48 1403 35635200 2400
42131253 happybelly G Aug. 26, 2018, 6:50 p.m. OK Java 8 TESTS 48 1434 35635200 2400
42135586 happybelly G Aug. 26, 2018, 11:24 p.m. OK Java 8 TESTS 48 1497 59699200 2400
38669109 VArtem G May 27, 2018, 4:05 p.m. OK Java 8 TESTS 48 1653 48128000 2400
38673172 mmaxio G May 27, 2018, 4:58 p.m. OK Java 8 TESTS 48 1809 74240000 2400
38762902 lucasr G May 30, 2018, 6:55 a.m. OK Java 8 TESTS 48 1824 34816000 2400
38674903 uwi G May 27, 2018, 5:24 p.m. OK Java 8 TESTS 48 1965 35532800 2400
38672671 qwerty787788 G May 27, 2018, 4:50 p.m. OK Java 8 TESTS 48 1980 31641600 2400
38804226 7dan G May 31, 2018, 1:57 p.m. OK Java 8 TESTS 48 2074 87449600 2400
38673899 wa1tz719 G May 27, 2018, 5:08 p.m. OK MS C++ TESTS 48 951 253849600 2400
51380733 introibo G March 16, 2019, 4:07 p.m. OK MS C++ 2017 TESTS 48 1216 16486400 2400
51374039 introibo G March 16, 2019, 1:19 p.m. OK MS C++ 2017 TESTS 48 1341 16486400 2400
51374364 introibo G March 16, 2019, 1:26 p.m. OK MS C++ 2017 TESTS 48 1387 16486400 2400

remove filters

Back to search problems