Codeforces Beta Round 54 (Div. 2)

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
58 Codeforces Beta Round 54 (Div. 2) FINISHED False 7200 448207174 Jan. 31, 2011, 4 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2073 ) C Trees PROGRAMMING brute force 1800

B'On Bertown 's main street n trees are growing, the tree number i has the height of ai meters (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). By the arrival of the President of Berland these trees were decided to be changed so that their heights formed a beautiful sequence. This means that the heights of trees on ends (the 1st one and the n-th one) should be equal to each other, the heights of the 2-nd and the (n xe2 x80 x89- xe2 x80 x891)-th tree must also be equal to each other, at that the height of the 2-nd tree should be larger than the height of the first tree by 1, and so on. In other words, the heights of the trees, standing at equal distance from the edge (of one end of the sequence) must be equal to each other, and with the increasing of the distance from the edge by 1 the tree height must also increase by 1. For example, the sequences "2 3 4 5 5 4 3 2" and "1 2 3 2 1" are beautiful, and '1 3 3 1" and "1 2 3 1" are not. Changing the height of a tree is a very expensive operation, using advanced technologies invented by Berland scientists. In one operation you can choose any tree and change its height to any number, either increase or decrease. Note that even after the change the height should remain a positive integer, i. e, it can 't be less than or equal to zero. Identify the smallest number of changes of the trees ' height needed for the sequence of their heights to become beautiful. The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) which is the number of trees. The second line contains integers ai (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) which are the heights of the trees. Print a single number which is the minimal number of trees whose heights will have to be changed for the sequence to become beautiful.'...

Tutorials

