Codeforces Round 325 (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
585 Codeforces Round 325 (Div. 1) FINISHED False 7200 331764623 Oct. 12, 2015, 9:10 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 792 ) F Digits of Number Pi PROGRAMMING dp implementation strings 3200

Vasily has recently learned about the amazing properties of number π . In one of the articles it has been hypothesized that, whatever the sequence of numbers we have, in some position, this sequence is found among the digits of number π . Thus, if you take, for example, the epic novel "War and Peace" of famous Russian author Leo Tolstoy, and encode it with numbers, then we will find the novel among the characters of number π . Vasily was absolutely delighted with this, because it means that all the books, songs and programs have already been written and encoded in the digits of π . Vasily is, of course, a bit wary that this is only a hypothesis and it hasn't been proved, so he decided to check it out. To do this, Vasily downloaded from the Internet the archive with the sequence of digits of number π , starting with a certain position, and began to check the different strings of digits on the presence in the downloaded archive. Vasily quickly found short strings of digits, but each time he took a longer string, it turned out that it is not in the archive. Vasily came up with a definition that a string of length d is a half-occurrence if it contains a substring of length of at least , which occurs in the archive. To complete the investigation, Vasily took 2 large numbers x , y ( x ≤ y ) with the same number of digits and now he wants to find the number of numbers in the interval from x to y , which are half-occurrences in the archive. Help Vasily calculate this value modulo 10 9 + 7 . The first line contains string s consisting of decimal digits ( 1 ≤ | s | ≤ 1000 ) that Vasily will use to search substrings in. According to hypothesis, this sequence of digis indeed occurs in the decimal representation of π , although we can't guarantee that. The second and third lines contain two positive integers x , y of the same length d ( x ≤ y , 2 ≤ d ≤ 50 ). Numbers x , y do not contain leading zeroes. Print how many numbers in the segment from x to y that are half-occ

Tutorials

