Educational Codeforces Round 18

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
792 Educational Codeforces Round 18 FINISHED False 7200 246900323 March 27, 2017, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4480 ) C Divide by Three PROGRAMMING dp greedy math number theory 2000

B"A positive integer number n is written on a blackboard. It consists of not more than 105 digits. You have to transform it into a beautiful number by erasing some of the digits, and you want to erase as few digits as possible. The number is called beautiful if it consists of at least one digit, doesn't have leading zeroes and is a multiple of 3. For example, 0, 99, 10110 are beautiful numbers, and 00, 03, 122 are not. Write a program which for the given n will find a beautiful number such that n can be transformed into this number by erasing as few digits as possible. You can erase an arbitraty set of digits. For example, they don't have to go one after another in the number n. If it's impossible to obtain a beautiful number, print -1. If there are multiple answers, print any of them. The first line of input contains n -- a positive integer number without leading zeroes (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89< xe2 x80 x8910100000). Print one number -- any beautiful number obtained by erasing as few as possible digits. If there is no answer, print xe2 x80 x89- xe2 x80 x891. In the first example it is enough to erase only the first digit to obtain a multiple of 3. But if we erase the first digit, then we obtain a number with a leading zero. So the minimum number of digits to be erased is two. "...

Tutorials

Educational Codeforces Round 18 - Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
25845089 Gassa C March 27, 2017, 3:04 p.m. OK D TESTS 162 30 7168000 2000
27176378 KagamiharaNadeshiko C May 17, 2017, 9:46 a.m. OK FPC TESTS 162 15 614400 2000
25848321 UYEN99 C March 27, 2017, 3:35 p.m. OK FPC TESTS 162 15 2150400 2000
32420065 AsahiKasugano C Nov. 18, 2017, 4:25 a.m. OK FPC TESTS 162 30 1126400 2000
25898912 ultoxtung C March 29, 2017, 3:11 p.m. OK FPC TESTS 162 30 2764800 2000
42668550 chaorenhaha C Sept. 8, 2018, 9:32 a.m. OK FPC TESTS 162 31 1126400 2000
26768868 I_love_Kuroni C April 30, 2017, 1:46 p.m. OK FPC TESTS 162 31 2150400 2000
25868623 slavik228 C March 28, 2017, 8:31 a.m. OK FPC TESTS 162 31 3174400 2000
25847565 s34vv1nd C March 27, 2017, 3:27 p.m. OK FPC TESTS 162 31 6246400 2000
25859325 boddiul C March 27, 2017, 7:50 p.m. OK FPC TESTS 162 171 2252800 2000
25856811 chb19 C March 27, 2017, 5:48 p.m. OK FPC TESTS 162 187 2048000 2000
25881405 rainboy C March 28, 2017, 6:33 p.m. OK GNU C TESTS 162 15 2355200 2000
26107835 M.Amangeldi C April 3, 2017, 7:44 p.m. OK GNU C TESTS 162 31 1945600 2000
25888885 jkxjkx1031 C March 29, 2017, 6:37 a.m. OK GNU C TESTS 162 31 2764800 2000
38120770 Jiren C May 11, 2018, 5:53 p.m. OK GNU C TESTS 162 31 4096000 2000
25843979 sgtlaugh C March 27, 2017, 2:56 p.m. OK GNU C TESTS 162 46 117452800 2000
30779888 jiaangk_ C Sept. 27, 2017, 2:34 p.m. OK GNU C++ TESTS 162 15 0 2000
30596703 JeffreyLC C Sept. 21, 2017, 6:23 p.m. OK GNU C++ TESTS 162 15 102400 2000
27739196 david-nj C June 12, 2017, 2:02 p.m. OK GNU C++ TESTS 162 15 102400 2000
27139124 vjudge1 C May 15, 2017, 5:07 p.m. OK GNU C++ TESTS 162 15 307200 2000
26885984 shushuhao C May 5, 2017, 5:23 p.m. OK GNU C++ TESTS 162 15 409600 2000
26833365 creative C May 4, 2017, 11:48 a.m. OK GNU C++ TESTS 162 15 1331200 2000
27401556 King_of_Paladins C May 28, 2017, 5:57 a.m. OK GNU C++ TESTS 162 15 1536000 2000
27462013 AkaneSasu C May 31, 2017, 8:23 a.m. OK GNU C++ TESTS 162 15 1536000 2000
25949437 vjudge4 C March 30, 2017, 11:03 a.m. OK GNU C++ TESTS 162 15 1945600 2000
26498302 hchlqlz C April 19, 2017, 2:43 p.m. OK GNU C++ TESTS 162 15 2048000 2000
25868141 orz010orz C March 28, 2017, 8:03 a.m. OK GNU C11 TESTS 162 31 3072000 2000
27138992 CCNU_PeiYue C May 15, 2017, 5:06 p.m. OK GNU C++11 TESTS 162 15 307200 2000
27536248 ArGuTe C June 3, 2017, 5:09 a.m. OK GNU C++11 TESTS 162 15 512000 2000
27268963 jingtian777 C May 21, 2017, 2:27 p.m. OK GNU C++11 TESTS 162 15 1024000 2000
27363070 PTaiba C May 26, 2017, 7:54 p.m. OK GNU C++11 TESTS 162 15 1126400 2000
26967991 vjudge3 C May 9, 2017, 5:45 a.m. OK GNU C++11 TESTS 162 15 1228800 2000
27002863 cvele C May 10, 2017, 8:26 p.m. OK GNU C++11 TESTS 162 15 1843200 2000
27002841 marinac321 C May 10, 2017, 8:24 p.m. OK GNU C++11 TESTS 162 15 1843200 2000
25847957 spatarel C March 27, 2017, 3:31 p.m. OK GNU C++11 TESTS 162 15 2048000 2000
29281341 Max.D. C Aug. 8, 2017, 8:36 a.m. OK GNU C++11 TESTS 162 15 2048000 2000
25855547 korla.march C March 27, 2017, 5:06 p.m. OK GNU C++11 TESTS 162 15 2048000 2000
27710312 CODENT47 C June 10, 2017, 7:28 p.m. OK GNU C++14 TESTS 162 15 409600 2000
27703616 Fortin C June 10, 2017, 9:41 a.m. OK GNU C++14 TESTS 162 15 409600 2000
31962497 Profesora C Nov. 1, 2017, 8:26 p.m. OK GNU C++14 TESTS 162 15 409600 2000
32185862 ELDVN C Nov. 10, 2017, 4:58 a.m. OK GNU C++14 TESTS 162 15 512000 2000
27212135 ginshin C May 19, 2017, 10:19 a.m. OK GNU C++14 TESTS 162 15 512000 2000
27003822 kingsmad C May 10, 2017, 10:29 p.m. OK GNU C++14 TESTS 162 15 512000 2000
31838043 Half-Blood_Prince C Oct. 28, 2017, 1:01 p.m. OK GNU C++14 TESTS 162 15 512000 2000
30025899 yashar_sb_sb C Sept. 3, 2017, 6:59 a.m. OK GNU C++14 TESTS 162 15 614400 2000
27054387 iynaur87 C May 12, 2017, 12:45 p.m. OK GNU C++14 TESTS 162 15 716800 2000
27551068 ifrag C June 3, 2017, 7:29 p.m. OK GNU C++14 TESTS 162 15 716800 2000
59641238 qinding C Aug. 29, 2019, 1:47 a.m. OK GNU C++17 TESTS 162 31 102400 2000
52339644 continuity C April 5, 2019, 9:49 a.m. OK GNU C++17 TESTS 162 31 102400 2000
41983666 Liwj C Aug. 23, 2018, 4:12 a.m. OK GNU C++17 TESTS 162 31 102400 2000
63678930 digu_J C Oct. 28, 2019, 7:15 p.m. OK GNU C++17 TESTS 162 31 307200 2000
55190197 Jostic11 C June 6, 2019, 6:06 a.m. OK GNU C++17 TESTS 162 31 307200 2000
51381119 amnesiac_dusk C March 16, 2019, 4:18 p.m. OK GNU C++17 TESTS 162 31 307200 2000
45226953 sggutier C Nov. 3, 2018, 4:13 a.m. OK GNU C++17 TESTS 162 31 307200 2000
41989628 liujianbo C Aug. 23, 2018, 8:03 a.m. OK GNU C++17 TESTS 162 31 307200 2000
61961663 Boy_of_KutBilim C Oct. 6, 2019, 7:39 a.m. OK GNU C++17 TESTS 162 31 307200 2000
69471371 Abdelrahman_Elhawary C Jan. 24, 2020, 2:38 p.m. OK GNU C++17 TESTS 162 31 409600 2000
69476536 Baroudy C Jan. 24, 2020, 4:21 p.m. OK Java 11 TESTS 162 187 14336000 2000
26451469 ahmed-wael C April 17, 2017, 10:16 a.m. OK Java 8 TESTS 162 109 20582400 2000
25892797 bhishma C March 29, 2017, 10:14 a.m. OK Java 8 TESTS 162 109 20684800 2000
27711269 Key_J C June 10, 2017, 9:02 p.m. OK Java 8 TESTS 162 124 0 2000
67274775 saiyam_88 C Dec. 20, 2019, 9:45 a.m. OK Java 8 TESTS 162 124 0 2000
61588743 Nutella3000 C Oct. 1, 2019, 6:09 a.m. OK Java 8 TESTS 162 124 0 2000
58845891 StayAwayFromBitches C Aug. 15, 2019, 5:18 a.m. OK Java 8 TESTS 162 124 0 2000
54476670 chojh1222 C May 22, 2019, 8:53 a.m. OK Java 8 TESTS 162 124 0 2000
54472303 chojh1222 C May 22, 2019, 6:16 a.m. OK Java 8 TESTS 162 124 0 2000
27475316 JPaulsen C May 31, 2017, 11:14 p.m. OK Java 8 TESTS 162 124 0 2000
27466346 JayVeer C May 31, 2017, 12:21 p.m. OK Java 8 TESTS 162 124 0 2000
25935747 simonmysun C March 29, 2017, 10:16 p.m. OK JavaScript TESTS 162 31 6041600 2000
26569764 Sheriuph C April 21, 2017, 9:53 p.m. OK JavaScript TESTS 162 46 6656000 2000
25875425 artsin666 C March 28, 2017, 1:58 p.m. OK MS C# TESTS 162 46 10649600 2000
29319882 tvhong C Aug. 10, 2017, 7:12 a.m. OK MS C# TESTS 162 61 13516800 2000
26831094 og.kostya C May 4, 2017, 9:04 a.m. OK MS C# TESTS 162 62 6860800 2000
25964109 BLACK_X C March 30, 2017, 9:17 p.m. OK MS C# TESTS 162 62 12390400 2000
25867833 AnatolyTolstobrov C March 28, 2017, 7:48 a.m. OK MS C# TESTS 162 62 13619200 2000
25872953 idee.fixe C March 28, 2017, 12:17 p.m. OK MS C++ TESTS 162 15 2252800 2000
25855063 idee.fixe C March 27, 2017, 4:54 p.m. OK MS C++ TESTS 162 15 2252800 2000
26517177 lugionline C April 20, 2017, 1:16 p.m. OK MS C++ TESTS 162 15 2355200 2000
26460628 DimPas C April 17, 2017, 5:08 p.m. OK MS C++ TESTS 162 15 2355200 2000
25874486 goodhope C March 28, 2017, 1:17 p.m. OK MS C++ TESTS 162 15 2457600 2000
25871716 navie_boy C March 28, 2017, 11:22 a.m. OK MS C++ TESTS 162 15 2457600 2000
25860486 CuriOusQuOkka C March 27, 2017, 9:14 p.m. OK MS C++ TESTS 162 15 2560000 2000
25860166 Yurik C March 27, 2017, 8:49 p.m. OK MS C++ TESTS 162 15 2764800 2000
25877738 CodyMaker C March 28, 2017, 3:44 p.m. OK MS C++ TESTS 162 15 2867200 2000
26097563 q914847518 C April 3, 2017, 11:06 a.m. OK MS C++ TESTS 162 15 3072000 2000
57608839 pseuda C July 23, 2019, 7:25 p.m. OK MS C++ 2017 TESTS 162 31 1228800 2000
25855710 alexey.shchepin C March 27, 2017, 5:11 p.m. OK Ocaml TESTS 162 15 3891200 2000
26034165 s_p C March 31, 2017, 7:36 p.m. OK Perl TESTS 162 61 12185600 2000
25864534 TangentOfA C March 28, 2017, 3:51 a.m. OK PyPy 2 TESTS 162 77 23244800 2000
26095737 mbrc C April 3, 2017, 9:30 a.m. OK PyPy 2 TESTS 162 93 25497600 2000
25866769 ryanr1230 C March 28, 2017, 6:44 a.m. OK PyPy 2 TESTS 162 93 30208000 2000
26193322 T1024 C April 7, 2017, 12:55 p.m. OK PyPy 2 TESTS 162 108 22732800 2000
25846570 masonsbro C March 27, 2017, 3:17 p.m. OK PyPy 2 TESTS 162 124 28979200 2000
26133180 amr.magdy C April 4, 2017, 11:13 p.m. OK PyPy 2 TESTS 162 140 28774400 2000
51453679 soumyasarkar1998 C March 18, 2019, 4:02 p.m. OK PyPy 2 TESTS 162 202 1536000 2000
25851879 Wizmann C March 27, 2017, 4:13 p.m. OK PyPy 2 TESTS 162 483 33177600 2000
32921730 yugle7 C Dec. 4, 2017, 1:19 p.m. OK PyPy 3 TESTS 162 140 28262400 2000
26737052 Naoki_M C April 29, 2017, 12:17 a.m. OK PyPy 3 TESTS 162 140 30208000 2000
63929292 shiv1470 C Oct. 31, 2019, 1:51 p.m. OK PyPy 3 TESTS 162 155 3788800 2000
57314819 BenL C July 19, 2019, 7:51 a.m. OK PyPy 3 TESTS 162 171 6041600 2000
63348948 crazydoggo18 C Oct. 24, 2019, 8:38 p.m. OK PyPy 3 TESTS 162 218 10137600 2000
44272311 111vad111 C Oct. 13, 2018, 7:07 p.m. OK PyPy 3 TESTS 162 233 7987200 2000
39113669 arsrivish2 C June 10, 2018, 11:45 a.m. OK PyPy 3 TESTS 162 264 12595200 2000
56468926 co_devil C July 3, 2019, 10:10 a.m. OK PyPy 3 TESTS 162 280 11161600 2000
39114044 arsrivish2 C June 10, 2018, 11:47 a.m. OK PyPy 3 TESTS 162 280 12390400 2000
52317295 artifexbm C April 4, 2019, 5:44 p.m. OK PyPy 3 TESTS 162 327 11571200 2000
25960856 ZLATKO C March 30, 2017, 6:11 p.m. OK Python 2 TESTS 162 77 5120000 2000
26095714 mbrc C April 3, 2017, 9:29 a.m. OK Python 2 TESTS 162 93 6348800 2000
25877706 fans656 C March 28, 2017, 3:43 p.m. OK Python 2 TESTS 162 109 7475200 2000
25850671 pflueger C March 27, 2017, 3:59 p.m. OK Python 2 TESTS 162 124 5836800 2000
26250293 MichelJ C April 10, 2017, 9:56 a.m. OK Python 2 TESTS 162 124 6041600 2000
25886169 ahxgw C March 29, 2017, 2:17 a.m. OK Python 2 TESTS 162 155 6758400 2000
36943160 laoliumang C April 4, 2018, 8:02 a.m. OK Python 2 TESTS 162 171 8499200 2000
25865447 marry_me_VaLa_MaNuSh C March 28, 2017, 5:15 a.m. OK Python 2 TESTS 162 171 8806400 2000
25849761 vaquan C March 27, 2017, 3:49 p.m. OK Python 2 TESTS 162 171 8806400 2000
26710878 robodobo C April 28, 2017, 12:05 a.m. OK Python 2 TESTS 162 186 8294400 2000
26445505 orailly C April 17, 2017, 4:39 a.m. OK Python 3 TESTS 162 77 6860800 2000
26095687 mbrc C April 3, 2017, 9:27 a.m. OK Python 3 TESTS 162 78 7680000 2000
26446464 orailly C April 17, 2017, 5:43 a.m. OK Python 3 TESTS 162 92 6758400 2000
25867529 rchome C March 28, 2017, 7:29 a.m. OK Python 3 TESTS 162 93 5427200 2000
26826696 huythanhlqd123 C May 4, 2017, 1:33 a.m. OK Python 3 TESTS 162 93 6451200 2000
28276110 yudhik C July 4, 2017, 9 a.m. OK Python 3 TESTS 162 109 6246400 2000
25896991 shali C March 29, 2017, 1:40 p.m. OK Python 3 TESTS 162 109 6553600 2000
32921983 yugle7 C Dec. 4, 2017, 1:30 p.m. OK Python 3 TESTS 162 109 7168000 2000
25878987 forestryks C March 28, 2017, 4:37 p.m. OK Python 3 TESTS 162 124 5836800 2000
26403706 RUxenHxd C April 16, 2017, 4:45 a.m. OK Python 3 TESTS 162 124 6246400 2000
26462432 orailly C April 17, 2017, 6:55 p.m. OK Ruby TESTS 162 93 7065600 2000
25850886 ATSTNG C March 27, 2017, 4:02 p.m. OK Ruby TESTS 162 155 22937600 2000
30294401 Hillmouse C Sept. 12, 2017, 7:35 p.m. OK Rust TESTS 162 31 819200 2000
25865712 kobae964 C March 28, 2017, 5:36 a.m. OK Rust TESTS 162 46 108851200 2000
25849613 odomontois C March 27, 2017, 3:47 p.m. OK Scala TESTS 162 732 24268800 2000

remove filters

Back to search problems