Educational Codeforces Round 21

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
808 Educational Codeforces Round 21 FINISHED False 9000 236962499 May 15, 2017, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7843 ) B Average Sleep Time PROGRAMMING data structures implementation math 1300

B"It's been almost a week since Polycarp couldn't get rid of insomnia. And as you may already know, one week in Berland lasts k days! When Polycarp went to a doctor with his problem, the doctor asked him about his sleeping schedule (more specifically, the average amount of hours of sleep per week). Luckily, Polycarp kept records of sleep times for the last n days. So now he has a sequence a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an, where ai is the sleep time on the i-th day. The number of records is so large that Polycarp is unable to calculate the average value by himself. Thus he is asking you to help him with the calculations. To get the average Polycarp is going to consider k consecutive days as a week. So there will be n xe2 x80 x89- xe2 x80 x89k xe2 x80 x89+ xe2 x80 x891 weeks to take into consideration. For example, if k xe2 x80 x89= xe2 x80 x892, n xe2 x80 x89= xe2 x80 x893 and a xe2 x80 x89= xe2 x80 x89[3, xe2 x80 x894, xe2 x80 x897], then the result is . You should write a program which will calculate average sleep times of Polycarp over all weeks. The first line contains two integer numbers n and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7105). The second line contains n integer numbers 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 x89105). Output average sleeping time over all weeks. The answer is considered to be correct if its absolute or relative error does not exceed 10 xe2 x80 x89- xe2 x80 x896. In particular, it is enough to output real number with at least 6 digits after the decimal point. In the third example there are n xe2 x80 x89- xe2 x80 x89k xe2 x80 x89+ xe2 x80 x891 xe2 x80 x89= xe2 x80 x897 weeks, so the answer is sums of all weeks divided by 7. "...

Tutorials

