Codeforces Round 157 (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
258 Codeforces Round 157 (Div. 1) FINISHED False 7200 381508197 Dec. 22, 2012, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1454 ) B Little Elephant and Elections PROGRAMMING brute force combinatorics dp 2100

B'There have recently been elections in the zoo. Overall there were 7 main political parties: one of them is the Little Elephant Political Party, 6 other parties have less catchy names. Political parties find their number in the ballot highly important. Overall there are m possible numbers: 1, xe2 x80 x892, xe2 x80 x89..., xe2 x80 x89m. Each of these 7 parties is going to be assigned in some way to exactly one number, at that, two distinct parties cannot receive the same number. The Little Elephant Political Party members believe in the lucky digits 4 and 7. They want to evaluate their chances in the elections. For that, they need to find out, how many correct assignments are there, such that the number of lucky digits in the Little Elephant Political Party ballot number is strictly larger than the total number of lucky digits in the ballot numbers of 6 other parties. Help the Little Elephant Political Party, calculate this number. As the answer can be rather large, print the remainder from dividing it by 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). A single line contains a single positive integer m (7 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the number of possible numbers in the ballot. In a single line print a single integer -- the answer to the problem modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897).'...

Tutorials

Codeforces Round #157 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
2815800 Depool B Dec. 22, 2012, 6:08 p.m. OK Delphi TESTS 30 15 0 2100
2816921 MrJigan1488 B Dec. 22, 2012, 9:13 p.m. OK Delphi TESTS 30 15 31027200 2100
2816626 valeriy.stromov B Dec. 22, 2012, 7:33 p.m. OK Delphi TESTS 30 15 31027200 2100
3019320 AleksanderBalobanov B Jan. 28, 2013, 11:48 a.m. OK Delphi TESTS 30 31 9625600 2100
2819060 Misha100896 B Dec. 23, 2012, 12:25 p.m. OK Delphi TESTS 30 62 0 2100
2811931 vlad107 B Dec. 22, 2012, 4:13 p.m. OK FPC TESTS 30 15 0 2100
2920803 doanminhdragon B Jan. 13, 2013, 5:42 p.m. OK FPC TESTS 30 15 0 2100
2920800 doanminhdragon B Jan. 13, 2013, 5:38 p.m. OK FPC TESTS 30 15 0 2100
2820675 laoriu B Dec. 24, 2012, 2:40 a.m. OK FPC TESTS 30 15 0 2100
2820705 acerpbc B Dec. 24, 2012, 3:01 a.m. OK FPC TESTS 30 15 102400 2100
2819326 Oryshych B Dec. 23, 2012, 1:59 p.m. OK FPC TESTS 30 15 102400 2100
2812482 Alex_2oo8 B Dec. 22, 2012, 4:22 p.m. OK FPC TESTS 30 15 102400 2100
2810448 con_nha_ngheo B Dec. 22, 2012, 3:56 p.m. OK FPC TESTS 30 15 102400 2100
2820676 cold_desert12 B Dec. 24, 2012, 2:41 a.m. OK FPC TESTS 30 15 204800 2100
5997845 Nik_Storm_2010 B March 11, 2014, 4:34 p.m. OK FPC TESTS 30 30 0 2100
2858150 E478 B Dec. 30, 2012, 2:37 p.m. OK GNU C TESTS 30 15 0 2100
2855048 kira B Dec. 29, 2012, 7:59 p.m. OK GNU C TESTS 30 15 0 2100
2815890 kawatea B Dec. 22, 2012, 6:12 p.m. OK GNU C TESTS 30 15 0 2100
2810936 LayCurse B Dec. 22, 2012, 4:01 p.m. OK GNU C TESTS 30 15 0 2100
2817562 cxlove B Dec. 23, 2012, 3:55 a.m. OK GNU C++ TESTS 30 0 0 2100
4144748 Ruki B July 24, 2013, 6:02 a.m. OK GNU C++ TESTS 30 15 0 2100
4141452 xin5739 B July 23, 2013, 1:59 p.m. OK GNU C++ TESTS 30 15 0 2100
4024988 RNS B July 5, 2013, 5:51 a.m. OK GNU C++ TESTS 30 15 0 2100
4024982 RNS B July 5, 2013, 5:51 a.m. OK GNU C++ TESTS 30 15 0 2100
4024976 RNS B July 5, 2013, 5:50 a.m. OK GNU C++ TESTS 30 15 0 2100
4024966 RNS B July 5, 2013, 5:48 a.m. OK GNU C++ TESTS 30 15 0 2100
4024954 RNS B July 5, 2013, 5:47 a.m. OK GNU C++ TESTS 30 15 0 2100
4009981 nihalpi1 B July 4, 2013, 7:45 a.m. OK GNU C++ TESTS 30 15 0 2100
4009495 pragrame B July 4, 2013, 6:33 a.m. OK GNU C++ TESTS 30 15 0 2100
2815058 cafelier B Dec. 22, 2012, 5:20 p.m. OK GNU C++0x TESTS 30 15 0 2100
3410593 UESTC_ElemeNtLz B March 27, 2013, 6:48 a.m. OK GNU C++0x TESTS 30 15 0 2100
3330122 2011330300713 B March 17, 2013, noon OK GNU C++0x TESTS 30 15 0 2100
3330065 2011330300713 B March 17, 2013, 11:42 a.m. OK GNU C++0x TESTS 30 15 0 2100
2819367 MinakoKojima B Dec. 23, 2012, 2:10 p.m. OK GNU C++0x TESTS 30 15 0 2100
2819330 MinakoKojima B Dec. 23, 2012, 2 p.m. OK GNU C++0x TESTS 30 15 0 2100
2817545 2011330300713 B Dec. 23, 2012, 3:50 a.m. OK GNU C++0x TESTS 30 15 0 2100
2816430 roosephu B Dec. 22, 2012, 7 p.m. OK GNU C++0x TESTS 30 15 0 2100
2815963 andreyv B Dec. 22, 2012, 6:16 p.m. OK GNU C++0x TESTS 30 15 0 2100
2815736 kinodjnz B Dec. 22, 2012, 6:05 p.m. OK GNU C++0x TESTS 30 15 0 2100
25955437 magieNoire B March 30, 2017, 2:23 p.m. OK GNU C11 TESTS 30 30 2355200 2100
58784036 rainboy B Aug. 13, 2019, 8:57 p.m. OK GNU C11 TESTS 30 62 0 2100
27842027 huanghongxun B June 17, 2017, 8:59 a.m. OK GNU C++11 TESTS 30 30 0 2100
27183681 vjudge4 B May 17, 2017, 4:37 p.m. OK GNU C++11 TESTS 30 30 0 2100
26879194 arun_prasad B May 5, 2017, 11:35 a.m. OK GNU C++11 TESTS 30 30 0 2100
26878526 arun_prasad B May 5, 2017, 10:55 a.m. OK GNU C++11 TESTS 30 30 0 2100
26878438 arun_prasad B May 5, 2017, 10:50 a.m. OK GNU C++11 TESTS 30 30 0 2100
26878204 arun_prasad B May 5, 2017, 10:37 a.m. OK GNU C++11 TESTS 30 30 0 2100
26878081 arun_prasad B May 5, 2017, 10:28 a.m. OK GNU C++11 TESTS 30 30 0 2100
26877780 arun_prasad B May 5, 2017, 10:06 a.m. OK GNU C++11 TESTS 30 30 0 2100
30935792 Megumi_ B Oct. 2, 2017, 7:17 a.m. OK GNU C++11 TESTS 30 30 0 2100
29618280 Matrix.code B Aug. 20, 2017, 10:26 a.m. OK GNU C++11 TESTS 30 30 0 2100
41241587 vjudge2 B Aug. 5, 2018, 10:42 a.m. OK GNU C++14 TESTS 30 30 0 2100
30935788 vjudge3 B Oct. 2, 2017, 7:17 a.m. OK GNU C++14 TESTS 30 30 0 2100
30861555 vjudge1 B Sept. 30, 2017, 9:58 a.m. OK GNU C++14 TESTS 30 30 0 2100
30859017 vjudge2 B Sept. 30, 2017, 8:20 a.m. OK GNU C++14 TESTS 30 30 0 2100
30859016 vjudge4 B Sept. 30, 2017, 8:20 a.m. OK GNU C++14 TESTS 30 30 0 2100
30859010 vjudge2 B Sept. 30, 2017, 8:20 a.m. OK GNU C++14 TESTS 30 30 0 2100
30627413 iamstg B Sept. 23, 2017, 12:23 a.m. OK GNU C++14 TESTS 30 30 0 2100
30097901 The_Unbeatable B Sept. 5, 2017, 11:27 a.m. OK GNU C++14 TESTS 30 30 0 2100
32137906 Markellonchik B Nov. 8, 2017, 11:36 a.m. OK GNU C++14 TESTS 30 30 0 2100
32538370 193s B Nov. 22, 2017, 1:29 a.m. OK GNU C++14 TESTS 30 30 0 2100
52519646 IGVA B April 9, 2019, 7:55 a.m. OK GNU C++17 TESTS 30 30 0 2100
55099155 vyomkesh B June 4, 2019, 7 p.m. OK GNU C++17 TESTS 30 60 0 2100
61266415 nahid08 B Sept. 25, 2019, 12:53 p.m. OK GNU C++17 TESTS 30 60 0 2100
58397275 failed_coder B Aug. 6, 2019, 4:09 p.m. OK GNU C++17 TESTS 30 60 0 2100
43277801 vjudge1 B Sept. 23, 2018, 1:55 a.m. OK GNU C++17 TESTS 30 60 0 2100
46054293 vjudge2 B Nov. 22, 2018, 9:57 a.m. OK GNU C++17 TESTS 30 60 307200 2100
37689273 Reference B April 28, 2018, 3:06 p.m. OK GNU C++17 TESTS 30 60 3686400 2100
61706810 Phortox B Oct. 2, 2019, 10:21 a.m. OK GNU C++17 TESTS 30 62 0 2100
59269640 vjudge2 B Aug. 22, 2019, 12:11 p.m. OK GNU C++17 TESTS 30 62 0 2100
59132460 vjudge2 B Aug. 20, 2019, 11:31 a.m. OK GNU C++17 TESTS 30 62 0 2100
2824636 tsn636 B Dec. 25, 2012, 6:38 a.m. OK Java 6 TESTS 30 78 0 2100
2859274 mukku B Dec. 30, 2012, 7:41 p.m. OK Java 6 TESTS 30 78 0 2100
2817433 sokokaleb B Dec. 23, 2012, 3 a.m. OK Java 6 TESTS 30 78 0 2100
2832432 Ahmed.Ibrahem B Dec. 27, 2012, 9:59 a.m. OK Java 6 TESTS 30 93 0 2100
2832152 abc_1988_1106 B Dec. 27, 2012, 8:01 a.m. OK Java 6 TESTS 30 93 0 2100
2827879 Eulerdora B Dec. 26, 2012, 6:31 a.m. OK Java 6 TESTS 30 93 0 2100
2818117 Ahmed_Salama B Dec. 23, 2012, 7:20 a.m. OK Java 6 TESTS 30 93 0 2100
2815035 Petr B Dec. 22, 2012, 5:20 p.m. OK Java 6 TESTS 30 93 0 2100
2816644 xiaowuc1 B Dec. 22, 2012, 7:37 p.m. OK Java 6 TESTS 30 93 2252800 2100
2817248 hs484 B Dec. 23, 2012, 12:47 a.m. OK Java 6 TESTS 30 93 2252800 2100
2906033 OgieKako B Jan. 11, 2013, 7:39 p.m. OK Java 7 TESTS 30 78 0 2100
2816239 jiangzhijie B Dec. 22, 2012, 6:39 p.m. OK Java 7 TESTS 30 78 0 2100
2814838 niyaznigmatul B Dec. 22, 2012, 5:14 p.m. OK Java 7 TESTS 30 78 0 2100
2813765 sweiss B Dec. 22, 2012, 4:46 p.m. OK Java 7 TESTS 30 78 0 2100
2811754 Jokser B Dec. 22, 2012, 4:11 p.m. OK Java 7 TESTS 30 78 0 2100
2811289 qwerty787788 B Dec. 22, 2012, 4:05 p.m. OK Java 7 TESTS 30 78 0 2100
3759231 santjuan B May 23, 2013, 4:03 a.m. OK Java 7 TESTS 30 93 0 2100
2816492 mmaxio B Dec. 22, 2012, 7:10 p.m. OK Java 7 TESTS 30 93 0 2100
2816489 mmaxio B Dec. 22, 2012, 7:10 p.m. OK Java 7 TESTS 30 93 0 2100
2815749 ahmed.abdrabo B Dec. 22, 2012, 6:05 p.m. OK Java 7 TESTS 30 93 0 2100
45589444 aminul B Nov. 12, 2018, 11:26 a.m. OK Java 8 TESTS 30 218 0 2100
19277865 Sumeet.Varma B July 20, 2016, 10:32 a.m. OK Java 8 TESTS 30 248 0 2100
12194244 AlexFetisov B July 23, 2015, 5:27 a.m. OK Java 8 TESTS 30 248 0 2100
10141264 Dongmin B March 4, 2015, 6:35 a.m. OK Java 8 TESTS 30 248 0 2100
24812231 MazzForces B Feb. 19, 2017, 11:17 p.m. OK Java 8 TESTS 30 248 20582400 2100
58784035 Dukkha B Aug. 13, 2019, 8:57 p.m. OK Java 8 TESTS 30 280 0 2100
56779026 Oleksandr228 B July 10, 2019, 5:04 a.m. OK Java 8 TESTS 30 310 0 2100
24705261 Ahmad_Elsagheer B Feb. 15, 2017, 8:47 p.m. OK Java 8 TESTS 30 312 20480000 2100
27729112 heifrank B June 12, 2017, 1:13 a.m. OK Java 8 TESTS 30 342 0 2100
11124191 PTNK13091996 B May 17, 2015, 8:38 a.m. OK Java 8 TESTS 30 498 0 2100
2811491 it4.kp B Dec. 22, 2012, 4:07 p.m. OK Mono C# TESTS 30 46 21196800 2100
2861490 HulkHoggan B Dec. 31, 2012, 3:01 p.m. OK MS C++ TESTS 30 15 0 2100
2824243 sm_hossein B Dec. 25, 2012, 3:58 a.m. OK MS C++ TESTS 30 15 0 2100
2822565 Dabek B Dec. 24, 2012, 1:53 p.m. OK MS C++ TESTS 30 15 0 2100
2819543 caustique B Dec. 23, 2012, 3:14 p.m. OK MS C++ TESTS 30 15 0 2100
2817812 wangchaohui B Dec. 23, 2012, 5:37 a.m. OK MS C++ TESTS 30 15 0 2100
3786058 T_W_O_Y B May 28, 2013, 4:26 a.m. OK MS C++ TESTS 30 15 0 2100
3732424 XilinX B May 18, 2013, 7:31 a.m. OK MS C++ TESTS 30 15 0 2100
3660298 Accagain B May 2, 2013, 12:49 p.m. OK MS C++ TESTS 30 15 0 2100
2924462 stgatilov B Jan. 14, 2013, 3:32 p.m. OK MS C++ TESTS 30 15 0 2100
2902270 absi2011 B Jan. 10, 2013, 12:49 p.m. OK MS C++ TESTS 30 15 0 2100
2865425 nealzane B Jan. 2, 2013, 6:22 a.m. OK Python 2 TESTS 30 93 0 2100
15915015 not_bot_but_POT B Feb. 9, 2016, 1:58 p.m. OK Python 2 TESTS 30 156 0 2100
35855603 ______u______ B March 2, 2018, 8:03 p.m. OK Python 2 TESTS 30 186 4608000 2100
35855314 ______n______ B March 2, 2018, 7:58 p.m. OK Python 2 TESTS 30 186 4608000 2100
35854865 _____i_____ B March 2, 2018, 7:50 p.m. OK Python 2 TESTS 30 186 4608000 2100
35854833 _____k_____ B March 2, 2018, 7:50 p.m. OK Python 2 TESTS 30 186 4608000 2100
35843710 ______h______ B March 2, 2018, 3:17 p.m. OK Python 2 TESTS 30 186 4608000 2100
35843561 ______k______ B March 2, 2018, 3:14 p.m. OK Python 2 TESTS 30 186 4608000 2100
35843293 ______i______ B March 2, 2018, 3:09 p.m. OK Python 2 TESTS 30 186 4608000 2100
35841299 ______M______ B March 2, 2018, 2:32 p.m. OK Python 2 TESTS 30 186 4608000 2100
3319139 infinity_blue B March 15, 2013, 6:05 a.m. OK Ruby TESTS 30 78 0 2100
3319124 infinity_blue B March 15, 2013, 6:01 a.m. OK Ruby TESTS 30 93 0 2100

remove filters

Back to search problems