Codeforces Round 206 (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
354 Codeforces Round 206 (Div. 1) FINISHED False 7200 350144999 Oct. 13, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 878 ) E Lucky Number Representation PROGRAMMING constructive algorithms dfs and similar dp 2200

B"We know that lucky digits are digits 4 and 7, however Vasya's got another favorite digit 0 and he assumes it also is lucky! Lucky numbers are such non-negative integers whose decimal record only contains lucky digits. For example, numbers 0, xe2 x80 x8947, xe2 x80 x897074 are lucky, but 1, xe2 x80 x897377, xe2 x80 x89895, xe2 x80 x89 -7 are not. Vasya has t important positive integers he needs to remember. Vasya is quite superstitious and he wants to remember lucky numbers only, so he is asking you for each important number to represent it as a sum of exactly six lucky numbers (Vasya just can't remember more numbers). Then Vasya can just remember these six numbers and calculate the important number at any moment. For each of t important integers represent it as the sum of six lucky numbers or state that this is impossible. The first line contains a single integer t (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89t xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895000). Next t lines contain a single positive integer ni (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ni xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891018) -- the list of important numbers. Please, do not use the %lld to read or write 64-bit integers xd0 xa1++. It is preferred to read the cin, cout streams or the %I64d specifier. Print t lines. The i-th line must contain the answer for the i-th important number: if the solution exists, the line must contain exactly six lucky numbers the sum of which equals ni, if the solution doesn't exist the string must contain a single integer -1. If there are multiple answers print any of them."...

Tutorials

