Codeforces Round 153 (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
251 Codeforces Round 153 (Div. 1) FINISHED False 7200 377015399 Dec. 6, 2012, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1034 ) C Number Transformation PROGRAMMING dp greedy number theory 2500

B"Little Petya likes positive integers a lot. Recently his mom has presented him a positive integer a. There's only one thing Petya likes more than numbers: playing with little Masha. It turned out that Masha already has a positive integer b. Petya decided to turn his number a into the number b consecutively performing the operations of the following two types: Petya performs one operation per second. Each time he chooses an operation to perform during the current move, no matter what kind of operations he has performed by that moment. In particular, this implies that he can perform the same operation any number of times in a row. Now he wonders in what minimum number of seconds he could transform his number a into number b. Please note that numbers x in the operations of the second type are selected anew each time, independently of each other. The only line contains three integers a, b (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89b xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891018) and k (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8915). Please do not use the %lld specifier to read or write 64-bit integers in xd0 xa1++. It is preferred to use the cin, cout streams or the %I64d specifier. Print a single integer -- the required minimum number of seconds needed to transform number a into number b. In the first sample the sequence of numbers that Petya gets as he tries to obtain number b is as follows: 10 xe2 x80 x89 xe2 x86 x92 xe2 x80 x89 8 xe2 x80 x89 xe2 x86 x92 xe2 x80 x89 6 xe2 x80 x89 xe2 x86 x92 xe2 x80 x89 4 xe2 x80 x89 xe2 x86 x92 xe2 x80 x89 3 xe2 x80 x89 xe2 x86 x92 xe2 x80 x89 2 xe2 x80 x89 xe2 x86 x92 xe2 x80 x89 1. In the second sample one of the possible sequences is as follows: 6 xe2 x80 x89 xe2 x86 x92 xe2 x80 x89 4 xe2 x80 x89 xe2 x86 x92 xe2 x80 x89 3."...

Tutorials