Codeforces Beta Round #54 (Div.2) - разбор A-D

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
40993138 ReaLNero1 C July 31, 2018, 1:47 a.m. OK Delphi TESTS 40 62 1638400 1800
38494508 Siyuan C May 21, 2018, 3:18 p.m. OK GNU C++ TESTS 40 62 614400 1800
38420380 leohan818 C May 19, 2018, 6:55 a.m. OK GNU C++ TESTS 40 62 614400 1800
41746961 ojtrans1 C Aug. 18, 2018, 7:57 a.m. OK GNU C++ TESTS 40 62 614400 1800
38434838 heqingyu2 C May 19, 2018, 3:07 p.m. OK GNU C++ TESTS 40 62 819200 1800
40173889 ojtrans2 C July 10, 2018, 1:56 p.m. OK GNU C++ TESTS 40 62 1228800 1800
35683683 lqzhhh C Feb. 25, 2018, 2:43 p.m. OK GNU C++ TESTS 40 62 3686400 1800
38554948 DXC C May 23, 2018, 7:57 a.m. OK GNU C++ TESTS 40 62 84172800 1800
38387198 spsmoj2 C May 18, 2018, 3 a.m. OK GNU C++ TESTS 40 92 1740800 1800
38315706 spsmoj2 C May 16, 2018, 9:36 a.m. OK GNU C++ TESTS 40 92 4096000 1800
37746311 vjudge5 C April 30, 2018, 10:59 a.m. OK GNU C++ TESTS 40 92 4300800 1800
59410074 rainboy C Aug. 24, 2019, 3:28 p.m. OK GNU C11 TESTS 40 62 409600 1800
60058551 LittleBeetle C Sept. 5, 2019, 5:45 a.m. OK GNU C++11 TESTS 40 62 204800 1800
54010563 spsmoj3 C May 12, 2019, 1:51 a.m. OK GNU C++11 TESTS 40 62 614400 1800
47122931 spsmoj3 C Dec. 16, 2018, 3:25 p.m. OK GNU C++11 TESTS 40 62 614400 1800
59566584 spsmoj3 C Aug. 27, 2019, 10:57 a.m. OK GNU C++11 TESTS 40 62 614400 1800
64554703 luogu_bot4 C Nov. 9, 2019, 2:45 a.m. OK GNU C++11 TESTS 40 62 819200 1800
38387131 qazws486 C May 18, 2018, 2:55 a.m. OK GNU C++11 TESTS 40 62 1740800 1800
42002440 __Darkmoon C Aug. 23, 2018, 4:06 p.m. OK GNU C++11 TESTS 40 62 1740800 1800
34832571 ojtrans1 C Feb. 2, 2018, 9:16 a.m. OK GNU C++11 TESTS 40 62 2867200 1800
62031468 Kylin_ C Oct. 7, 2019, 1:08 a.m. OK GNU C++11 TESTS 40 62 3788800 1800
37419219 eriksuenderhauf C April 17, 2018, 8:16 p.m. OK GNU C++11 TESTS 40 62 4300800 1800
41652514 AcFreak C Aug. 16, 2018, 12:39 p.m. OK GNU C++14 TESTS 40 62 1228800 1800
36214801 mosta7il C March 12, 2018, 4:20 a.m. OK GNU C++14 TESTS 40 62 2662400 1800
34638862 Cmise C Jan. 28, 2018, 4:44 p.m. OK GNU C++14 TESTS 40 62 3788800 1800
60656533 abdelrahman010 C Sept. 16, 2019, 12:19 a.m. OK GNU C++14 TESTS 40 92 409600 1800
50143545 IsaacMoris C Feb. 19, 2019, 1:14 a.m. OK GNU C++14 TESTS 40 92 409600 1800
41255801 JordiR C Aug. 5, 2018, 8:02 p.m. OK GNU C++14 TESTS 40 92 409600 1800
39084740 mHr029 C June 10, 2018, 6:20 a.m. OK GNU C++14 TESTS 40 92 409600 1800
65943892 yyhslfw C Nov. 29, 2019, 7:43 a.m. OK GNU C++14 TESTS 40 92 409600 1800
50312263 muhammedaly C Feb. 22, 2019, 10:22 a.m. OK GNU C++14 TESTS 40 92 614400 1800
69862572 meena26 C Jan. 30, 2020, 7:03 p.m. OK GNU C++14 TESTS 40 92 614400 1800
42867925 Decayed C Sept. 14, 2018, 4:53 p.m. OK GNU C++17 TESTS 40 62 819200 1800
59542798 moss3s C Aug. 26, 2019, 7:46 p.m. OK GNU C++17 TESTS 40 92 409600 1800
56719191 It_Wasnt_Me C July 8, 2019, 3:56 p.m. OK GNU C++17 TESTS 40 92 409600 1800
40072208 Hassanosama C July 8, 2018, 12:19 a.m. OK GNU C++17 TESTS 40 92 409600 1800
49130015 yuhta C Jan. 29, 2019, 3:11 a.m. OK GNU C++17 TESTS 40 92 614400 1800
62560000 MarwanNabil C Oct. 14, 2019, 11:42 a.m. OK GNU C++17 TESTS 40 92 819200 1800
64788092 praveenojha33 C Nov. 13, 2019, 9:59 a.m. OK GNU C++17 TESTS 40 92 819200 1800
51654110 KKOOPP C March 21, 2019, 8:20 p.m. OK GNU C++17 TESTS 40 92 819200 1800
40857404 Bogdanisar C July 27, 2018, 6:13 p.m. OK GNU C++17 TESTS 40 92 819200 1800
40740400 terminator C July 25, 2018, 12:02 p.m. OK GNU C++17 TESTS 40 92 819200 1800
53011293 Verdusk C April 19, 2019, 12:14 p.m. OK Java 8 TESTS 40 248 0 1800
60835984 chojh1222 C Sept. 19, 2019, 9:01 a.m. OK Java 8 TESTS 40 248 0 1800
52576854 mTvTm C April 10, 2019, 4:50 p.m. OK Java 8 TESTS 40 248 0 1800
48195358 Ahmed.Shawky C Jan. 10, 2019, 9:21 p.m. OK Java 8 TESTS 40 248 0 1800
46730712 Washoum C Dec. 7, 2018, 5:19 p.m. OK Java 8 TESTS 40 248 0 1800
47136846 KulikAlex C Dec. 16, 2018, 5:15 p.m. OK Java 8 TESTS 40 278 0 1800
35832024 parth_15 C March 2, 2018, 10:04 a.m. OK Java 8 TESTS 40 278 20684800 1800
52536838 nagooba C April 9, 2019, 4:02 p.m. OK Java 8 TESTS 40 280 0 1800
36312229 ZeyadKhattab C March 15, 2018, 8:48 p.m. OK Java 8 TESTS 40 280 20684800 1800
41564635 Dobo_boy C Aug. 13, 2018, 4:40 p.m. OK Java 8 TESTS 40 310 0 1800
55377880 guardian.of.gods99 C June 9, 2019, 6:29 p.m. OK PyPy 3 TESTS 40 374 13312000 1800
35895134 _____k_____ C March 3, 2018, 4:36 p.m. OK Python 2 TESTS 40 312 11264000 1800
35894373 ______n______ C March 3, 2018, 4:19 p.m. OK Python 2 TESTS 40 312 11264000 1800
35894305 ______u______ C March 3, 2018, 4:19 p.m. OK Python 2 TESTS 40 312 11264000 1800
35894116 _____i_____ C March 3, 2018, 4:13 p.m. OK Python 2 TESTS 40 312 11264000 1800
35885459 ______h______ C March 3, 2018, 1:28 p.m. OK Python 2 TESTS 40 312 11264000 1800
35885084 ______k______ C March 3, 2018, 1:22 p.m. OK Python 2 TESTS 40 312 11264000 1800
35884243 ______i______ C March 3, 2018, 1:09 p.m. OK Python 2 TESTS 40 312 11264000 1800
35875218 ______M______ C March 3, 2018, 8:09 a.m. OK Python 2 TESTS 40 312 11264000 1800
56016128 sorry_im_smurfing C June 24, 2019, 9:21 p.m. OK Python 2 TESTS 40 528 6656000 1800
44824690 noelcowm C Oct. 25, 2018, 5:07 a.m. OK Python 3 TESTS 40 372 8396800 1800
42134121 Mk_Python_v1 C Aug. 26, 2018, 9:27 p.m. OK Python 3 TESTS 40 436 7372800 1800
44824808 ghoast C Oct. 25, 2018, 5:11 a.m. OK Ruby TESTS 40 342 17408000 1800

remove filters

Back to search problems