Codeforces Round #206 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
4773012 Gassa E Oct. 13, 2013, 4:26 p.m. OK D TESTS 30 62 1024000 2200
5767685 vietdoan E Jan. 22, 2014, 1:48 a.m. OK FPC TESTS 30 124 102400 2200
4856491 Omelianenko E Oct. 23, 2013, 9:22 p.m. OK FPC TESTS 30 280 0 2200
4774886 popoffka E Oct. 13, 2013, 4:56 p.m. OK FPC TESTS 30 312 0 2200
4788989 DMH E Oct. 15, 2013, 10:57 a.m. OK FPC TESTS 30 561 102400 2200
4776436 thaison1496 E Oct. 13, 2013, 5:21 p.m. OK FPC TESTS 30 1762 0 2200
10539655 lnsuyn E April 1, 2015, 8:28 a.m. OK GNU C TESTS 30 46 0 2200
41964539 Scut82 E Aug. 22, 2018, 11:34 a.m. OK GNU C++ TESTS 30 31 0 2200
20924360 cyand1317 E Sept. 26, 2016, 11:57 a.m. OK GNU C++ TESTS 30 31 0 2200
16767698 bardek E March 17, 2016, 4:28 p.m. OK GNU C++ TESTS 30 31 0 2200
14036606 vjudge4 E Nov. 3, 2015, 3:43 a.m. OK GNU C++ TESTS 30 31 0 2200
11409667 vjudge5 E June 4, 2015, 5:49 a.m. OK GNU C++ TESTS 30 31 0 2200
11409205 vjudge4 E June 4, 2015, 4:41 a.m. OK GNU C++ TESTS 30 31 0 2200
8598989 L_Ecry E Nov. 7, 2014, 6:22 a.m. OK GNU C++ TESTS 30 31 0 2200
8243348 Stilwell E Oct. 16, 2014, 6:04 a.m. OK GNU C++ TESTS 30 31 0 2200
7291478 I_so_sad E July 30, 2014, 9:52 a.m. OK GNU C++ TESTS 30 31 0 2200
7110100 win_ay39 E July 15, 2014, 2:49 p.m. OK GNU C++ TESTS 30 31 0 2200
4774235 White_Bear E Oct. 13, 2013, 4:46 p.m. OK GNU C++0x TESTS 30 31 0 2200
4780658 pratyai E Oct. 14, 2013, 2:42 a.m. OK GNU C++0x TESTS 30 31 204800 2200
9879939 Illidan E Feb. 17, 2015, 8:56 a.m. OK GNU C++0x TESTS 30 46 0 2200
9098987 captainprice21 E Dec. 13, 2014, 7:23 a.m. OK GNU C++0x TESTS 30 46 0 2200
5498818 Zuza E Dec. 23, 2013, 7:54 p.m. OK GNU C++0x TESTS 30 46 0 2200
4785891 sokian E Oct. 14, 2013, 6:13 p.m. OK GNU C++0x TESTS 30 46 0 2200
4778220 savinov E Oct. 13, 2013, 6:17 p.m. OK GNU C++0x TESTS 30 46 0 2200
4778158 liympanda E Oct. 13, 2013, 6:14 p.m. OK GNU C++0x TESTS 30 46 0 2200
4777909 kinodjnz E Oct. 13, 2013, 6:04 p.m. OK GNU C++0x TESTS 30 46 0 2200
4776596 Skird E Oct. 13, 2013, 5:23 p.m. OK GNU C++0x TESTS 30 46 0 2200
11388665 I_love_chickpea E June 2, 2015, 10:47 a.m. OK GNU C++11 TESTS 30 31 0 2200
17524157 fengsuiyan E April 26, 2016, 3:38 p.m. OK GNU C++11 TESTS 30 31 2252800 2200
57893958 lopare E July 28, 2019, 12:50 p.m. OK GNU C++11 TESTS 30 46 0 2200
57820512 py_ultron E July 26, 2019, 10:45 p.m. OK GNU C++11 TESTS 30 46 0 2200
39792744 w446506278 E June 30, 2018, 9:08 a.m. OK GNU C++11 TESTS 30 46 0 2200
22707079 RockyB E Dec. 5, 2016, 8:18 a.m. OK GNU C++11 TESTS 30 46 0 2200
21070631 MaGaroo E Oct. 1, 2016, 1:53 p.m. OK GNU C++11 TESTS 30 46 0 2200
15171368 ToTLeS E Jan. 3, 2016, 5:45 p.m. OK GNU C++11 TESTS 30 46 0 2200
15035822 spetsnaz E Dec. 26, 2015, 6:13 p.m. OK GNU C++11 TESTS 30 46 0 2200
13673896 Quang E Oct. 17, 2015, 3:14 a.m. OK GNU C++11 TESTS 30 46 0 2200
22706108 callisto E Dec. 5, 2016, 6:58 a.m. OK GNU C++14 TESTS 30 31 0 2200
27277290 RNS_JKS E May 22, 2017, 5:12 a.m. OK GNU C++14 TESTS 30 31 204800 2200
34340940 DeadPillow E Jan. 20, 2018, 6:30 a.m. OK GNU C++14 TESTS 30 31 1945600 2200
60747699 Zuizehongquaunha E Sept. 18, 2019, 3:28 a.m. OK GNU C++14 TESTS 30 46 0 2200
22706105 callisto E Dec. 5, 2016, 6:57 a.m. OK GNU C++14 TESTS 30 46 0 2200
59976834 Origenes E Sept. 4, 2019, 6:20 a.m. OK GNU C++14 TESTS 30 46 204800 2200
41270373 Yoshiyuki E Aug. 6, 2018, 9:50 a.m. OK GNU C++14 TESTS 30 46 204800 2200
63112757 ShafinKhadem E Oct. 22, 2019, 8:11 a.m. OK GNU C++14 TESTS 30 46 409600 2200
54221427 MatheusLealV E May 16, 2019, 3:35 a.m. OK GNU C++14 TESTS 30 46 409600 2200
43731857 Nick_Brain E Oct. 3, 2018, 2:25 p.m. OK GNU C++14 TESTS 30 46 409600 2200
56293756 pkgunboat E June 30, 2019, 4:01 a.m. OK GNU C++17 TESTS 30 46 204800 2200
59244290 Arrias E Aug. 21, 2019, 9:56 p.m. OK GNU C++17 TESTS 30 61 0 2200
61775102 fsociety00 E Oct. 3, 2019, 11:29 a.m. OK GNU C++17 TESTS 30 61 204800 2200
58532714 89264270823 E Aug. 10, 2019, 10:20 a.m. OK GNU C++17 TESTS 30 62 0 2200
62651960 Rahul E Oct. 15, 2019, 10:11 p.m. OK GNU C++17 TESTS 30 62 204800 2200
60414173 -is-this-fft- E Sept. 12, 2019, 12:43 a.m. OK GNU C++17 TESTS 30 62 1126400 2200
62591583 Phortox E Oct. 14, 2019, 9:33 p.m. OK GNU C++17 TESTS 30 77 204800 2200
38750619 majk E May 29, 2018, 6:26 p.m. OK GNU C++17 TESTS 30 77 204800 2200
44964436 Randoming E Oct. 27, 2018, 6:20 p.m. OK GNU C++17 TESTS 30 78 0 2200
58470343 superguyjm E Aug. 8, 2019, 11:20 p.m. OK GNU C++17 TESTS 30 78 204800 2200
4775834 bay E Oct. 13, 2013, 5:12 p.m. OK Java 6 TESTS 30 202 307200 2200
4778399 hiukim E Oct. 13, 2013, 6:28 p.m. OK Java 6 TESTS 30 249 204800 2200
4821752 naonao E Oct. 18, 2013, 7:52 p.m. OK Java 6 TESTS 30 265 409600 2200
4873435 mkirsche E Oct. 24, 2013, 9:55 p.m. OK Java 6 TESTS 30 358 409600 2200
4774950 mmaxio E Oct. 13, 2013, 4:57 p.m. OK Java 7 TESTS 30 109 0 2200
4773489 uwi E Oct. 13, 2013, 4:33 p.m. OK Java 7 TESTS 30 109 0 2200
4776060 tanzaku E Oct. 13, 2013, 5:16 p.m. OK Java 7 TESTS 30 109 16076800 2200
4776324 riadwaw E Oct. 13, 2013, 5:20 p.m. OK Java 7 TESTS 30 124 0 2200
4772525 chavit E Oct. 13, 2013, 4:20 p.m. OK Java 7 TESTS 30 124 0 2200
4773297 niyaznigmatul E Oct. 13, 2013, 4:31 p.m. OK Java 7 TESTS 30 140 102400 2200
17280680 alibaba E April 11, 2016, 4:24 p.m. OK Java 7 TESTS 30 155 0 2200
4775831 Vbifial E Oct. 13, 2013, 5:12 p.m. OK Java 7 TESTS 30 156 204800 2200
4801842 m.radwan E Oct. 16, 2013, 2:37 a.m. OK Java 7 TESTS 30 171 0 2200
4772398 qwerty787788 E Oct. 13, 2013, 4:18 p.m. OK Java 7 TESTS 30 218 409600 2200
19971360 martins E Aug. 19, 2016, 9 p.m. OK Java 8 TESTS 30 202 20889600 2200
53111994 vjudge3 E April 22, 2019, 4:16 a.m. OK Java 8 TESTS 30 702 0 2200
4777573 fiver E Oct. 13, 2013, 5:54 p.m. OK MS C# TESTS 30 109 72908800 2200
7816684 azukun E Sept. 17, 2014, 10:20 a.m. OK MS C# TESTS 30 170 5324800 2200
4899100 AliceSchuberg E Oct. 26, 2013, 2:41 a.m. OK MS C++ TESTS 30 31 0 2200
4778113 vml E Oct. 13, 2013, 6:12 p.m. OK MS C++ TESTS 30 31 0 2200
4776757 lzsb E Oct. 13, 2013, 5:25 p.m. OK MS C++ TESTS 30 31 0 2200
4776755 Auster E Oct. 13, 2013, 5:25 p.m. OK MS C++ TESTS 30 31 0 2200
4775326 yokozuna57 E Oct. 13, 2013, 5:04 p.m. OK MS C++ TESTS 30 46 0 2200
4799648 tomas.svab E Oct. 15, 2013, 7:01 p.m. OK MS C++ TESTS 30 46 102400 2200
10612970 AleksanderBalobanov E April 6, 2015, 1:29 p.m. OK MS C++ TESTS 30 46 6144000 2200
14428418 wi_lius E Nov. 23, 2015, 2:52 p.m. OK MS C++ TESTS 30 62 0 2200
14428120 ASBusinessMagnet E Nov. 23, 2015, 2:31 p.m. OK MS C++ TESTS 30 62 0 2200
4782707 lost3030 E Oct. 14, 2013, 9:45 a.m. OK MS C++ TESTS 30 62 0 2200
64480968 jrodrigues E Nov. 7, 2019, 3:55 p.m. OK Rust TESTS 30 124 0 2200

remove filters

Back to search problems