Educational Codeforces Round 70 (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
1202 Educational Codeforces Round 70 (Rated for Div. 2) FINISHED False 7200 172250687 Aug. 7, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4612 ) B You Are Given a Decimal String... PROGRAMMING brute force dp shortest paths 1700

B"Suppose you have a special x - y -counter. This counter can store some value as a decimal number; at first, the counter has value 0 . The counter performs the following algorithm: it prints its lowest digit and, after that, adds either x or y to its value. So all sequences this counter generates are starting from 0 . For example, a 4 - 2 -counter can act as follows: This is only one of the possible outputs; for example, the same counter could generate 0246802468024 as the output, if we chose to add 2 during each step. You wrote down a printed sequence from one of such x - y -counters. But the sequence was corrupted and several elements from the sequence could be erased. Now you'd like to recover data you've lost, but you don't even know the type of the counter you used. You have a decimal string s -- the remaining data of the sequence. For all 0 <= x, y < 10 , calculate the minimum number of digits you have to insert in the string s to make it a possible output of the x - y -counter. Note that you can't change the order of digits in string s or erase any of them; only insertions are allowed. The first line contains a single string s ( 1 <= |s| <= 2 cdot 10^6 , s_i in { text{0} - text{9} } ) -- the remaining data you have. It's guaranteed that s_1 = 0 . Print a 10 x 10 matrix, where the j -th integer ( 0 -indexed) on the i -th line ( 0 -indexed too) is equal to the minimum number of digits you have to insert in the string s to make it a possible output of the i - j -counter, or -1 if there is no way to do so. Let's take, for example, 4 - 3 -counter. One of the possible outcomes the counter could print is 0(4)8(1)4(7)0 (lost elements are in the brackets). One of the possible outcomes a 2 - 3 -counter could print is 0(35)8(1)4(7)0 . The 6 - 8 -counter"...

Tutorials

