Codeforces Round 174 (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
283 Codeforces Round 174 (Div. 1) FINISHED False 7500 368288999 March 17, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 536 ) D Cows and Cool Sequences PROGRAMMING dp math number theory 2400

B'Bessie and the cows have recently been playing with "cool" sequences and are trying to construct some. Unfortunately they are bad at arithmetic, so they need your help! A pair (x, xe2 x80 x89y) of positive integers is "cool" if x can be expressed as the sum of y consecutive integers (not necessarily positive). A sequence (a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an) is "cool" if the pairs (a1, xe2 x80 x89a2), xe2 x80 x89(a2, xe2 x80 x89a3), xe2 x80 x89..., xe2 x80 x89(an xe2 x80 x89- xe2 x80 x891, xe2 x80 x89an) are all cool. The cows have a sequence of n positive integers, a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an. In one move, they may replace some ai with any other positive integer (there are no other limits on the new value of ai). Determine the smallest number of moves needed to make the resulting sequence cool. The first line contains a single integer, n (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895000). The next line contains n space-separated integers, a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891015). 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. A single integer, the minimum number of ai that must be changed to make the sequence cool. In the first sample, the sequence is already cool, so we don 't need to change any elements. In the second sample, we can change a2 to 5 and a3 to 10 to make (20, 5, 10, 4) which is cool. This changes 2 elements.'...

Tutorials