52010

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
27213862 FalseMirror B May 19, 2017, 12:09 p.m. OK D TESTS 29 62 11571200 1300
31009424 vjudge4 B Oct. 5, 2017, 6:15 a.m. OK FPC TESTS 29 31 819200 1300
27161000 VladProg B May 16, 2017, 1:47 p.m. OK FPC TESTS 29 46 102400 1300
27163767 KagamiharaNadeshiko B May 16, 2017, 3:22 p.m. OK FPC TESTS 29 46 819200 1300
27231519 dambosin B May 20, 2017, 8:35 a.m. OK FPC TESTS 29 46 819200 1300
27370400 Bond011 B May 27, 2017, 8:56 a.m. OK FPC TESTS 29 46 819200 1300
27304864 Krosh B May 23, 2017, 4:02 p.m. OK FPC TESTS 29 46 819200 1300
27334182 vjudge2 B May 25, 2017, 10:45 a.m. OK FPC TESTS 29 46 1638400 1300
33961659 Cristi777 B Jan. 6, 2018, 11:31 a.m. OK FPC TESTS 29 46 2457600 1300
28703902 Grom9941 B July 19, 2017, 7:13 p.m. OK FPC TESTS 29 46 2457600 1300
27671997 zZzABCzZz B June 8, 2017, 1:11 p.m. OK FPC TESTS 29 46 2457600 1300
27207071 TSS_99 B May 19, 2017, 3:28 a.m. OK GNU C TESTS 29 31 819200 1300
27721812 allAAA B June 11, 2017, 1:42 p.m. OK GNU C TESTS 29 31 2355200 1300
27485326 RitchieD B June 1, 2017, 1:15 p.m. OK GNU C TESTS 29 46 0 1300
27212037 blurry B May 19, 2017, 10:11 a.m. OK GNU C TESTS 29 46 0 1300
27158340 Kolyanus B May 16, 2017, 11:51 a.m. OK GNU C TESTS 29 46 0 1300
27158301 Kolyanus B May 16, 2017, 11:50 a.m. OK GNU C TESTS 29 46 0 1300
27621090 ayushya2531 B June 6, 2017, 8:07 p.m. OK GNU C TESTS 29 46 819200 1300
27211239 Chipe1 B May 19, 2017, 9:13 a.m. OK GNU C TESTS 29 46 819200 1300
27182636 xiao-xiao B May 17, 2017, 3:20 p.m. OK GNU C TESTS 29 46 819200 1300
27162902 avdota2 B May 16, 2017, 2:37 p.m. OK GNU C TESTS 29 46 819200 1300
27233552 vjudge1 B May 20, 2017, 10:24 a.m. OK GNU C++ TESTS 29 15 819200 1300
27334160 vjudge3 B May 25, 2017, 10:44 a.m. OK GNU C++ TESTS 29 15 1433600 1300
32520144 Scut82 B Nov. 21, 2017, 8:53 a.m. OK GNU C++ TESTS 29 15 2560000 1300
27176746 NKTG B May 17, 2017, 10:10 a.m. OK GNU C++ TESTS 29 15 2969600 1300
27337308 vjudge2 B May 25, 2017, 1:10 p.m. OK GNU C++ TESTS 29 15 3584000 1300
27176369 yah01 B May 17, 2017, 9:45 a.m. OK GNU C++ TESTS 29 30 4812800 1300
27154332 AkaneSasu B May 16, 2017, 8:31 a.m. OK GNU C++ TESTS 29 31 614400 1300
27185075 hyperbola7 B May 17, 2017, 6:13 p.m. OK GNU C++ TESTS 29 31 1638400 1300
32520276 Scut82 B Nov. 21, 2017, 9 a.m. OK GNU C++ TESTS 29 31 4915200 1300
29937908 Sherlock_Tang B Aug. 31, 2017, 8:29 a.m. OK GNU C++ TESTS 29 46 0 1300
27191082 newbass B May 18, 2017, 6:16 a.m. OK GNU C11 TESTS 29 46 0 1300
27612469 vjudge1 B June 6, 2017, 11:45 a.m. OK GNU C11 TESTS 29 46 819200 1300
27221227 nahid0335 B May 19, 2017, 7:33 p.m. OK GNU C11 TESTS 29 46 1638400 1300
27160891 mgirardin B May 16, 2017, 1:40 p.m. OK GNU C11 TESTS 29 61 1638400 1300
27910046 brksfsrt B June 19, 2017, 5:40 p.m. OK GNU C11 TESTS 29 93 1638400 1300
29276951 pikachucoding B Aug. 8, 2017, 3:48 a.m. OK GNU C11 TESTS 29 93 3481600 1300
27366365 rxdoi B May 27, 2017, 3:07 a.m. OK GNU C++11 TESTS 29 15 614400 1300
27154277 will7101 B May 16, 2017, 8:29 a.m. OK GNU C++11 TESTS 29 15 921600 1300
27149638 Qudrat_Ibadullayev B May 16, 2017, 4:10 a.m. OK GNU C++11 TESTS 29 15 7987200 1300
27149882 Muhammad_Rahimov B May 16, 2017, 4:33 a.m. OK GNU C++11 TESTS 29 15 16076800 1300
27491757 vjudge4 B June 1, 2017, 2:51 p.m. OK GNU C++11 TESTS 29 30 2457600 1300
27441471 yyf0309 B May 30, 2017, 6:48 a.m. OK GNU C++11 TESTS 29 30 2457600 1300
27149647 Qudrat_Ibadullayev B May 16, 2017, 4:10 a.m. OK GNU C++11 TESTS 29 31 0 1300
40980921 ReaLNero1 B July 30, 2018, 5:45 p.m. OK GNU C++11 TESTS 29 31 819200 1300
27790783 vjudge1 B June 15, 2017, 9:48 a.m. OK GNU C++11 TESTS 29 31 819200 1300
27150726 DTDT B May 16, 2017, 5:37 a.m. OK GNU C++11 TESTS 29 31 819200 1300
27165472 Black_Eye B May 16, 2017, 4:56 p.m. OK GNU C++14 TESTS 29 46 819200 1300
27177782 springrains B May 17, 2017, 11:14 a.m. OK GNU C++14 TESTS 29 46 819200 1300
27208976 lfarrives B May 19, 2017, 6:44 a.m. OK GNU C++14 TESTS 29 46 819200 1300
27209218 despair B May 19, 2017, 7 a.m. OK GNU C++14 TESTS 29 46 819200 1300
27275286 Jerry2001 B May 22, 2017, 1:06 a.m. OK GNU C++14 TESTS 29 46 819200 1300
27452946 GLAYS B May 30, 2017, 5:28 p.m. OK GNU C++14 TESTS 29 46 819200 1300
57311188 vjudge5 B July 19, 2019, 6:32 a.m. OK GNU C++14 TESTS 29 46 819200 1300
27416815 _Plague_ B May 28, 2017, 4:43 p.m. OK GNU C++14 TESTS 29 46 1536000 1300
27180329 dr96 B May 17, 2017, 1:20 p.m. OK GNU C++14 TESTS 29 46 1536000 1300
27226681 skz_9611 B May 20, 2017, 2:23 a.m. OK GNU C++14 TESTS 29 46 1536000 1300
57310932 vjudge4 B July 19, 2019, 6:26 a.m. OK GNU C++17 TESTS 29 46 1638400 1300
57315582 vjudge3 B July 19, 2019, 8:06 a.m. OK GNU C++17 TESTS 29 61 819200 1300
50341862 vjudge5 B Feb. 23, 2019, 3:05 a.m. OK GNU C++17 TESTS 29 61 1536000 1300
61840871 sdibt1 B Oct. 4, 2019, 9:36 a.m. OK GNU C++17 TESTS 29 61 3993600 1300
44974468 hetpandya98 B Oct. 28, 2018, 4:05 a.m. OK GNU C++17 TESTS 29 62 0 1300
69507917 kk_ban B Jan. 25, 2020, 9:24 a.m. OK GNU C++17 TESTS 29 62 819200 1300
67682324 Lallya B Dec. 27, 2019, 7:02 a.m. OK GNU C++17 TESTS 29 62 819200 1300
66741387 iankury B Dec. 12, 2019, 9 p.m. OK GNU C++17 TESTS 29 62 819200 1300
65288394 alexradu04 B Nov. 18, 2019, 8:56 a.m. OK GNU C++17 TESTS 29 62 819200 1300
59675354 Jalilvand.mJ B Aug. 29, 2019, 5:53 p.m. OK GNU C++17 TESTS 29 62 819200 1300
27152253 lolopat2 B May 16, 2017, 7:07 a.m. OK Go TESTS 29 46 24780800 1300
27152099 lolopat2 B May 16, 2017, 7:01 a.m. OK Go TESTS 29 46 28364800 1300
33824399 sighingnow B Dec. 31, 2017, 3:55 a.m. OK Haskell TESTS 29 46 54681600 1300
27181666 sl0th B May 17, 2017, 2:23 p.m. OK Haskell TESTS 29 93 22220800 1300
27171783 stczhc B May 17, 2017, 4:04 a.m. OK Haskell TESTS 29 967 32768000 1300
64327962 DATVN B Nov. 5, 2019, 6:05 p.m. OK Java 11 TESTS 29 218 0 1300
60451698 jakejase2 B Sept. 12, 2019, 4:13 p.m. OK Java 8 TESTS 29 109 0 1300
27151323 Maulik_Patel B May 16, 2017, 6:16 a.m. OK Java 8 TESTS 29 109 0 1300
27149376 ml_guy B May 16, 2017, 3:44 a.m. OK Java 8 TESTS 29 109 0 1300
27319122 hitesh.bothra B May 24, 2017, 11:43 a.m. OK Java 8 TESTS 29 109 0 1300
58156793 Vatsal53 B Aug. 2, 2019, 5:59 a.m. OK Java 8 TESTS 29 124 0 1300
61281497 kaloosh B Sept. 25, 2019, 5:05 p.m. OK Java 8 TESTS 29 124 0 1300
27168761 parth_1 B May 16, 2017, 9:02 p.m. OK Java 8 TESTS 29 124 0 1300
27152600 code_forces_ B May 16, 2017, 7:21 a.m. OK Java 8 TESTS 29 124 0 1300
27151680 aya_cool B May 16, 2017, 6:42 a.m. OK Java 8 TESTS 29 124 0 1300
27947025 chojh1222 B June 21, 2017, 1:39 p.m. OK Java 8 TESTS 29 124 20582400 1300
27177274 Yanchang B May 17, 2017, 10:41 a.m. OK JavaScript TESTS 29 93 16179200 1300
68113722 da_201612051 B Jan. 3, 2020, 10:36 a.m. OK Kotlin TESTS 29 295 15052800 1300
32318370 Kayaba_Akihiko B Nov. 14, 2017, 7:04 p.m. OK Mono C# TESTS 29 93 15462400 1300
27150084 TRR B May 16, 2017, 4:49 a.m. OK Mono C# TESTS 29 93 16179200 1300
32316545 RuslanDzugaev B Nov. 14, 2017, 4:26 p.m. OK Mono C# TESTS 29 93 16998400 1300
35542137 LiLiNGwp B Feb. 21, 2018, 8:51 a.m. OK Mono C# TESTS 29 93 25395200 1300
27758532 Xtreemist B June 13, 2017, 3:43 p.m. OK Mono C# TESTS 29 109 16896000 1300
27236943 Sorryforpartyrocking B May 20, 2017, 3:39 p.m. OK Mono C# TESTS 29 109 18636800 1300
27182528 og.kostya B May 17, 2017, 3:13 p.m. OK MS C# TESTS 29 46 819200 1300
27362113 serrg B May 26, 2017, 6:42 p.m. OK MS C# TESTS 29 93 16998400 1300
28348286 danik200023 B July 7, 2017, 11:29 a.m. OK MS C# TESTS 29 93 30003200 1300
27153769 fr0st B May 16, 2017, 8:11 a.m. OK MS C# TESTS 29 109 20787200 1300
27323624 flatline B May 24, 2017, 4:47 p.m. OK MS C# TESTS 29 124 22016000 1300
27254854 VCipher B May 20, 2017, 10:20 p.m. OK MS C# TESTS 29 139 6144000 1300
27978505 felixwong ernestfan B June 23, 2017, 6:42 a.m. OK MS C++ TESTS 29 31 2969600 1300
57313031 vjudge1 B July 19, 2019, 7:12 a.m. OK MS C++ TESTS 29 46 819200 1300
57312042 vjudge4 B July 19, 2019, 6:51 a.m. OK MS C++ TESTS 29 46 819200 1300
47098588 vjudge3 B Dec. 16, 2018, 9:36 a.m. OK MS C++ TESTS 29 46 819200 1300
27882099 _AjReme_ B June 18, 2017, 10:03 a.m. OK MS C++ TESTS 29 46 819200 1300
50344521 vjudge5 B Feb. 23, 2019, 5:31 a.m. OK MS C++ TESTS 29 46 819200 1300
27177067 vjudge1 B May 17, 2017, 10:28 a.m. OK MS C++ TESTS 29 46 921600 1300
27509004 mouse_wireless B June 1, 2017, 7:05 p.m. OK MS C++ TESTS 29 46 921600 1300
27882100 _AjReme_ B June 18, 2017, 10:03 a.m. OK MS C++ TESTS 29 46 921600 1300
27165510 SnowD B May 16, 2017, 4:59 p.m. OK MS C++ TESTS 29 46 1331200 1300
57355395 116c B July 20, 2019, 6:02 a.m. OK MS C++ 2017 TESTS 29 62 3174400 1300
57312893 vjudge5 B July 19, 2019, 7:09 a.m. OK MS C++ 2017 TESTS 29 77 2457600 1300
65763424 Edgar2005 B Nov. 26, 2019, 4:50 p.m. OK MS C++ 2017 TESTS 29 156 819200 1300
67683834 HPV B Dec. 27, 2019, 7:52 a.m. OK MS C++ 2017 TESTS 29 171 819200 1300
58225503 IbraheemJanajreh B Aug. 3, 2019, 2:17 p.m. OK MS C++ 2017 TESTS 29 171 2457600 1300
62572877 edwinho15 B Oct. 14, 2019, 3:02 p.m. OK MS C++ 2017 TESTS 29 171 3174400 1300
65764285 MikeShLN B Nov. 26, 2019, 5:11 p.m. OK MS C++ 2017 TESTS 29 186 1126400 1300
57923553 Denko B July 29, 2019, 6:11 a.m. OK MS C++ 2017 TESTS 29 186 2457600 1300
62674864 marewolf B Oct. 16, 2019, 11:07 a.m. OK MS C++ 2017 TESTS 29 186 3174400 1300
57929742 Mixailkys B July 29, 2019, 8:19 a.m. OK PascalABC.NET TESTS 29 436 4096000 1300
27305763 ManikantanV B May 23, 2017, 5:01 p.m. OK PyPy 2 TESTS 29 109 11161600 1300
27220972 Yash_ B May 19, 2017, 7:16 p.m. OK PyPy 2 TESTS 29 124 11264000 1300
27338414 andreamaf B May 25, 2017, 2:10 p.m. OK PyPy 2 TESTS 29 124 11264000 1300
40653601 aeternalis1 B July 23, 2018, 1:51 a.m. OK PyPy 2 TESTS 29 171 12492800 1300
27150569 attiw B May 16, 2017, 5:27 a.m. OK PyPy 2 TESTS 29 171 17817600 1300
41070369 Onesh0t B July 31, 2018, 11:42 p.m. OK PyPy 2 TESTS 29 186 11161600 1300
54017097 vjudge3 B May 12, 2019, 7:25 a.m. OK PyPy 3 TESTS 29 233 18022400 1300
68072900 auouo B Jan. 2, 2020, 11:11 a.m. OK PyPy 3 TESTS 29 265 14336000 1300
28213080 BenL B July 2, 2017, 3:30 p.m. OK PyPy 3 TESTS 29 265 39936000 1300
61931280 kopok2 B Oct. 5, 2019, 4:24 p.m. OK PyPy 3 TESTS 29 280 15974400 1300
67635491 cherish_lin B Dec. 26, 2019, 6:42 a.m. OK PyPy 3 TESTS 29 280 16588800 1300
68834201 sunnyorrainy B Jan. 15, 2020, 1:47 a.m. OK PyPy 3 TESTS 29 280 19251200 1300
54737053 Aidos B May 28, 2019, 5:38 a.m. OK PyPy 3 TESTS 29 280 19660800 1300
57923857 Doxapar B July 29, 2019, 6:19 a.m. OK PyPy 3 TESTS 29 295 14950400 1300
27208732 0w1 B May 19, 2017, 6:25 a.m. OK PyPy 3 TESTS 29 295 16793600 1300
56292131 scambret B June 30, 2019, 2:18 a.m. OK PyPy 3 TESTS 29 296 15052800 1300
27156997 Ahmed_Raafat12 B May 16, 2017, 10:41 a.m. OK Python 2 TESTS 29 202 11878400 1300
27215775 sambit25 B May 19, 2017, 1:49 p.m. OK Python 2 TESTS 29 218 11059200 1300
27636883 drj_reddy B June 7, 2017, 12:38 p.m. OK Python 2 TESTS 29 233 11059200 1300
27557415 nickzuck_007 B June 4, 2017, 7:03 a.m. OK Python 2 TESTS 29 233 11059200 1300
28003213 rav.gupta B June 24, 2017, 10:30 a.m. OK Python 2 TESTS 29 233 15769600 1300
29997067 isgulkov B Sept. 1, 2017, 8:39 p.m. OK Python 2 TESTS 29 249 11161600 1300
27585054 screamer1 B June 5, 2017, 2:41 p.m. OK Python 2 TESTS 29 249 13619200 1300
32970091 ffbh B Dec. 6, 2017, 8:57 a.m. OK Python 2 TESTS 29 249 15667200 1300
27313324 tommyricardo B May 24, 2017, 3:20 a.m. OK Python 2 TESTS 29 265 11878400 1300
27428371 ExCepTioNMaKeR B May 29, 2017, 11:43 a.m. OK Python 2 TESTS 29 265 12800000 1300
32065855 treasuryonly B Nov. 5, 2017, 12:53 a.m. OK Python 3 TESTS 29 171 13004800 1300
27150248 pr3pony B May 16, 2017, 5:01 a.m. OK Python 3 TESTS 29 171 14131200 1300
27224874 Viewsharp B May 19, 2017, 9:50 p.m. OK Python 3 TESTS 29 186 11161600 1300
27264980 Vax B May 21, 2017, 10:44 a.m. OK Python 3 TESTS 29 186 14233600 1300
27171587 orailly B May 17, 2017, 3:40 a.m. OK Python 3 TESTS 29 186 14233600 1300
27150427 pr3pony B May 16, 2017, 5:16 a.m. OK Python 3 TESTS 29 186 14233600 1300
27150120 pr3pony B May 16, 2017, 4:52 a.m. OK Python 3 TESTS 29 187 13824000 1300
27224809 vedant_ B May 19, 2017, 9:43 p.m. OK Python 3 TESTS 29 187 14233600 1300
27176723 arpit040199 B May 17, 2017, 10:09 a.m. OK Python 3 TESTS 29 187 14233600 1300
27173587 mihonya74 B May 17, 2017, 6:35 a.m. OK Python 3 TESTS 29 202 13414400 1300
27205419 cielavenir B May 18, 2017, 11 p.m. OK Ruby TESTS 29 187 32256000 1300
27171627 mai B May 17, 2017, 3:45 a.m. OK Ruby TESTS 29 327 31129600 1300
27304341 Pulkit07 B May 23, 2017, 3:31 p.m. OK Rust TESTS 29 31 4505600 1300

remove filters

Back to search problems