68972

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
58451557 daut-dlang B Aug. 7, 2019, 4:06 p.m. OK D TESTS 44 234 4198400 1700
58445079 pengin_2000 B Aug. 7, 2019, 3:28 p.m. OK GNU C11 TESTS 44 187 2048000 1700
58452285 BilyHurington B Aug. 7, 2019, 4:10 p.m. OK GNU C++11 TESTS 44 31 2048000 1700
58440288 ilulu B Aug. 7, 2019, 2:59 p.m. OK GNU C++11 TESTS 44 31 2048000 1700
58448969 happypeople B Aug. 7, 2019, 3:51 p.m. OK GNU C++11 TESTS 44 31 2048000 1700
58440220 I-Love-Islam B Aug. 7, 2019, 2:59 p.m. OK GNU C++11 TESTS 44 31 2969600 1700
58439409 leaf1415 B Aug. 7, 2019, 2:54 p.m. OK GNU C++11 TESTS 44 31 3174400 1700
58449891 jdj1211 B Aug. 7, 2019, 3:56 p.m. OK GNU C++11 TESTS 44 31 3174400 1700
58442781 monochrome_peanut B Aug. 7, 2019, 3:14 p.m. OK GNU C++11 TESTS 44 31 3174400 1700
58442598 zzorz B Aug. 7, 2019, 3:13 p.m. OK GNU C++11 TESTS 44 31 10547200 1700
58455331 Ice_teapoy B Aug. 7, 2019, 4:26 p.m. OK GNU C++11 TESTS 44 46 0 1700
58454112 lhylhy B Aug. 7, 2019, 4:20 p.m. OK GNU C++11 TESTS 44 46 1843200 1700
58442678 smartnj B Aug. 7, 2019, 3:14 p.m. OK GNU C++14 TESTS 44 31 3686400 1700
58451755 Snoopysfriend B Aug. 7, 2019, 4:07 p.m. OK GNU C++14 TESTS 44 46 1945600 1700
58440276 wiwitrifai B Aug. 7, 2019, 2:59 p.m. OK GNU C++14 TESTS 44 46 2048000 1700
58447902 _Jessie B Aug. 7, 2019, 3:45 p.m. OK GNU C++14 TESTS 44 46 2048000 1700
58445249 oier_pb B Aug. 7, 2019, 3:29 p.m. OK GNU C++14 TESTS 44 46 2048000 1700
58444780 wangshouxun B Aug. 7, 2019, 3:26 p.m. OK GNU C++14 TESTS 44 46 2048000 1700
58444743 FlyWhite B Aug. 7, 2019, 3:26 p.m. OK GNU C++14 TESTS 44 46 2048000 1700
58443409 ChrisT B Aug. 7, 2019, 3:18 p.m. OK GNU C++14 TESTS 44 46 2048000 1700
58442293 bdzxt B Aug. 7, 2019, 3:11 p.m. OK GNU C++14 TESTS 44 46 2048000 1700
58440073 nhho B Aug. 7, 2019, 2:58 p.m. OK GNU C++14 TESTS 44 46 2048000 1700
58441113 cy1999 B Aug. 7, 2019, 3:04 p.m. OK GNU C++17 TESTS 44 31 2048000 1700
58454821 Vwsrenzk_ZC B Aug. 7, 2019, 4:23 p.m. OK GNU C++17 TESTS 44 31 2048000 1700
58449512 NewBie0000 B Aug. 7, 2019, 3:54 p.m. OK GNU C++17 TESTS 44 31 2150400 1700
58450578 YJHuang B Aug. 7, 2019, 4 p.m. OK GNU C++17 TESTS 44 31 3686400 1700
58449973 1040865060 B Aug. 7, 2019, 3:57 p.m. OK GNU C++17 TESTS 44 46 2048000 1700
58448014 emmmmmm B Aug. 7, 2019, 3:45 p.m. OK GNU C++17 TESTS 44 46 2048000 1700
58444307 oridya B Aug. 7, 2019, 3:24 p.m. OK GNU C++17 TESTS 44 46 2048000 1700
58456905 __Yy__ B Aug. 7, 2019, 4:33 p.m. OK GNU C++17 TESTS 44 46 2048000 1700
58453965 INVWVZ B Aug. 7, 2019, 4:19 p.m. OK GNU C++17 TESTS 44 46 2048000 1700
58452552 Ray_ B Aug. 7, 2019, 4:11 p.m. OK GNU C++17 TESTS 44 46 2048000 1700
58440805 caidodo0_0 B Aug. 7, 2019, 3:02 p.m. OK Go TESTS 44 499 10854400 1700
58447277 lpm B Aug. 7, 2019, 3:41 p.m. OK Java 8 TESTS 44 155 3276800 1700
58449557 tryptophan B Aug. 7, 2019, 3:54 p.m. OK Java 8 TESTS 44 156 3174400 1700
58448199 z80 B Aug. 7, 2019, 3:46 p.m. OK Java 8 TESTS 44 249 2867200 1700
58440196 Musin B Aug. 7, 2019, 2:58 p.m. OK Java 8 TESTS 44 296 3481600 1700
58446271 MadChicken B Aug. 7, 2019, 3:35 p.m. OK Java 8 TESTS 44 389 16998400 1700
58440198 AkshajK B Aug. 7, 2019, 2:58 p.m. OK Java 8 TESTS 44 420 12083200 1700
58446481 Intrincantation B Aug. 7, 2019, 3:36 p.m. OK Java 8 TESTS 44 467 4096000 1700
58451074 -messi- B Aug. 7, 2019, 4:03 p.m. OK Java 8 TESTS 44 514 3379200 1700
58447325 vatsalsonigara B Aug. 7, 2019, 3:41 p.m. OK Java 8 TESTS 44 530 3584000 1700
58447802 ZeyadKhattab B Aug. 7, 2019, 3:44 p.m. OK Java 8 TESTS 44 639 4096000 1700
58453858 mongolrgata B Aug. 7, 2019, 4:18 p.m. OK JavaScript TESTS 44 1403 65843200 1700
58450739 hibatibati B Aug. 7, 2019, 4:01 p.m. OK Mono C# TESTS 44 109 11673600 1700
58443014 omikad B Aug. 7, 2019, 3:16 p.m. OK Mono C# TESTS 44 358 7987200 1700
58448252 eki B Aug. 7, 2019, 3:47 p.m. OK Mono C# TESTS 44 421 13312000 1700
58442939 claw88 B Aug. 7, 2019, 3:15 p.m. OK Mono C# TESTS 44 639 7987200 1700
58441836 keymoon B Aug. 7, 2019, 3:09 p.m. OK Mono C# TESTS 44 717 11673600 1700
58446672 wawahaha B Aug. 7, 2019, 3:38 p.m. OK MS C++ TESTS 44 124 10137600 1700
58447727 jxf378440404 B Aug. 7, 2019, 3:44 p.m. OK MS C++ TESTS 44 187 10035200 1700
58440946 math957963 B Aug. 7, 2019, 3:03 p.m. OK MS C++ TESTS 44 264 2048000 1700
58445183 tarattata1 B Aug. 7, 2019, 3:29 p.m. OK MS C++ TESTS 44 686 2048000 1700
58450128 TitorDong2333 B Aug. 7, 2019, 3:57 p.m. OK MS C++ TESTS 44 1637 4403200 1700
58442850 siwei B Aug. 7, 2019, 3:15 p.m. OK MS C++ 2017 TESTS 44 46 4403200 1700
58446370 SakaRenko B Aug. 7, 2019, 3:36 p.m. OK MS C++ 2017 TESTS 44 46 10035200 1700
58448466 yorky B Aug. 7, 2019, 3:48 p.m. OK MS C++ 2017 TESTS 44 93 4403200 1700
58446752 kongll B Aug. 7, 2019, 3:38 p.m. OK MS C++ 2017 TESTS 44 155 12390400 1700
58454102 pseuda B Aug. 7, 2019, 4:20 p.m. OK MS C++ 2017 TESTS 44 218 50790400 1700
58449868 zhanghengrui B Aug. 7, 2019, 3:56 p.m. OK MS C++ 2017 TESTS 44 312 2048000 1700
58446739 15872954516 B Aug. 7, 2019, 3:38 p.m. OK MS C++ 2017 TESTS 44 358 4403200 1700
58444597 pinder B Aug. 7, 2019, 3:25 p.m. OK MS C++ 2017 TESTS 44 405 4403200 1700
58456671 TrickmanOff B Aug. 7, 2019, 4:32 p.m. OK MS C++ 2017 TESTS 44 467 4505600 1700
58451848 j2v B Aug. 7, 2019, 4:07 p.m. OK MS C++ 2017 TESTS 44 499 2150400 1700
58441081 alexwice B Aug. 7, 2019, 3:04 p.m. OK PyPy 2 TESTS 44 233 13209600 1700
58447407 marpetr B Aug. 7, 2019, 3:42 p.m. OK PyPy 2 TESTS 44 249 6348800 1700
58450290 thuutin B Aug. 7, 2019, 3:58 p.m. OK PyPy 2 TESTS 44 1559 32870400 1700
58442813 rikein12 B Aug. 7, 2019, 3:14 p.m. OK PyPy 3 TESTS 44 655 10547200 1700
58453587 plourde27 B Aug. 7, 2019, 4:17 p.m. OK PyPy 3 TESTS 44 748 61542400 1700
58443999 CHelle B Aug. 7, 2019, 3:22 p.m. OK PyPy 3 TESTS 44 904 10240000 1700
58444461 titia B Aug. 7, 2019, 3:25 p.m. OK PyPy 3 TESTS 44 935 10137600 1700
58445044 keroru B Aug. 7, 2019, 3:28 p.m. OK PyPy 3 TESTS 44 1075 62054400 1700
58450396 StinsonOvO B Aug. 7, 2019, 3:59 p.m. OK PyPy 3 TESTS 44 1326 24064000 1700
58448041 erickjohnross B Aug. 7, 2019, 3:45 p.m. OK PyPy 3 TESTS 44 1778 35840000 1700
58455244 eugalt B Aug. 7, 2019, 4:26 p.m. OK PyPy 3 TESTS 44 1887 68403200 1700
58449022 ving.xia B Aug. 7, 2019, 3:51 p.m. OK PyPy 3 TESTS 44 1996 29491200 1700
58449867 syphon B Aug. 7, 2019, 3:56 p.m. OK Python 3 TESTS 44 1653 27955200 1700
58446624 yakamoto B Aug. 7, 2019, 3:37 p.m. OK Scala TESTS 44 1653 18329600 1700

remove filters

Back to search problems