Educational Codeforces Round 47 (Rated for 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
1009 Educational Codeforces Round 47 (Rated for Div. 2) FINISHED False 7200 200244299 July 14, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5309 ) C Annoying Present PROGRAMMING greedy math 1700

B"Alice got an array of length n as a birthday present once again! This is the third year in a row! And what is more disappointing, it is overwhelmengly boring, filled entirely with zeros. Bob decided to apply some changes to the array to cheer up Alice. Bob has chosen m changes of the following form. For some integer numbers x and d , he chooses an arbitrary position i ( 1 <= i <= n ) and for every j in [1, n] adds x + d cdot dist(i, j) to the value of the j -th cell. dist(i, j) is the distance between positions i and j (i.e. dist(i, j) = |i - j| , where |x| is an absolute value of x ). For example, if Alice currently has an array [2, 1, 2, 2] and Bob chooses position 3 for x = -1 and d = 2 then the array will become [2 - 1 + 2 cdot 2,~1 - 1 + 2 cdot 1,~2 - 1 + 2 cdot 0,~2 - 1 + 2 cdot 1] = [5, 2, 1, 3] . Note that Bob can't choose position i outside of the array (that is, smaller than 1 or greater than n ). Alice will be the happiest when the elements of the array are as big as possible. Bob claimed that the arithmetic mean value of the elements will work fine as a metric. What is the maximum arithmetic mean value Bob can achieve? The first line contains two integers n and m ( 1 <= n, m <= 10^5 ) -- the number of elements of the array and the number of changes. Each of the next m lines contains two integers x_i and d_i ( -10^3 <= x_i, d_i <= 10^3 ) -- the parameters for the i -th change. Print the maximal average arithmetic mean of the elements Bob can achieve. Your answer is considered correct if its absolute or relative error doesn't exceed 10^{-6} . "...

Tutorials