Editorial of Codeforces Round #153

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3554534 vlad107 C April 16, 2013, 9:32 p.m. OK Delphi TESTS 62 218 17817600 2500
2711183 Timur_Keks C Dec. 6, 2012, 8:03 p.m. OK Delphi TESTS 62 328 6451200 2500
2749862 ruban C Dec. 11, 2012, 6:59 a.m. OK Delphi TESTS 62 390 104243200 2500
2709753 JustN C Dec. 6, 2012, 5:23 p.m. OK FPC TESTS 62 140 2969600 2500
8519562 dwjshift C Nov. 2, 2014, 3:54 a.m. OK FPC TESTS 62 156 1433600 2500
50163367 Philchieh C Feb. 19, 2019, 1:36 p.m. OK FPC TESTS 62 312 1638400 2500
2707976 con_nha_ngheo C Dec. 6, 2012, 4:58 p.m. OK FPC TESTS 62 968 78233600 2500
2855497 nhandi C Dec. 30, 2012, 4 a.m. OK FPC TESTS 62 984 2150400 2500
2772349 nhandi C Dec. 16, 2012, 9:37 a.m. OK FPC TESTS 62 984 2150400 2500
2705867 kawatea C Dec. 6, 2012, 4:28 p.m. OK GNU C TESTS 62 187 1433600 2500
4128406 lazyBit C July 21, 2013, 10:17 a.m. OK GNU C++ TESTS 62 15 102400 2500
14581341 Duc_cmn_Le C Dec. 1, 2015, 8:46 a.m. OK GNU C++ TESTS 62 30 0 2500
5099979 i14 C Nov. 14, 2013, 3:49 p.m. OK GNU C++ TESTS 62 30 0 2500
4525026 Vladyslav C Sept. 20, 2013, 8:59 p.m. OK GNU C++ TESTS 62 30 0 2500
2770238 hogloid C Dec. 15, 2012, 12:59 p.m. OK GNU C++ TESTS 62 31 0 2500
2751851 cacol89 C Dec. 11, 2012, 3:46 p.m. OK GNU C++ TESTS 62 31 0 2500
2751754 cacol89 C Dec. 11, 2012, 3:21 p.m. OK GNU C++ TESTS 62 31 0 2500
3066987 Wasted C Feb. 3, 2013, 12:28 p.m. OK GNU C++ TESTS 62 31 1945600 2500
2751827 cacol89 C Dec. 11, 2012, 3:40 p.m. OK GNU C++ TESTS 62 46 0 2500
2751733 cacol89 C Dec. 11, 2012, 3:17 p.m. OK GNU C++ TESTS 62 46 0 2500
6370577 arthur.nascimento C April 15, 2014, 9:37 p.m. OK GNU C++0x TESTS 62 62 0 2500
2757745 2011330300713 C Dec. 13, 2012, 12:08 p.m. OK GNU C++0x TESTS 62 62 0 2500
4544111 savinov C Sept. 23, 2013, 5:15 p.m. OK GNU C++0x TESTS 62 62 3686400 2500
6469476 wanbo C April 25, 2014, 8:57 a.m. OK GNU C++0x TESTS 62 92 0 2500
9950057 krismaz C Feb. 21, 2015, 4:04 p.m. OK GNU C++0x TESTS 62 92 2867200 2500
6458863 Gaith C April 24, 2014, 7:55 a.m. OK GNU C++0x TESTS 62 92 3174400 2500
6452093 vjudge4 C April 23, 2014, 9:02 a.m. OK GNU C++0x TESTS 62 124 7987200 2500
6013091 yutaka1999 C March 14, 2014, 5:20 a.m. OK GNU C++0x TESTS 62 156 1433600 2500
7680474 akovski C Sept. 4, 2014, 9:23 a.m. OK GNU C++0x TESTS 62 156 7987200 2500
2719150 package.zaic C Dec. 8, 2012, 8:58 a.m. OK GNU C++0x TESTS 62 171 1638400 2500
13722674 usaxena95 C Oct. 19, 2015, 6:34 a.m. OK GNU C++11 TESTS 62 62 0 2500
12334291 totsamyzed C Aug. 4, 2015, 6:46 a.m. OK GNU C++11 TESTS 62 62 0 2500
11971021 qingping95 C July 8, 2015, 11:09 a.m. OK GNU C++11 TESTS 62 62 0 2500
13669686 glassices C Oct. 16, 2015, 5:48 p.m. OK GNU C++11 TESTS 62 62 8601600 2500
10562250 johnasselta C April 3, 2015, 4:33 p.m. OK GNU C++11 TESTS 62 62 11878400 2500
24016935 Viktor_Terziev C Jan. 21, 2017, 5:56 p.m. OK GNU C++11 TESTS 62 62 42188800 2500
54998749 SoiMae C June 3, 2019, 2:39 a.m. OK GNU C++11 TESTS 62 92 0 2500
44341412 Bengal_Tiger C Oct. 15, 2018, 3:49 a.m. OK GNU C++11 TESTS 62 92 0 2500
31180683 ZzZZzzzZZZZZzzzzzzzz C Oct. 10, 2017, 4:09 a.m. OK GNU C++11 TESTS 62 92 0 2500
22213735 AakashHanda C Nov. 14, 2016, 8:45 p.m. OK GNU C++11 TESTS 62 92 0 2500
35813153 murugappan_s C March 1, 2018, 1:55 p.m. OK GNU C++14 TESTS 62 30 1945600 2500
27604908 atoiz C June 6, 2017, 4:32 a.m. OK GNU C++14 TESTS 62 62 1433600 2500
34273129 l_Love_KFC C Jan. 18, 2018, 10:31 a.m. OK GNU C++14 TESTS 62 62 1945600 2500
36294263 sinus_070 C March 15, 2018, 9:05 a.m. OK GNU C++14 TESTS 62 62 3379200 2500
33447030 mjhun C Dec. 20, 2017, 6:40 a.m. OK GNU C++14 TESTS 62 62 4812800 2500
55551884 doped.silicon C June 14, 2019, 7:39 a.m. OK GNU C++14 TESTS 62 62 7168000 2500
67148118 ElangBondol C Dec. 18, 2019, 9:40 a.m. OK GNU C++14 TESTS 62 62 8601600 2500
40090477 des1997 C July 8, 2018, 4:32 p.m. OK GNU C++14 TESTS 62 62 16076800 2500
34629802 AryanSM C Jan. 28, 2018, 10:09 a.m. OK GNU C++14 TESTS 62 62 17920000 2500
61292409 tejasp919 C Sept. 25, 2019, 9:39 p.m. OK GNU C++14 TESTS 62 92 0 2500
40923146 Martin53 C July 29, 2018, 4:14 p.m. OK GNU C++17 TESTS 62 62 0 2500
69281104 aditya_sheth C Jan. 22, 2020, 5:58 a.m. OK GNU C++17 TESTS 62 92 0 2500
69280913 aditya_sheth C Jan. 22, 2020, 5:52 a.m. OK GNU C++17 TESTS 62 92 0 2500
59443627 kr_abhinav C Aug. 25, 2019, 12:21 p.m. OK GNU C++17 TESTS 62 92 0 2500
56043270 harshhx17 C June 25, 2019, 3:20 p.m. OK GNU C++17 TESTS 62 92 0 2500
42022252 TooDumbToWin C Aug. 24, 2018, 9:54 a.m. OK GNU C++17 TESTS 62 92 0 2500
48584237 terminator C Jan. 19, 2019, 6:30 p.m. OK GNU C++17 TESTS 62 92 204800 2500
39350721 cai_lw C June 18, 2018, 8:19 a.m. OK GNU C++17 TESTS 62 92 1433600 2500
50922579 vjudge1 C March 7, 2019, 10:05 a.m. OK GNU C++17 TESTS 62 154 1433600 2500
52340651 Nakagawa.Kanon C April 5, 2019, 10:19 a.m. OK GNU C++17 TESTS 62 154 2867200 2500
2744879 partizan22 C Dec. 9, 2012, 8:49 p.m. OK Java 6 TESTS 62 93 0 2500
2702974 Egor C Dec. 6, 2012, 3:53 p.m. OK Java 6 TESTS 62 156 0 2500
2910872 mukku C Jan. 13, 2013, 11:11 a.m. OK Java 6 TESTS 62 250 0 2500
2715980 ixxa C Dec. 7, 2012, 1:35 p.m. OK Java 6 TESTS 62 250 0 2500
2745064 hs484 C Dec. 9, 2012, 10:31 p.m. OK Java 6 TESTS 62 265 0 2500
2707154 ivanromanov C Dec. 6, 2012, 4:46 p.m. OK Java 6 TESTS 62 281 0 2500
2703805 Petr C Dec. 6, 2012, 4:03 p.m. OK Java 6 TESTS 62 281 0 2500
4786634 mkirsche C Oct. 14, 2013, 9:09 p.m. OK Java 6 TESTS 62 342 102400 2500
3649774 hama-du C April 29, 2013, 2:41 a.m. OK Java 6 TESTS 62 406 2457600 2500
2708302 sweiss C Dec. 6, 2012, 5:03 p.m. OK Java 6 TESTS 62 546 0 2500
2707236 Jokser C Dec. 6, 2012, 4:47 p.m. OK Java 7 TESTS 62 109 102400 2500
2707782 dusty.and.rusty C Dec. 6, 2012, 4:55 p.m. OK Java 7 TESTS 62 125 0 2500
2704273 OgieKako C Dec. 6, 2012, 4:09 p.m. OK Java 7 TESTS 62 218 0 2500
2712141 lonelyboy C Dec. 7, 2012, 12:11 a.m. OK Java 7 TESTS 62 234 102400 2500
2711223 yarrr C Dec. 6, 2012, 8:06 p.m. OK Java 7 TESTS 62 281 0 2500
2705564 qwerty787788 C Dec. 6, 2012, 4:24 p.m. OK Java 7 TESTS 62 312 0 2500
2709824 FattyChicken C Dec. 6, 2012, 5:25 p.m. OK Java 7 TESTS 62 328 0 2500
4446555 santjuan C Sept. 12, 2013, 3:25 a.m. OK Java 7 TESTS 62 716 0 2500
7730735 itukh C Sept. 9, 2014, 7:26 p.m. OK Java 7 TESTS 62 778 19456000 2500
4815165 nickbuelich C Oct. 17, 2013, 4:11 p.m. OK Java 7 TESTS 62 966 34201600 2500
39649367 amnesiac_dusk C June 25, 2018, 12:28 p.m. OK Java 8 TESTS 62 312 0 2500
43506566 aabdelzaher C Sept. 27, 2018, 7:42 p.m. OK Java 8 TESTS 62 342 0 2500
10292422 AlexFetisov C March 15, 2015, 5:28 p.m. OK Java 8 TESTS 62 374 0 2500
15431564 alibaba C Jan. 18, 2016, 6:44 p.m. OK Java 8 TESTS 62 434 0 2500
35775016 Noureldin C Feb. 27, 2018, 8:54 p.m. OK Java 8 TESTS 62 498 20684800 2500
19287869 Sumeet.Varma C July 20, 2016, 8:17 p.m. OK Java 8 TESTS 62 592 0 2500
10140002 Dongmin C March 4, 2015, 2:47 a.m. OK Java 8 TESTS 62 686 0 2500
2714378 mylifefordota C Dec. 7, 2012, 8:39 a.m. OK Mono C# TESTS 62 250 24166400 2500
2708160 it4.kp C Dec. 6, 2012, 5:01 p.m. OK Mono C# TESTS 62 750 10240000 2500
2715585 frussi C Dec. 7, 2012, 12:28 p.m. OK MS C++ TESTS 62 46 0 2500
2863230 DenDroiD C Jan. 1, 2013, 10:34 a.m. OK MS C++ TESTS 62 46 0 2500
2708443 YX201314 C Dec. 6, 2012, 5:05 p.m. OK MS C++ TESTS 62 62 5222400 2500
8166247 LVA007 C Oct. 10, 2014, 1:59 p.m. OK MS C++ TESTS 62 92 20070400 2500
2709754 Reshetnikov_Ivan C Dec. 6, 2012, 5:23 p.m. OK MS C++ TESTS 62 93 0 2500
9436860 kuzmichev_dima C Jan. 15, 2015, 2:37 p.m. OK MS C++ TESTS 62 124 1536000 2500
9437312 PopovkinAndrey C Jan. 15, 2015, 3:48 p.m. OK MS C++ TESTS 62 124 11264000 2500
2707701 Monyura C Dec. 6, 2012, 4:54 p.m. OK MS C++ TESTS 62 140 1433600 2500
2708624 aa2985759 C Dec. 6, 2012, 5:07 p.m. OK MS C++ TESTS 62 140 4096000 2500
2711812 ADJA C Dec. 6, 2012, 9:40 p.m. OK MS C++ TESTS 62 140 7987200 2500

remove filters

Back to search problems