Educational Codeforces Round 72 (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
1217 Educational Codeforces Round 72 (Rated for Div. 2) FINISHED False 7200 164129099 Sept. 5, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1895 ) E Sum Queries? PROGRAMMING data structures greedy implementation math 2300

B"Let's define a balanced multiset the following way. Write down the sum of all elements of the multiset in its decimal representation. For each position of that number check if the multiset includes at least one element such that the digit of the element and the digit of the sum at that position are the same. If that holds for every position, then the multiset is balanced. Otherwise it's unbalanced. For example, multiset {20, 300, 10001 } is balanced and multiset {20, 310, 10001 } is unbalanced: The red digits mark the elements and the positions for which these elements have the same digit as the sum. The sum of the first multiset is 10321 , every position has the digit required. The sum of the second multiset is 10331 and the second-to-last digit doesn't appear in any number, thus making the multiset unbalanced. You are given an array a_1, a_2, ... , a_n , consisting of n integers. You are asked to perform some queries on it. The queries can be of two types: Note that the empty multiset is balanced. For each query of the second type print the lowest sum of the unbalanced subset. Print -1 if no unbalanced subset exists. The first line contains two integers n and m ( 1 <= n, m <= 2 cdot 10^5 ) -- the number of elements in the array and the number of queries, respectively. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i < 10^9 ). Each of the following m lines contains a query of one of two types: It is guaranteed that there is at least one query of the second type. For each query of the second type print the lowest sum of the unbalanced subset. Print -1 if no unbalanced subset exists. All the subsets of multiset {20, 300, 10001 } are balanced, thus the answer is -1. The possible unbalanced subsets in the third query are {20, 310 } and {20, 310, 10001 } . The lowest sum one is {20, 310 } . Note that you are asked to choose a subset, no"...

Tutorials