60630

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
40576558 rr_ C July 20, 2018, 11:37 a.m. OK D TESTS 54 77 0 1700
40576527 rr_ C July 20, 2018, 11:36 a.m. OK D TESTS 54 78 0 1700
40366595 ruban C July 15, 2018, 6:13 a.m. OK Delphi TESTS 54 46 36044800 1700
56778758 bin9638 C July 10, 2019, 4:51 a.m. OK FPC TESTS 54 46 0 1700
40571022 __ShaW C July 20, 2018, 8:09 a.m. OK FPC TESTS 54 46 0 1700
40370993 OHemanO C July 15, 2018, 8:11 a.m. OK FPC TESTS 54 46 819200 1700
43414710 TShT C Sept. 25, 2018, 2:57 p.m. OK FPC TESTS 54 62 0 1700
41124996 Dasha_Gnedko C Aug. 2, 2018, 1:51 p.m. OK FPC TESTS 54 62 0 1700
41336293 narutohokage C Aug. 8, 2018, 12:17 p.m. OK GNU C TESTS 54 46 0 1700
40511919 kkrjs0206 C July 18, 2018, 11:30 a.m. OK GNU C TESTS 54 46 0 1700
40395336 aaranjan6 C July 16, 2018, 4:46 a.m. OK GNU C TESTS 54 46 0 1700
40371013 TsReaper C July 15, 2018, 8:11 a.m. OK GNU C TESTS 54 46 0 1700
40360575 sansen C July 15, 2018, 12:51 a.m. OK GNU C TESTS 54 46 0 1700
40357896 forlfs C July 14, 2018, 9:21 p.m. OK GNU C TESTS 54 46 819200 1700
40350920 gahara C July 14, 2018, 5:06 p.m. OK GNU C TESTS 54 46 1638400 1700
41617043 star_magic_young C Aug. 15, 2018, 9:52 a.m. OK GNU C++ TESTS 54 31 0 1700
41617019 star_magic_young C Aug. 15, 2018, 9:51 a.m. OK GNU C++ TESTS 54 31 0 1700
41588999 hangyesheng C Aug. 14, 2018, 1:04 p.m. OK GNU C++ TESTS 54 31 0 1700
40769310 sherco C July 26, 2018, 7:51 a.m. OK GNU C++ TESTS 54 31 0 1700
40707649 Andruha C July 24, 2018, 2:05 p.m. OK GNU C++ TESTS 54 31 0 1700
40696960 _CZH C July 24, 2018, 8:30 a.m. OK GNU C++ TESTS 54 31 0 1700
40674263 zhtzht C July 23, 2018, 2:24 p.m. OK GNU C++ TESTS 54 31 0 1700
40669507 Joky_02 C July 23, 2018, 11:50 a.m. OK GNU C++ TESTS 54 31 0 1700
40602573 vjudge5 C July 21, 2018, 9:27 a.m. OK GNU C++ TESTS 54 31 0 1700
40540031 hzy9819 C July 19, 2018, 8:09 a.m. OK GNU C++ TESTS 54 31 0 1700
53888463 vjudge4 C May 8, 2019, 8:30 p.m. OK GNU C11 TESTS 54 46 0 1700
50611654 rainboy C Feb. 28, 2019, 5:12 p.m. OK GNU C11 TESTS 54 46 0 1700
48496871 kyle201817146 C Jan. 17, 2019, 1:20 p.m. OK GNU C11 TESTS 54 46 0 1700
48488486 vjudge4 C Jan. 17, 2019, 9:29 a.m. OK GNU C11 TESTS 54 46 0 1700
40709232 pandrei C July 24, 2018, 2:54 p.m. OK GNU C11 TESTS 54 46 0 1700
40350195 likcoras C July 14, 2018, 4:53 p.m. OK GNU C11 TESTS 54 61 0 1700
43702008 Complexity_Cutter C Oct. 2, 2018, 7:06 p.m. OK GNU C11 TESTS 54 62 0 1700
40361283 a_kk C July 15, 2018, 1:44 a.m. OK GNU C11 TESTS 54 62 0 1700
68594135 Eric_Aslan C Jan. 11, 2020, 1:33 p.m. OK GNU C++11 TESTS 54 31 0 1700
67057940 He_Ren C Dec. 17, 2019, 7:46 a.m. OK GNU C++11 TESTS 54 31 0 1700
66810061 luogu_bot1 C Dec. 14, 2019, 1:30 a.m. OK GNU C++11 TESTS 54 31 0 1700
57594592 MoRanSky C July 23, 2019, 1:29 p.m. OK GNU C++11 TESTS 54 31 0 1700
51480786 Grafiore C March 19, 2019, 11:30 a.m. OK GNU C++11 TESTS 54 31 0 1700
49903311 cXs5 C Feb. 14, 2019, 10:35 a.m. OK GNU C++11 TESTS 54 31 0 1700
46270801 pxh612__________________ Leafy_ C Nov. 27, 2018, 7:57 a.m. OK GNU C++11 TESTS 54 31 0 1700
46270797 vjudge5 C Nov. 27, 2018, 7:57 a.m. OK GNU C++11 TESTS 54 31 0 1700
45451325 ioh C Nov. 8, 2018, 4:14 p.m. OK GNU C++11 TESTS 54 31 0 1700
44423709 Loi_tttty C Oct. 17, 2018, 2:08 a.m. OK GNU C++11 TESTS 54 31 0 1700
40359198 wleung_bvg C July 14, 2018, 10:42 p.m. OK GNU C++14 TESTS 54 31 0 1700
40363123 wleung_bvg C July 15, 2018, 3:18 a.m. OK GNU C++14 TESTS 54 31 0 1700
40539571 tinca_matei C July 19, 2018, 7:55 a.m. OK GNU C++14 TESTS 54 31 0 1700
40351789 wleung_bvg C July 14, 2018, 5:29 p.m. OK GNU C++14 TESTS 54 31 0 1700
40354321 Linkus C July 14, 2018, 6:57 p.m. OK GNU C++14 TESTS 54 31 0 1700
52507258 I-Love-Islam C April 8, 2019, 7:29 p.m. OK GNU C++14 TESTS 54 46 0 1700
56543158 lin972366831 C July 5, 2019, 6:22 a.m. OK GNU C++14 TESTS 54 46 0 1700
63027081 Mynesis C Oct. 20, 2019, 4:44 p.m. OK GNU C++14 TESTS 54 46 0 1700
45466798 henu_16l_lxl C Nov. 9, 2018, 6:31 a.m. OK GNU C++14 TESTS 54 46 0 1700
53469223 Gordon_Freeman C April 28, 2019, 11:53 a.m. OK GNU C++14 TESTS 54 46 0 1700
41389609 UnstoppableChillMachine C Aug. 9, 2018, 7:47 a.m. OK GNU C++17 TESTS 54 31 0 1700
40359774 Trisolaris C July 14, 2018, 11:25 p.m. OK GNU C++17 TESTS 54 31 0 1700
53890658 vjudge4 C May 8, 2019, 11:28 p.m. OK GNU C++17 TESTS 54 46 0 1700
67318488 vjudge1 C Dec. 21, 2019, 7:03 a.m. OK GNU C++17 TESTS 54 46 0 1700
64613971 cuiaoxiang C Nov. 10, 2019, 3:35 a.m. OK GNU C++17 TESTS 54 46 0 1700
63242717 qf1874 C Oct. 23, 2019, 1:52 p.m. OK GNU C++17 TESTS 54 46 0 1700
57326982 FakeTeeth C July 19, 2019, 12:32 p.m. OK GNU C++17 TESTS 54 46 0 1700
57074370 LiM_256 C July 15, 2019, 4:20 a.m. OK GNU C++17 TESTS 54 46 0 1700
54071596 t1war1 C May 13, 2019, 4:35 p.m. OK GNU C++17 TESTS 54 46 0 1700
54070540 t1war1 C May 13, 2019, 3:57 p.m. OK GNU C++17 TESTS 54 46 0 1700
41090376 SolitaryWayfarer C Aug. 1, 2018, 4:18 p.m. OK Go TESTS 54 140 3584000 1700
40689496 cojna C July 24, 2018, 5 a.m. OK Haskell TESTS 54 46 16691200 1700
49659055 Ziklon C Feb. 9, 2019, 11:28 a.m. OK Java 8 TESTS 54 109 0 1700
40518287 Aniket144 C July 18, 2018, 2:29 p.m. OK Java 8 TESTS 54 124 0 1700
59385029 chojh1222 C Aug. 24, 2019, 5:56 a.m. OK Java 8 TESTS 54 124 0 1700
59384902 chojh1222 C Aug. 24, 2019, 5:52 a.m. OK Java 8 TESTS 54 124 0 1700
58893889 jenish9599 C Aug. 16, 2019, 6:47 a.m. OK Java 8 TESTS 54 124 0 1700
40936543 romit17 C July 30, 2018, 5:50 a.m. OK Java 8 TESTS 54 124 0 1700
40382118 Darshan_Darji C July 15, 2018, 2:58 p.m. OK Java 8 TESTS 54 124 0 1700
40362127 xodiac C July 15, 2018, 2:30 a.m. OK Java 8 TESTS 54 124 0 1700
59384540 chojh1222 C Aug. 24, 2019, 5:41 a.m. OK Java 8 TESTS 54 139 0 1700
40583310 baobab C July 20, 2018, 3:57 p.m. OK Java 8 TESTS 54 139 0 1700
46306320 Killer45 C Nov. 28, 2018, 10:40 a.m. OK Kotlin TESTS 54 171 512000 1700
40778256 user32 C July 26, 2018, 12:25 p.m. OK Kotlin TESTS 54 187 0 1700
40367466 ZALeo C July 15, 2018, 6:38 a.m. OK Kotlin TESTS 54 343 1228800 1700
57355990 og.kostya C July 20, 2019, 6:19 a.m. OK Mono C# TESTS 54 62 102400 1700
57355918 og.kostya C July 20, 2019, 6:17 a.m. OK Mono C# TESTS 54 93 102400 1700
40395734 iPilot C July 16, 2018, 5:02 a.m. OK Mono C# TESTS 54 124 6656000 1700
40372088 YYOne C July 15, 2018, 8:44 a.m. OK Mono C# TESTS 54 124 6656000 1700
41899489 chkhetiani C Aug. 20, 2018, 11:25 a.m. OK Mono C# TESTS 54 171 3891200 1700
41326282 scorpiowf C Aug. 8, 2018, 5:41 a.m. OK MS C++ TESTS 54 31 716800 1700
43700382 vjudge5 C Oct. 2, 2018, 6:15 p.m. OK MS C++ TESTS 54 46 0 1700
43699808 vjudge3 C Oct. 2, 2018, 6 p.m. OK MS C++ TESTS 54 46 0 1700
40572141 UminchuR C July 20, 2018, 8:45 a.m. OK MS C++ TESTS 54 46 0 1700
40522613 Los_Angelos_Laycurse C July 18, 2018, 5:33 p.m. OK MS C++ TESTS 54 46 0 1700
48495736 vjudge1 C Jan. 17, 2019, 12:53 p.m. OK MS C++ TESTS 54 46 0 1700
48485097 vjudge2 C Jan. 17, 2019, 8:01 a.m. OK MS C++ TESTS 54 46 0 1700
48475465 vjudge5 C Jan. 17, 2019, 2:07 a.m. OK MS C++ TESTS 54 46 0 1700
48488341 vjudge3 C Jan. 17, 2019, 9:26 a.m. OK MS C++ TESTS 54 46 0 1700
56543195 vjudge3 C July 5, 2019, 6:23 a.m. OK MS C++ TESTS 54 46 0 1700
64182228 EDawn C Nov. 4, 2019, 1:57 a.m. OK MS C++ 2017 TESTS 54 62 0 1700
59097004 pmitkov C Aug. 19, 2019, 2:35 p.m. OK MS C++ 2017 TESTS 54 62 819200 1700
50803981 taolahung01 C March 5, 2019, 3:25 a.m. OK MS C++ 2017 TESTS 54 139 0 1700
50661979 g-m-blake C March 2, 2019, 12:22 a.m. OK MS C++ 2017 TESTS 54 155 3993600 1700
40365238 sk0 C July 15, 2018, 5:20 a.m. OK Ocaml TESTS 54 78 5222400 1700
46251300 c1729 C Nov. 26, 2018, 2:17 p.m. OK PyPy 2 TESTS 54 248 7884800 1700
40560370 pavankatta C July 19, 2018, 11:14 p.m. OK PyPy 2 TESTS 54 312 5222400 1700
40492759 kakkarotssj C July 17, 2018, 10:50 p.m. OK PyPy 2 TESTS 54 343 8601600 1700
40492730 kakkarotssj C July 17, 2018, 10:47 p.m. OK PyPy 2 TESTS 54 358 8601600 1700
40383532 aeternalis1 C July 15, 2018, 4:06 p.m. OK PyPy 2 TESTS 54 467 4096000 1700
40358687 pa.n.ik C July 14, 2018, 10:02 p.m. OK PyPy 2 TESTS 54 468 3584000 1700
40702389 Onesh0t C July 24, 2018, 11:45 a.m. OK PyPy 2 TESTS 54 482 3584000 1700
40383634 flower C July 15, 2018, 4:13 p.m. OK PyPy 2 TESTS 54 483 4403200 1700
40356892 pa.n.ik C July 14, 2018, 8:34 p.m. OK PyPy 2 TESTS 54 514 3584000 1700
40652379 AndreyKop C July 23, 2018, 12:31 a.m. OK PyPy 3 TESTS 54 826 8294400 1700
40384823 Stephan C July 15, 2018, 5:26 p.m. OK PyPy 3 TESTS 54 841 10035200 1700
40452212 Mad_Andrei C July 16, 2018, 7:24 p.m. OK PyPy 3 TESTS 54 857 8294400 1700
40367975 ZhouTi C July 15, 2018, 6:51 a.m. OK PyPy 3 TESTS 54 858 8294400 1700
44995860 omarnvidia C Oct. 28, 2018, 3:35 p.m. OK PyPy 3 TESTS 54 888 8396800 1700
67666647 lowoncode C Dec. 26, 2019, 6:09 p.m. OK PyPy 3 TESTS 54 888 9523200 1700
40601020 MaxHo C July 21, 2018, 8:36 a.m. OK PyPy 3 TESTS 54 889 8192000 1700
40512836 xumouyi C July 18, 2018, 11:57 a.m. OK PyPy 3 TESTS 54 904 8294400 1700
41745944 maverick_at C Aug. 18, 2018, 7:36 a.m. OK PyPy 3 TESTS 54 904 8396800 1700
58982835 entri C Aug. 18, 2019, 5:27 a.m. OK PyPy 3 TESTS 54 904 9523200 1700
40365915 balani.mohit C July 15, 2018, 5:47 a.m. OK Python 2 TESTS 54 389 1638400 1700
40367564 Ali_Pi C July 15, 2018, 6:41 a.m. OK Python 2 TESTS 54 405 1638400 1700
40647752 sragavan C July 22, 2018, 5:44 p.m. OK Python 2 TESTS 54 421 0 1700
40362959 shamiaomiao C July 15, 2018, 3:11 a.m. OK Python 2 TESTS 54 436 1638400 1700
41089921 SolitaryWayfarer C Aug. 1, 2018, 4:03 p.m. OK Python 2 TESTS 54 452 1638400 1700
40461995 davidzhou C July 17, 2018, 4:37 a.m. OK Python 2 TESTS 54 483 0 1700
41623750 jrc1215 C Aug. 15, 2018, 1:14 p.m. OK Python 2 TESTS 54 483 13619200 1700
40687193 Andromedayu C July 24, 2018, 3:03 a.m. OK Python 2 TESTS 54 498 2048000 1700
40378336 wangkan2001 C July 15, 2018, 12:26 p.m. OK Python 2 TESTS 54 529 5017600 1700
40378246 wangkan2001 C July 15, 2018, 12:23 p.m. OK Python 2 TESTS 54 529 5017600 1700
40365855 orailly C July 15, 2018, 5:45 a.m. OK Python 3 TESTS 54 249 5836800 1700
40385104 mikimowski C July 15, 2018, 5:39 p.m. OK Python 3 TESTS 54 311 0 1700
46840842 drogon_nest C Dec. 10, 2018, 7:28 a.m. OK Python 3 TESTS 54 343 0 1700
40571240 jojomobobo C July 20, 2018, 8:17 a.m. OK Python 3 TESTS 54 374 0 1700
40370023 ceass20xx C July 15, 2018, 7:45 a.m. OK Python 3 TESTS 54 390 0 1700
40571332 jojomobobo C July 20, 2018, 8:20 a.m. OK Python 3 TESTS 54 404 0 1700
40370455 ceass20xx C July 15, 2018, 7:56 a.m. OK Python 3 TESTS 54 404 0 1700
40672175 aruncveli C July 23, 2018, 1:14 p.m. OK Python 3 TESTS 54 405 0 1700
40519261 Axyzv C July 18, 2018, 3:04 p.m. OK Python 3 TESTS 54 405 0 1700
40452192 Mad_Andrei C July 16, 2018, 7:24 p.m. OK Python 3 TESTS 54 405 0 1700
41461442 betrue12 C Aug. 11, 2018, 8:47 a.m. OK Ruby TESTS 54 390 102400 1700
49166285 pschuprikov C Jan. 29, 2019, 4:35 p.m. OK Rust TESTS 54 62 0 1700
40365265 kobae964 C July 15, 2018, 5:21 a.m. OK Rust TESTS 54 140 105164800 1700

remove filters

Back to search problems