Codeforces Round 549 (Div. 1)

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
1142 Codeforces Round 549 (Div. 1) FINISHED False 7200 177857399 March 30, 2019, 5:10 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 509 ) D Foreigner PROGRAMMING dp 2700

B'Traveling around the world you noticed that many shop owners raise prices to inadequate values if the see you are a foreigner. You define inadequate numbers as follows: Here lfloor x / 10 rfloor denotes x/10 rounded down. Thus, if x is the m -th in increasing order inadequate number, and m gives the remainder c when divided by 11 , then integers 10 cdot x + 0, 10 cdot x + 1 ldots, 10 cdot x + (c - 1) are inadequate, while integers 10 cdot x + c, 10 cdot x + (c + 1), ldots, 10 cdot x + 9 are not inadequate. The first several inadequate integers are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 21, 30, 31, 32 ldots . After that, since 4 is the fourth inadequate integer, 40, 41, 42, 43 are inadequate, while 44, 45, 46, ldots, 49 are not inadequate; since 10 is the 10 -th inadequate number, integers 100, 101, 102, ldots, 109 are all inadequate. And since 20 is the 11 -th inadequate number, none of 200, 201, 202, ldots, 209 is inadequate. You wrote down all the prices you have seen in a trip. Unfortunately, all integers got concatenated in one large digit string s and you lost the bounds between the neighboring integers. You are now interested in the number of substrings of the resulting string that form an inadequate number. If a substring appears more than once at different positions, all its appearances are counted separately. The only line contains the string s ( 1 <= |s| <= 10^5 ), consisting only of digits. It is guaranteed that the first digit of s is not zero. In the only line print the number of substrings of s that form an inadequate number. In the first example the inadequate numbers in the string are 1, 2, 4, 21, 40, 402 . In the second example the inadequate numbers in the string are 1 and 10 , and 1 appears twice (on the first and on the second positions). '...

Tutorials

Codeforces Round #549 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
52055142 yao11617 D March 30, 2019, 7:49 p.m. OK GNU C++11 TESTS 30 31 0 2700
62054289 TrivialMan D Oct. 7, 2019, 11:30 a.m. OK GNU C++11 TESTS 30 31 102400 2700
61370093 geniucos D Sept. 27, 2019, 2:43 p.m. OK GNU C++11 TESTS 30 31 102400 2700
53474823 vjudge1 D April 28, 2019, 2:47 p.m. OK GNU C++11 TESTS 30 31 102400 2700
53474803 vjudge5 D April 28, 2019, 2:46 p.m. OK GNU C++11 TESTS 30 31 102400 2700
52918608 Ezys D April 17, 2019, 4:51 p.m. OK GNU C++11 TESTS 30 31 102400 2700
52375432 KMAASZRAA D April 6, 2019, 8:03 a.m. OK GNU C++11 TESTS 30 31 102400 2700
52358202 Stelutzu D April 5, 2019, 6:02 p.m. OK GNU C++11 TESTS 30 31 102400 2700
52117887 krijgertje D March 31, 2019, 3:52 p.m. OK GNU C++11 TESTS 30 31 102400 2700
53183638 luogu_bot1 D April 23, 2019, 9 a.m. OK GNU C++11 TESTS 30 31 307200 2700
52321976 Lily D April 4, 2019, 8:23 p.m. OK GNU C++14 TESTS 30 15 9728000 2700
52251938 mayaohua2003 D April 3, 2019, 1:32 a.m. OK GNU C++14 TESTS 30 30 4505600 2700
57453089 Zory D July 21, 2019, 10:28 a.m. OK GNU C++14 TESTS 30 31 102400 2700
53463336 vjudge4 D April 28, 2019, 8:36 a.m. OK GNU C++14 TESTS 30 31 102400 2700
52594933 vjudge4 D April 11, 2019, 8:23 a.m. OK GNU C++14 TESTS 30 31 102400 2700
52150827 hank55663 D April 1, 2019, 11:33 a.m. OK GNU C++14 TESTS 30 31 102400 2700
52069789 yutaka1999 D March 31, 2019, 7:17 a.m. OK GNU C++14 TESTS 30 31 102400 2700
56760697 schtomi97 D July 9, 2019, 3:45 p.m. OK GNU C++14 TESTS 30 31 307200 2700
52442769 Knight_23 D April 7, 2019, 6:56 a.m. OK GNU C++14 TESTS 30 31 307200 2700
52048203 ATS D March 30, 2019, 6:30 p.m. OK GNU C++14 TESTS 30 31 1126400 2700
52208324 Motarack D April 1, 2019, 6:17 p.m. OK GNU C++17 TESTS 30 30 4505600 2700
54271388 RNS_JKS D May 17, 2019, 8:56 a.m. OK GNU C++17 TESTS 30 31 102400 2700
52286013 szsz D April 3, 2019, 7:47 p.m. OK GNU C++17 TESTS 30 31 102400 2700
56869306 Nakagawa.Kanon D July 12, 2019, 5:34 a.m. OK GNU C++17 TESTS 30 31 307200 2700
53033308 black_horse2014 D April 20, 2019, 4:12 a.m. OK GNU C++17 TESTS 30 31 307200 2700
65275676 A_Fan_of_the_AK_King--lk D Nov. 18, 2019, 12:40 a.m. OK GNU C++17 TESTS 30 31 4505600 2700
59068206 Kuroni D Aug. 19, 2019, 3:03 a.m. OK GNU C++17 TESTS 30 31 4505600 2700
57013161 eku D July 14, 2019, 10:18 a.m. OK GNU C++17 TESTS 30 31 4505600 2700
55610412 ReaLNero1 D June 16, 2019, 5:18 a.m. OK GNU C++17 TESTS 30 31 4505600 2700
52824597 zhouyuheng D April 16, 2019, 1:17 p.m. OK GNU C++17 TESTS 30 31 4505600 2700
53807546 akash_aich D May 6, 2019, 3 a.m. OK Java 8 TESTS 30 124 0 2700
52056274 Suzukaze D March 30, 2019, 8:08 p.m. OK Java 8 TESTS 30 124 0 2700
52050924 Egor D March 30, 2019, 6:48 p.m. OK Java 8 TESTS 30 139 0 2700
52052817 Lewin D March 30, 2019, 7:01 p.m. OK Java 8 TESTS 30 140 0 2700
52049524 ilyakor D March 30, 2019, 6:38 p.m. OK Java 8 TESTS 30 186 0 2700
52250610 Milanin D April 2, 2019, 11:29 p.m. OK MS C++ 2017 TESTS 30 389 102400 2700
52454378 seanwu D April 7, 2019, 11:07 a.m. OK PyPy 2 TESTS 30 170 1126400 2700

remove filters

Back to search problems