Educational Codeforces Round 72 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
68100042 fluffyowl E Jan. 3, 2020, 1:46 a.m. OK D TESTS 90 1606 39014400 2300
60467152 AThousandMoon E Sept. 13, 2019, 2:38 a.m. OK GNU C++11 TESTS 90 295 32051200 2300
60161644 chenyewei_1234 E Sept. 6, 2019, 9:13 a.m. OK GNU C++11 TESTS 88 296 37990400 2300
61826455 ReaLNero1 E Oct. 4, 2019, 4:58 a.m. OK GNU C++11 TESTS 90 311 129024000 2300
69266028 MakiseVon E Jan. 21, 2020, 6:39 p.m. OK GNU C++11 TESTS 90 327 36044800 2300
60180020 okwedook E Sept. 6, 2019, 3:56 p.m. OK GNU C++11 TESTS 88 327 129024000 2300
60214800 stefantaga E Sept. 7, 2019, 11:28 a.m. OK GNU C++11 TESTS 90 342 32870400 2300
60159645 w_57 E Sept. 6, 2019, 8:26 a.m. OK GNU C++11 TESTS 88 343 35942400 2300
60334244 mini4141 E Sept. 10, 2019, 7:42 a.m. OK GNU C++11 TESTS 90 358 32870400 2300
60831770 PinesL E Sept. 19, 2019, 7:14 a.m. OK GNU C++11 TESTS 90 358 36044800 2300
60156494 Shavkat_Aminov E Sept. 6, 2019, 7:03 a.m. OK GNU C++11 TESTS 88 358 75059200 2300
69265637 vjudge5 E Jan. 21, 2020, 6:31 p.m. OK GNU C++14 TESTS 90 374 36044800 2300
60772908 cwsang E Sept. 18, 2019, 1:20 p.m. OK GNU C++14 TESTS 90 390 32870400 2300
60772644 cwsang E Sept. 18, 2019, 1:15 p.m. OK GNU C++14 TESTS 90 390 32870400 2300
60262934 dtushar E Sept. 8, 2019, 12:17 p.m. OK GNU C++14 TESTS 90 405 32870400 2300
60206049 final_tsu E Sept. 7, 2019, 8:13 a.m. OK GNU C++14 TESTS 90 405 32870400 2300
61217699 vjudge1 E Sept. 24, 2019, 1:09 p.m. OK GNU C++14 TESTS 90 405 49664000 2300
60477962 chenxun E Sept. 13, 2019, 9:08 a.m. OK GNU C++14 TESTS 90 421 23244800 2300
60250662 iefnah06 E Sept. 8, 2019, 6:33 a.m. OK GNU C++14 TESTS 90 452 27340800 2300
60351555 alhiris E Sept. 10, 2019, 2:30 p.m. OK GNU C++14 TESTS 90 452 32051200 2300
60448248 79brue E Sept. 12, 2019, 2:56 p.m. OK GNU C++14 TESTS 90 483 32870400 2300
66772058 neal E Dec. 13, 2019, 8:19 a.m. OK GNU C++17 TESTS 90 233 43315200 2300
66772185 neal E Dec. 13, 2019, 8:21 a.m. OK GNU C++17 TESTS 90 249 43315200 2300
60147126 Princ_iple E Sept. 6, 2019, 1:06 a.m. OK GNU C++17 TESTS 88 374 27136000 2300
68626624 sai E Jan. 11, 2020, 10:33 p.m. OK GNU C++17 TESTS 90 390 32870400 2300
60370115 Canoe E Sept. 11, 2019, 12:50 a.m. OK GNU C++17 TESTS 90 390 32870400 2300
60270144 wzazzy E Sept. 8, 2019, 3:06 p.m. OK GNU C++17 TESTS 90 390 32870400 2300
60393534 Guaguapi E Sept. 11, 2019, 2:07 p.m. OK GNU C++17 TESTS 90 390 39321600 2300
61235035 soumik33 E Sept. 24, 2019, 5:45 p.m. OK GNU C++17 TESTS 90 405 32870400 2300
61043400 Wu-Kong E Sept. 22, 2019, 2:37 a.m. OK GNU C++17 TESTS 90 405 32870400 2300
60721448 YoupingFan E Sept. 17, 2019, 12:30 p.m. OK GNU C++17 TESTS 90 405 32870400 2300
63727468 WangJialei E Oct. 29, 2019, 1:04 p.m. OK Go TESTS 90 1153 77516800 2300
63727652 vjudge1 E Oct. 29, 2019, 1:07 p.m. OK Go TESTS 90 1185 77516800 2300
60142311 StayAwayFromBitches E Sept. 5, 2019, 8:57 p.m. OK Java 8 TESTS 88 1403 37171200 2300
60467878 satya26 E Sept. 13, 2019, 3:11 a.m. OK Java 8 TESTS 90 1606 75673600 2300
60142092 StayAwayFromBitches E Sept. 5, 2019, 8:49 p.m. OK Java 8 TESTS 88 1622 37171200 2300
60169934 Nutella3000 E Sept. 6, 2019, 12:30 p.m. OK Java 8 TESTS 88 1825 56217600 2300
60138659 Dukkha E Sept. 5, 2019, 7:12 p.m. OK Java 8 TESTS 88 1980 29696000 2300
60498553 IdoItMyWay E Sept. 13, 2019, 5:30 p.m. OK Java 8 TESTS 90 1996 157593600 2300
60389791 Spheniscine E Sept. 11, 2019, 12:53 p.m. OK Kotlin TESTS 90 1232 61132800 2300
60389345 Spheniscine E Sept. 11, 2019, 12:44 p.m. OK Kotlin TESTS 90 1278 63590400 2300
60389070 Spheniscine E Sept. 11, 2019, 12:38 p.m. OK Kotlin TESTS 90 1294 63590400 2300
60415536 Spheniscine E Sept. 12, 2019, 1:51 a.m. OK Kotlin TESTS 90 1403 61132800 2300
61453306 Hugh_Locke E Sept. 29, 2019, 4:47 a.m. OK MS C++ TESTS 90 1482 258150400 2300
61319459 vjudge4 E Sept. 26, 2019, 12:07 p.m. OK MS C++ TESTS 90 1528 131481600 2300
63059833 C20193515_LYX E Oct. 21, 2019, 8:11 a.m. OK MS C++ TESTS 90 1621 64102400 2300
60340658 Ancient_mage E Sept. 10, 2019, 10:40 a.m. OK MS C++ 2017 TESTS 90 857 51404800 2300
60143158 alexxx998 E Sept. 5, 2019, 9:26 p.m. OK MS C++ 2017 TESTS 88 1076 51404800 2300
63059877 vjudge1 E Oct. 21, 2019, 8:12 a.m. OK MS C++ 2017 TESTS 90 1528 64102400 2300
60174712 pajenegod E Sept. 6, 2019, 2 p.m. OK PyPy 2 TESTS 88 1918 46284800 2300
61043853 sansen E Sept. 22, 2019, 2:58 a.m. OK Rust TESTS 90 530 47104000 2300

remove filters

Back to search problems