Разбор Codeforces Round #325

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
22904041 Worldwide_D F Dec. 12, 2016, 12:48 p.m. OK GNU C++ TESTS 35 46 7577600 3200
31524655 skylee F Oct. 20, 2017, 6:05 a.m. OK GNU C++ TESTS 35 61 4608000 3200
36938596 Maniac_Wallnut F April 4, 2018, 3:46 a.m. OK GNU C++ TESTS 35 62 32768000 3200
31524679 vjudge3 F Oct. 20, 2017, 6:07 a.m. OK GNU C++ TESTS 35 77 4608000 3200
41320430 vjudge5 F Aug. 8, 2018, 12:39 a.m. OK GNU C++ TESTS 35 77 6451200 3200
41320410 G20202501 F Aug. 8, 2018, 12:39 a.m. OK GNU C++ TESTS 35 78 6451200 3200
29601038 none44353 F Aug. 19, 2017, 2:35 p.m. OK GNU C++ TESTS 35 93 45158400 3200
41380541 vjudge5 F Aug. 9, 2018, 1:55 a.m. OK GNU C++ TESTS 35 93 87142400 3200
22919309 YxuanwKeith F Dec. 13, 2016, 4:23 a.m. OK GNU C++ TESTS 35 108 53657600 3200
41323544 TiwAirOAO F Aug. 8, 2018, 3:11 a.m. OK GNU C++ TESTS 35 124 24473600 3200
65933930 vjudge1 F Nov. 28, 2019, 11:41 p.m. OK GNU C++11 TESTS 35 46 1331200 3200
65518892 XieRujian F Nov. 22, 2019, 7:21 a.m. OK GNU C++11 TESTS 35 46 1331200 3200
65946717 vjudge3 F Nov. 29, 2019, 9 a.m. OK GNU C++11 TESTS 35 46 1433600 3200
69244910 Lagoon_ F Jan. 21, 2020, 12:36 p.m. OK GNU C++11 TESTS 35 46 2252800 3200
66498406 asuldb F Dec. 8, 2019, 11:30 a.m. OK GNU C++11 TESTS 35 46 2867200 3200
57884197 lopare F July 28, 2019, 9:06 a.m. OK GNU C++11 TESTS 35 46 7884800 3200
64719685 cuizhuyefei F Nov. 12, 2019, 2:26 a.m. OK GNU C++11 TESTS 35 46 14540800 3200
68160168 weng_233 F Jan. 4, 2020, 10:32 a.m. OK GNU C++11 TESTS 35 46 25907200 3200
13657082 Ioser F Oct. 16, 2015, 4:10 a.m. OK GNU C++11 TESTS 35 46 78540800 3200
49430671 Mikaeel F Feb. 3, 2019, 5:18 p.m. OK GNU C++11 TESTS 35 61 15052800 3200
26471832 q234rty F April 18, 2017, 8:41 a.m. OK GNU C++14 TESTS 35 31 4096000 3200
66165792 mayaohua2003 F Dec. 2, 2019, 7:31 a.m. OK GNU C++14 TESTS 35 31 6656000 3200
40985980 ReaLNero1 F July 30, 2018, 8:17 p.m. OK GNU C++14 TESTS 35 31 13209600 3200
29595906 NiroBC F Aug. 19, 2017, 10:45 a.m. OK GNU C++14 TESTS 35 31 13209600 3200
65427322 jiangly F Nov. 20, 2019, 11:05 a.m. OK GNU C++14 TESTS 35 46 1740800 3200
26473295 q234rty F April 18, 2017, 10:09 a.m. OK GNU C++14 TESTS 35 46 4096000 3200
63078297 zsyzsy F Oct. 21, 2019, 2:20 p.m. OK GNU C++14 TESTS 35 46 6758400 3200
27314142 zhanglexing F May 24, 2017, 5:04 a.m. OK GNU C++14 TESTS 35 46 8089600 3200
63241358 newbiegcz F Oct. 23, 2019, 1:32 p.m. OK GNU C++14 TESTS 35 46 12390400 3200
65890364 cz_xuyixuan F Nov. 28, 2019, 2:54 a.m. OK GNU C++14 TESTS 35 46 15155200 3200
69224859 CMXRYNP F Jan. 21, 2020, 6:42 a.m. OK GNU C++17 TESTS 35 46 6758400 3200
68059598 Elegia F Jan. 2, 2020, 2:09 a.m. OK GNU C++17 TESTS 35 46 14745600 3200
41380387 vjudge1 F Aug. 9, 2018, 1:50 a.m. OK GNU C++17 TESTS 35 124 14028800 3200
67104801 ruo F Dec. 17, 2019, 4:17 p.m. OK GNU C++17 TESTS 35 124 54374400 3200
41380415 vjudge1 F Aug. 9, 2018, 1:51 a.m. OK GNU C++17 TESTS 35 140 14028800 3200
49438820 Shayan.P F Feb. 3, 2019, 7:58 p.m. OK GNU C++17 TESTS 35 187 11878400 3200
41336002 G20202502 F Aug. 8, 2018, 12:06 p.m. OK GNU C++17 TESTS 35 202 15462400 3200
66591476 abc473848880 F Dec. 10, 2019, 1:08 p.m. OK GNU C++17 TESTS 35 218 5734400 3200
68217354 HirasawaaYui F Jan. 5, 2020, 1:19 a.m. OK GNU C++17 TESTS 35 311 46592000 3200
68493949 alan_cty F Jan. 10, 2020, 12:43 p.m. OK GNU C++17 TESTS 35 343 24576000 3200
13584173 mmaxio F Oct. 12, 2015, 10:01 p.m. OK Java 8 TESTS 35 265 0 3200
13581813 Egor F Oct. 12, 2015, 6:44 p.m. OK Java 8 TESTS 35 311 9420800 3200
13656221 _just4fun_ F Oct. 16, 2015, 2:21 a.m. OK Java 8 TESTS 35 374 10956800 3200
13580139 liymsheep F Oct. 12, 2015, 5:21 p.m. OK Java 8 TESTS 35 483 0 3200
14826286 edorundo F Dec. 15, 2015, 7:06 p.m. OK Java 8 TESTS 35 889 65638400 3200
36264919 tri F March 14, 2018, 5:01 a.m. OK Java 8 TESTS 35 1637 60723200 3200
17133232 Mosyagin F April 2, 2016, 3:49 p.m. OK MS C++ TESTS 35 436 88166400 3200

remove filters

Back to search problems