Codeforces Round 289 (Div. 2, ACM ICPC Rules)

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
509 Codeforces Round 289 (Div. 2, ACM ICPC Rules) FINISHED False 10800 314906404 Jan. 31, 2015, noon

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2115 ) C Sums of Digits PROGRAMMING dp greedy implementation 2000

B"Vasya had a strictly increasing sequence of positive integers a1, ..., an. Vasya used it to build a new sequence b1, ..., bn, where bi is the sum of digits of ai's decimal representation. Then sequence ai got lost and all that remained is sequence bi. Vasya wonders what the numbers ai could be like. Of all the possible options he likes the one sequence with the minimum possible last number an. Help Vasya restore the initial sequence. It is guaranteed that such a sequence always exists. The first line contains a single integer number n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89300). Next n lines contain integer numbers b1, ..., bn -- the required sums of digits. All bi belong to the range 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89300. Print n integer numbers, one per line -- the correct option for numbers ai, in order of following in sequence. The sequence should be strictly increasing. The sum of digits of the i-th number should be equal to bi. If there are multiple sequences with least possible number an, print any of them. Print the numbers without leading zeroes."...

Tutorials

Tutorial CodeForces Round 289 (Div.2) (Second Winter Computer Camp Selection 2015)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
9649328 rais.fathin38 C Jan. 31, 2015, 1:22 p.m. OK D TESTS 21 15 1024000 2000
9657892 AHTuTTuTyX C Jan. 31, 2015, 5:53 p.m. OK Delphi TESTS 21 31 102400 2000
9657948 Valerich C Jan. 31, 2015, 5:59 p.m. OK FPC TESTS 21 46 512000 2000
33246577 AsahiKasugano C Dec. 14, 2017, 5:07 p.m. OK FPC TESTS 21 46 2048000 2000
11183832 chenjb C May 21, 2015, 3:02 a.m. OK FPC TESTS 21 77 0 2000
9714786 JeeJee C Feb. 4, 2015, 12:54 p.m. OK FPC TESTS 21 77 0 2000
9655838 Freedom C Jan. 31, 2015, 2:59 p.m. OK FPC TESTS 21 77 1024000 2000
12017535 I_love_Hoang_Minh_Trang C July 12, 2015, 10:12 a.m. OK FPC TESTS 21 77 2150400 2000
9718044 Paige C Feb. 4, 2015, 3:20 p.m. OK FPC TESTS 21 78 0 2000
9656342 SuperTeemo C Jan. 31, 2015, 3:20 p.m. OK FPC TESTS 21 78 307200 2000
9655635 misterfourtytwo C Jan. 31, 2015, 2:57 p.m. OK FPC TESTS 21 78 307200 2000
11183594 vjudge4 C May 21, 2015, 1:49 a.m. OK FPC TESTS 21 93 0 2000
9649085 sigkill-uw C Jan. 31, 2015, 1:19 p.m. OK GNU C TESTS 21 15 0 2000
12320275 binyang C Aug. 3, 2015, 3:01 a.m. OK GNU C TESTS 21 15 0 2000
9768909 marche147 C Feb. 8, 2015, 7:15 a.m. OK GNU C TESTS 21 15 0 2000
9738577 anzal_efficient C Feb. 6, 2015, 5:13 p.m. OK GNU C TESTS 21 15 0 2000
9663576 LochNess C Feb. 1, 2015, 9:17 a.m. OK GNU C TESTS 21 15 0 2000
10455646 abhishekgarg C March 26, 2015, 9:26 a.m. OK GNU C TESTS 21 30 0 2000
9649574 120302508 C Jan. 31, 2015, 1:26 p.m. OK GNU C TESTS 21 30 0 2000
21638779 bhaukaal C Oct. 21, 2016, 10:33 a.m. OK GNU C TESTS 21 31 0 2000
9925217 Chipe1 C Feb. 19, 2015, 11:57 a.m. OK GNU C TESTS 21 31 0 2000
10212768 CsJ0oe C March 8, 2015, 9:35 p.m. OK GNU C TESTS 21 31 102400 2000
27055721 vjudge4 C May 12, 2017, 1:53 p.m. OK GNU C++ TESTS 21 15 0 2000
22191663 Gold_7 C Nov. 13, 2016, 11:26 a.m. OK GNU C++ TESTS 21 15 0 2000
22190741 EnjoyYourLife C Nov. 13, 2016, 10:28 a.m. OK GNU C++ TESTS 21 15 0 2000
18907341 hardiknegi C July 5, 2016, 8:42 p.m. OK GNU C++ TESTS 21 15 0 2000
17034165 2015190026 C March 30, 2016, 12:54 p.m. OK GNU C++ TESTS 21 15 0 2000
16482378 vjudge1 C March 3, 2016, 12:27 p.m. OK GNU C++ TESTS 21 15 0 2000
16299713 2360 C Feb. 23, 2016, 8:40 p.m. OK GNU C++ TESTS 21 15 0 2000
15147366 Sofyana C Jan. 1, 2016, 11:18 a.m. OK GNU C++ TESTS 21 15 0 2000
15142514 HappyNewYearMike C Dec. 31, 2015, 10:34 p.m. OK GNU C++ TESTS 21 15 0 2000
13910312 130705009 C Oct. 28, 2015, 7:45 a.m. OK GNU C++ TESTS 21 15 0 2000
10119948 uuuuuu C March 2, 2015, 2:03 p.m. OK GNU C++0x TESTS 21 15 0 2000
10348311 HowardChung C March 19, 2015, 12:03 p.m. OK GNU C++0x TESTS 21 15 0 2000
10284482 urusant C March 15, 2015, 8:12 a.m. OK GNU C++0x TESTS 21 15 0 2000
9925584 betaveros C Feb. 19, 2015, 12:36 p.m. OK GNU C++0x TESTS 21 15 0 2000
9867917 gkevinyen5418 C Feb. 16, 2015, 8:53 a.m. OK GNU C++0x TESTS 21 15 0 2000
9822272 whai C Feb. 14, 2015, 1:22 a.m. OK GNU C++0x TESTS 21 15 0 2000
9820206 Llop C Feb. 13, 2015, 8:17 p.m. OK GNU C++0x TESTS 21 15 0 2000
9805864 itytwt C Feb. 12, 2015, 9:09 a.m. OK GNU C++0x TESTS 21 15 0 2000
9803942 GugaMA C Feb. 12, 2015, 1:53 a.m. OK GNU C++0x TESTS 21 15 0 2000
9794857 zyeric C Feb. 11, 2015, 4:07 a.m. OK GNU C++0x TESTS 21 15 0 2000
57751321 rainboy C July 25, 2019, 2:52 p.m. OK GNU C11 TESTS 21 171 0 2000
21877722 TheMaverick C Oct. 29, 2016, 5:47 p.m. OK GNU C++11 TESTS 21 15 0 2000
21845262 kongroo C Oct. 28, 2016, 11:36 a.m. OK GNU C++11 TESTS 21 15 0 2000
21642170 BBuf C Oct. 21, 2016, 1:07 p.m. OK GNU C++11 TESTS 21 15 0 2000
21236281 vjudge5 C Oct. 6, 2016, 1:45 p.m. OK GNU C++11 TESTS 21 15 0 2000
19595647 DatTenNayChoNgan C Aug. 3, 2016, 10:28 a.m. OK GNU C++11 TESTS 21 15 0 2000
19413478 fei6409 C July 26, 2016, 2:48 a.m. OK GNU C++11 TESTS 21 15 0 2000
19386133 abigcat C July 24, 2016, 3:08 p.m. OK GNU C++11 TESTS 21 15 0 2000
16782798 akaring C March 18, 2016, 1:46 p.m. OK GNU C++11 TESTS 21 15 0 2000
16532312 aka.Sohieb C March 5, 2016, 11:29 a.m. OK GNU C++11 TESTS 21 15 0 2000
22720457 pikmike C Dec. 5, 2016, 10:37 p.m. OK GNU C++11 TESTS 21 15 0 2000
31933182 letmecode23 C Oct. 31, 2017, 8:25 p.m. OK GNU C++14 TESTS 21 15 0 2000
31066641 mridul1809 C Oct. 6, 2017, 1:12 p.m. OK GNU C++14 TESTS 21 15 0 2000
27410953 srinu37 C May 28, 2017, 11:26 a.m. OK GNU C++14 TESTS 21 15 0 2000
22577055 AshishYadav C Nov. 28, 2016, 1:12 p.m. OK GNU C++14 TESTS 21 15 0 2000
54395658 whyamievenhere C May 19, 2019, 7:49 p.m. OK GNU C++14 TESTS 21 15 0 2000
29803791 danya.smelskiy C Aug. 26, 2017, 10:28 a.m. OK GNU C++14 TESTS 21 15 102400 2000
22645344 EliteWantsYou C Dec. 1, 2016, 5:34 p.m. OK GNU C++14 TESTS 21 15 204800 2000
21014261 MadNick C Sept. 30, 2016, 12:46 p.m. OK GNU C++14 TESTS 21 15 204800 2000
56862063 vjudge2 C July 11, 2019, 11:43 p.m. OK GNU C++14 TESTS 21 15 204800 2000
39077637 Dalgerok C June 9, 2018, 7:50 p.m. OK GNU C++14 TESTS 21 15 307200 2000
57251450 vjudge3 C July 17, 2019, 11:29 p.m. OK GNU C++17 TESTS 21 15 0 2000
54150605 livyx C May 14, 2019, 11:33 p.m. OK GNU C++17 TESTS 21 15 0 2000
39200538 Hossam C June 12, 2018, 8:04 p.m. OK GNU C++17 TESTS 21 15 204800 2000
39200781 Hossam C June 12, 2018, 8:19 p.m. OK GNU C++17 TESTS 21 15 204800 2000
49131855 vjudge5 C Jan. 29, 2019, 5 a.m. OK GNU C++17 TESTS 21 15 307200 2000
45217079 tfg C Nov. 2, 2018, 6:34 p.m. OK GNU C++17 TESTS 21 15 409600 2000
40902584 nekko C July 29, 2018, 2:50 a.m. OK GNU C++17 TESTS 21 30 0 2000
69553453 Gareton C Jan. 26, 2020, 7:37 a.m. OK GNU C++17 TESTS 21 30 0 2000
65409857 JBer C Nov. 20, 2019, 3:21 a.m. OK GNU C++17 TESTS 21 30 0 2000
54380035 hkyiitd C May 19, 2019, 10:30 a.m. OK GNU C++17 TESTS 21 30 0 2000
63108226 120405217 C Oct. 22, 2019, 6:08 a.m. OK Go TESTS 21 31 0 2000
55609838 354898002 C June 16, 2019, 4:48 a.m. OK Go TESTS 21 374 204800 2000
9658708 PrakharJain C Jan. 31, 2015, 7:31 p.m. OK Java 6 TESTS 21 108 0 2000
9657652 mukeshmit C Jan. 31, 2015, 5:12 p.m. OK Java 6 TESTS 21 233 0 2000
9652341 dugg C Jan. 31, 2015, 2:06 p.m. OK Java 6 TESTS 21 421 0 2000
9771464 Nusratbek C Feb. 8, 2015, 1:05 p.m. OK Java 7 TESTS 21 77 0 2000
9730784 megaspazz C Feb. 5, 2015, 7:02 p.m. OK Java 7 TESTS 21 77 0 2000
9651021 pitfall C Jan. 31, 2015, 1:46 p.m. OK Java 7 TESTS 21 77 204800 2000
10853541 cc4001 C April 24, 2015, 9:50 p.m. OK Java 7 TESTS 21 77 47513600 2000
9650286 Azat_Yusupov C Jan. 31, 2015, 1:35 p.m. OK Java 7 TESTS 21 78 0 2000
10923641 OmniSliver C April 28, 2015, 9:03 p.m. OK Java 7 TESTS 21 78 47411200 2000
14120658 DukeOfYork C Nov. 7, 2015, 9:27 a.m. OK Java 7 TESTS 21 93 0 2000
9821394 jlinge C Feb. 13, 2015, 10:37 p.m. OK Java 7 TESTS 21 93 0 2000
9672414 Parikh C Feb. 2, 2015, 6:26 a.m. OK Java 7 TESTS 21 93 0 2000
9672332 Lewin C Feb. 2, 2015, 6:14 a.m. OK Java 7 TESTS 21 93 0 2000
27720588 Kammola C June 11, 2017, 12:11 p.m. OK Java 8 TESTS 21 109 0 2000
15759837 Abkreno94 C Feb. 2, 2016, 11:44 p.m. OK Java 8 TESTS 21 109 0 2000
15759827 Abkreno94 C Feb. 2, 2016, 11:43 p.m. OK Java 8 TESTS 21 109 0 2000
9708793 stan C Feb. 4, 2015, 4:55 a.m. OK Java 8 TESTS 21 109 0 2000
9704729 Pimpom C Feb. 3, 2015, 5:55 p.m. OK Java 8 TESTS 21 109 0 2000
9694403 youtarou C Feb. 3, 2015, 2:42 a.m. OK Java 8 TESTS 21 109 0 2000
9653827 Witalia C Jan. 31, 2015, 2:30 p.m. OK Java 8 TESTS 21 109 0 2000
15759859 Abkreno94 C Feb. 2, 2016, 11:48 p.m. OK Java 8 TESTS 21 124 0 2000
11666177 mopodao C June 19, 2015, 10:19 a.m. OK Java 8 TESTS 21 124 0 2000
9819246 DeJw C Feb. 13, 2015, 6:07 p.m. OK Java 8 TESTS 21 124 0 2000
10312480 Reshetnikov_Ivan C March 17, 2015, 4:09 p.m. OK JavaScript TESTS 21 46 1433600 2000
11951812 og.kostya C July 6, 2015, 6:20 p.m. OK MS C# TESTS 21 46 716800 2000
9652729 freepvps C Jan. 31, 2015, 2:12 p.m. OK MS C# TESTS 21 171 3891200 2000
21891392 vjudge5 C Oct. 30, 2016, 11:39 a.m. OK MS C++ TESTS 21 15 0 2000
12642452 ALEXKIRNAS C Aug. 22, 2015, 12:47 p.m. OK MS C++ TESTS 21 15 0 2000
12089747 qsmoonxs C July 17, 2015, 1:27 a.m. OK MS C++ TESTS 21 15 0 2000
12073321 vjudge5 C July 15, 2015, 3:32 p.m. OK MS C++ TESTS 21 15 0 2000
11666394 SabakuNoGaara C June 19, 2015, 10:32 a.m. OK MS C++ TESTS 21 15 0 2000
10336363 helecopter C March 18, 2015, 11:40 a.m. OK MS C++ TESTS 21 15 0 2000
10232486 FxF C March 10, 2015, 11:36 p.m. OK MS C++ TESTS 21 15 0 2000
9776871 out111 C Feb. 9, 2015, 4 a.m. OK MS C++ TESTS 21 15 0 2000
9725154 SCUTE C Feb. 5, 2015, 9:05 a.m. OK MS C++ TESTS 21 15 0 2000
9666676 zhangJvv C Feb. 1, 2015, 2:36 p.m. OK MS C++ TESTS 21 15 0 2000
57511506 CtrlAlt C July 22, 2019, 1:59 p.m. OK MS C++ 2017 TESTS 21 31 0 2000
9653451 Quimbee C Jan. 31, 2015, 2:24 p.m. OK Ocaml TESTS 21 31 204800 2000
9660002 rsFalse C Jan. 31, 2015, 10:52 p.m. OK Perl TESTS 21 343 102400 2000
9660148 rsFalse C Jan. 31, 2015, 11:28 p.m. OK Perl TESTS 21 358 0 2000
9677815 rsFalse C Feb. 2, 2015, 3:52 p.m. OK Perl TESTS 21 405 0 2000
18919201 Yash_ C July 6, 2016, 1:09 p.m. OK PyPy 2 TESTS 21 140 2048000 2000
9867520 Wizmann C Feb. 16, 2015, 8:09 a.m. OK PyPy 2 TESTS 21 171 2457600 2000
10156526 dr.ikros C March 5, 2015, 5:50 a.m. OK PyPy 3 TESTS 21 202 5324800 2000
9662296 orailly C Feb. 1, 2015, 6:55 a.m. OK Python 2 TESTS 21 61 102400 2000
9782485 Eibe C Feb. 9, 2015, 5:35 p.m. OK Python 2 TESTS 21 62 409600 2000
10366831 Bowie C March 20, 2015, 1:31 p.m. OK Python 2 TESTS 21 77 0 2000
9672423 object_oriented_program C Feb. 2, 2015, 6:27 a.m. OK Python 2 TESTS 21 77 0 2000
9677999 gikieng C Feb. 2, 2015, 4:13 p.m. OK Python 2 TESTS 21 77 102400 2000
9677484 Guty C Feb. 2, 2015, 3:19 p.m. OK Python 2 TESTS 21 77 102400 2000
9657730 saurabh3240 C Jan. 31, 2015, 5:26 p.m. OK Python 2 TESTS 21 124 102400 2000
9655778 NeverSayNever C Jan. 31, 2015, 2:59 p.m. OK Python 2 TESTS 21 139 102400 2000
9654908 Cyin C Jan. 31, 2015, 2:47 p.m. OK Python 2 TESTS 21 155 0 2000
9654962 loserup C Jan. 31, 2015, 2:47 p.m. OK Python 2 TESTS 21 156 409600 2000
9662259 orailly C Feb. 1, 2015, 6:51 a.m. OK Python 3 TESTS 21 62 102400 2000
9697929 qsqx C Feb. 3, 2015, 8:24 a.m. OK Python 3 TESTS 21 77 102400 2000
9654695 PrimuS C Jan. 31, 2015, 2:44 p.m. OK Python 3 TESTS 21 77 307200 2000
33359285 yugle7 C Dec. 17, 2017, 5:58 p.m. OK Python 3 TESTS 21 77 5632000 2000
9668367 xorek222 C Feb. 1, 2015, 5:53 p.m. OK Python 3 TESTS 21 93 204800 2000
35884292 ______u______ C March 3, 2018, 1:09 p.m. OK Python 3 TESTS 21 93 5632000 2000
35884013 ______n______ C March 3, 2018, 1:03 p.m. OK Python 3 TESTS 21 93 5632000 2000
35883249 _____k_____ C March 3, 2018, 12:50 p.m. OK Python 3 TESTS 21 93 5632000 2000
35882871 _____i_____ C March 3, 2018, 12:45 p.m. OK Python 3 TESTS 21 93 5632000 2000
35872675 ______h______ C March 3, 2018, 7:16 a.m. OK Python 3 TESTS 21 93 5632000 2000
9677385 Chiba C Feb. 2, 2015, 3:08 p.m. OK Ruby TESTS 21 62 307200 2000
9676987 Chiba C Feb. 2, 2015, 2:36 p.m. OK Ruby TESTS 21 77 409600 2000
9655645 cielavenir C Jan. 31, 2015, 2:57 p.m. OK Ruby TESTS 21 77 409600 2000

remove filters

Back to search problems