Editorial for Codeforces #174

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3412767 Furko D March 27, 2013, 4:43 p.m. OK FPC TESTS 49 468 409600 2400
3660009 janko96 D May 2, 2013, 11:08 a.m. OK FPC TESTS 49 500 204800 2400
3365631 Timur_Keks D March 21, 2013, 1:57 p.m. OK FPC TESTS 49 578 204800 2400
3478969 ommyzhang D April 6, 2013, 7:19 a.m. OK FPC TESTS 49 734 102400 2400
3356648 zscc D March 19, 2013, 12:32 p.m. OK FPC TESTS 49 812 204800 2400
3535763 atpec D April 14, 2013, 2:41 p.m. OK GNU C TESTS 49 328 102400 2400
3359574 2010031220 D March 20, 2013, 6:50 a.m. OK GNU C++ TESTS 49 250 102400 2400
3359568 2010031220 D March 20, 2013, 6:48 a.m. OK GNU C++ TESTS 49 250 102400 2400
3359564 2010031220 D March 20, 2013, 6:46 a.m. OK GNU C++ TESTS 49 250 102400 2400
3345971 ACube D March 17, 2013, 8:43 p.m. OK GNU C++ TESTS 49 265 102400 2400
3345940 ACube D March 17, 2013, 8:39 p.m. OK GNU C++ TESTS 49 265 102400 2400
3345964 ACube D March 17, 2013, 8:41 p.m. OK GNU C++ TESTS 49 281 102400 2400
3365615 fnoifgyu D March 21, 2013, 1:54 p.m. OK GNU C++ TESTS 49 281 204800 2400
4024594 tmt514 D July 5, 2013, 3:54 a.m. OK GNU C++ TESTS 49 296 102400 2400
3965848 DemiGuo D June 27, 2013, 3:39 a.m. OK GNU C++ TESTS 49 296 102400 2400
3358130 DmitriyH D March 19, 2013, 5:26 p.m. OK GNU C++ TESTS 49 296 102400 2400
3349981 BryantMark D March 18, 2013, 9:42 a.m. OK GNU C++0x TESTS 49 296 102400 2400
6061131 FancyCoder D March 18, 2014, 1:06 p.m. OK GNU C++0x TESTS 49 342 102400 2400
3348167 lcch D March 18, 2013, 4:53 a.m. OK GNU C++0x TESTS 49 375 102400 2400
3354143 MinakoKojima D March 18, 2013, 10:16 p.m. OK GNU C++0x TESTS 49 406 614400 2400
3340310 GuyUpLion D March 17, 2013, 4:52 p.m. OK GNU C++0x TESTS 49 421 102400 2400
9399501 arthur.nascimento D Jan. 10, 2015, 7:10 p.m. OK GNU C++0x TESTS 49 466 307200 2400
7570116 wanbo D Aug. 25, 2014, 2:52 a.m. OK GNU C++0x TESTS 49 468 102400 2400
10353843 sdya D March 19, 2015, 6:30 p.m. OK GNU C++0x TESTS 49 560 102400 2400
10024547 zxc901 D Feb. 25, 2015, 7:19 p.m. OK GNU C++0x TESTS 49 560 102400 2400
10271845 desert97 D March 14, 2015, 12:32 p.m. OK GNU C++0x TESTS 49 592 102400 2400
47146342 tianyi_luo D Dec. 17, 2018, 2:49 a.m. OK GNU C++11 TESTS 49 342 102400 2400
50683795 Daniel_Yeh D March 2, 2019, 12:45 p.m. OK GNU C++11 TESTS 49 372 102400 2400
56166497 2016wudi D June 27, 2019, 2:30 p.m. OK GNU C++11 TESTS 49 374 102400 2400
55664752 xielinhan D June 17, 2019, 2:22 a.m. OK GNU C++11 TESTS 49 374 102400 2400
55075825 SoiMae D June 4, 2019, 8:32 a.m. OK GNU C++11 TESTS 49 374 102400 2400
21884839 returnzoo D Oct. 30, 2016, 1:18 a.m. OK GNU C++11 TESTS 49 404 0 2400
18896351 RNS_CUS D July 5, 2016, 8:51 a.m. OK GNU C++11 TESTS 49 404 102400 2400
57821352 py_ultron D July 26, 2019, 11:34 p.m. OK GNU C++11 TESTS 49 404 204800 2400
17130099 freebsdx D April 2, 2016, 12:38 p.m. OK GNU C++11 TESTS 49 404 2048000 2400
34274062 zhangzy D Jan. 18, 2018, 11:22 a.m. OK GNU C++11 TESTS 49 404 2150400 2400
54728929 bhargav_0085 D May 27, 2019, 9:24 p.m. OK GNU C++14 TESTS 49 374 0 2400
54728945 bhargav_0085 D May 27, 2019, 9:25 p.m. OK GNU C++14 TESTS 49 374 102400 2400
66564702 DeadPillow D Dec. 9, 2019, 9:01 p.m. OK GNU C++14 TESTS 49 404 102400 2400
65523163 ShinYo D Nov. 22, 2019, 9:12 a.m. OK GNU C++14 TESTS 49 404 204800 2400
29191755 ascchrvalstr D Aug. 4, 2017, 11:02 a.m. OK GNU C++14 TESTS 49 404 1945600 2400
29191377 MAGRANT D Aug. 4, 2017, 10:42 a.m. OK GNU C++14 TESTS 49 404 1945600 2400
36230063 kuppu D March 12, 2018, 4:38 p.m. OK GNU C++14 TESTS 49 404 2048000 2400
23662365 creatnx D Jan. 9, 2017, 8:15 a.m. OK GNU C++14 TESTS 49 404 2048000 2400
34274259 orbitingflea D Jan. 18, 2018, 11:33 a.m. OK GNU C++14 TESTS 49 434 1945600 2400
67198381 ElangBondol D Dec. 19, 2019, 10 a.m. OK GNU C++14 TESTS 49 436 307200 2400
52253713 ruo D April 3, 2019, 3:29 a.m. OK GNU C++17 TESTS 49 342 102400 2400
47156444 Shayan.P D Dec. 17, 2018, 7:09 a.m. OK GNU C++17 TESTS 49 342 102400 2400
45981713 brimix__ D Nov. 20, 2018, 12:46 a.m. OK GNU C++17 TESTS 49 372 409600 2400
61606659 xuanquang1999 D Oct. 1, 2019, 12:53 p.m. OK GNU C++17 TESTS 49 374 102400 2400
48528951 BackOnTrack D Jan. 18, 2019, 10:36 a.m. OK GNU C++17 TESTS 49 374 409600 2400
47305578 _MGH_ D Dec. 20, 2018, 4:30 p.m. OK GNU C++17 TESTS 49 404 102400 2400
45180876 dthangnguyen19 D Nov. 1, 2018, 5:02 p.m. OK GNU C++17 TESTS 49 436 307200 2400
69191347 kazuki08 D Jan. 20, 2020, 1:36 p.m. OK GNU C++17 TESTS 49 466 204800 2400
39069377 majk D June 9, 2018, 12:35 p.m. OK GNU C++17 TESTS 49 468 102400 2400
48200442 mex D Jan. 11, 2019, 5:05 a.m. OK GNU C++17 TESTS 49 498 409600 2400
3361004 bsrkaditya D March 20, 2013, 1:42 p.m. OK Java 6 TESTS 49 1437 0 2400
3345158 Egor D March 17, 2013, 7:29 p.m. OK Java 7 TESTS 49 625 0 2400
3348719 ftiasch D March 18, 2013, 6:16 a.m. OK Java 7 TESTS 49 687 0 2400
3339006 mmaxio D March 17, 2013, 4:39 p.m. OK Java 7 TESTS 49 765 0 2400
3342524 yaro D March 17, 2013, 5:24 p.m. OK Java 7 TESTS 49 781 0 2400
5087779 fnozoszzt D Nov. 13, 2013, 1:24 p.m. OK Java 7 TESTS 49 998 204800 2400
10564145 AlexFetisov D April 3, 2015, 8:31 p.m. OK Java 8 TESTS 49 996 0 2400
3363672 jkl51310 D March 21, 2013, 7:07 a.m. OK MS C++ TESTS 49 453 102400 2400
3344564 -DMYTRO- D March 17, 2013, 7:07 p.m. OK MS C++ TESTS 49 468 102400 2400
3341005 al13n D March 17, 2013, 5 p.m. OK MS C++ TESTS 49 468 102400 2400
3379014 hgame D March 22, 2013, 8:36 a.m. OK MS C++ TESTS 49 484 102400 2400
3355368 916852 D March 19, 2013, 7:58 a.m. OK MS C++ TESTS 49 500 102400 2400
3351649 19891101 D March 18, 2013, 1:28 p.m. OK MS C++ TESTS 49 531 102400 2400
3351538 19891101 D March 18, 2013, 1:16 p.m. OK MS C++ TESTS 49 531 102400 2400
3351179 problem-solved D March 18, 2013, 12:30 p.m. OK MS C++ TESTS 49 531 102400 2400
3361583 NALP D March 20, 2013, 4:12 p.m. OK MS C++ TESTS 49 546 1228800 2400
3339832 RAD D March 17, 2013, 4:47 p.m. OK MS C++ TESTS 49 592 307200 2400
3469579 ShingRay D April 3, 2013, 3:10 p.m. OK Scala TESTS 49 1000 409600 2400

remove filters

Back to search problems