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 374164197 March 17, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6612 ) A Cows and Sequence PROGRAMMING constructive algorithms data structures implementation 1600

B"Bessie and the cows are playing with sequences and need your help. They start with a sequence, initially containing just the number 0, and perform n operations. Each operation is one of the following: After each operation, the cows would like to know the average of all the numbers in the sequence. Help them! The first line contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7105) -- the number of operations. The next n lines describe the operations. Each line will start with an integer ti (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ti xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893), denoting the type of the operation (see above). If ti xe2 x80 x89= xe2 x80 x891, it will be followed by two integers ai, xe2 x80 x89xi (|xi| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89103; 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai). If ti xe2 x80 x89= xe2 x80 x892, it will be followed by a single integer ki (|ki| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89103). If ti xe2 x80 x89= xe2 x80 x893, it will not be followed by anything. It is guaranteed that all operations are correct (don't touch nonexistent elements) and that there will always be at least one element in the sequence. Output n lines each containing the average of the numbers in the sequence after the corresponding operation. The answer will be considered correct if its absolute or relative error doesn't exceed 10 xe2 x80 x89- xe2 x80 x896. In the second sample, the sequence becomes "...

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
3344097 AHTuTTuTyX A March 17, 2013, 6:54 p.m. OK Delphi TESTS 46 140 1638400 1600
40990109 ReaLNero1 A July 30, 2018, 11:36 p.m. OK Delphi TESTS 46 155 1945600 1600
3353119 ruban A March 18, 2013, 5:06 p.m. OK Delphi TESTS 46 171 1638400 1600
3364759 Timur_Keks A March 21, 2013, 11:41 a.m. OK Delphi TESTS 46 171 2764800 1600
3345758 Mosyagin A March 17, 2013, 8:15 p.m. OK Delphi TESTS 46 171 3276800 1600
3362388 Keerill A March 20, 2013, 7:10 p.m. OK Delphi TESTS 46 187 1638400 1600
3345476 Misha100896 A March 17, 2013, 7:51 p.m. OK Delphi TESTS 46 202 16076800 1600
3332089 MrJigan1488 A March 17, 2013, 3:43 p.m. OK Delphi TESTS 46 452 27852800 1600
3339103 AleksanderBalobanov A March 17, 2013, 4:40 p.m. OK Delphi TESTS 46 921 80179200 1600
3408626 ngotrungtuong A March 26, 2013, 2:29 p.m. OK FPC TESTS 46 265 1638400 1600
3421694 opfavor A March 30, 2013, 7:17 a.m. OK FPC TESTS 46 265 1638400 1600
3345723 metalopocalipsis A March 17, 2013, 8:12 p.m. OK FPC TESTS 46 265 1638400 1600
3333968 JustN A March 17, 2013, 3:55 p.m. OK FPC TESTS 46 265 1638400 1600
3401069 ngotrungtuong A March 24, 2013, 4:18 p.m. OK FPC TESTS 46 265 3174400 1600
3345634 no_space A March 17, 2013, 8:04 p.m. OK FPC TESTS 46 265 3174400 1600
3348291 jslijin A March 18, 2013, 5:10 a.m. OK FPC TESTS 46 265 7987200 1600
3345182 hiepsieunhan A March 17, 2013, 7:30 p.m. OK FPC TESTS 46 281 819200 1600
3332916 tsunayoshi A March 17, 2013, 3:48 p.m. OK FPC TESTS 46 281 819200 1600
3408451 ngotrungtuong A March 26, 2013, 1:42 p.m. OK FPC TESTS 46 281 1638400 1600
27796028 tryg A June 15, 2017, 2:54 p.m. OK GNU C TESTS 46 234 1638400 1600
19071461 shreyam4 A July 13, 2016, 11:31 a.m. OK GNU C TESTS 46 234 4812800 1600
22825572 LoppA A Dec. 9, 2016, 4:39 a.m. OK GNU C TESTS 46 234 5120000 1600
19087914 shreyam4 A July 13, 2016, 5:13 p.m. OK GNU C TESTS 46 249 3174400 1600
19087627 shreyam4 A July 13, 2016, 5:11 p.m. OK GNU C TESTS 46 249 3174400 1600
19086614 shreyam4 A July 13, 2016, 5:03 p.m. OK GNU C TESTS 46 249 3174400 1600
23483829 flowerman A Jan. 1, 2017, 1:07 p.m. OK GNU C TESTS 46 249 3481600 1600
27302877 ayushrai09 A May 23, 2017, 2:05 p.m. OK GNU C TESTS 46 249 36044800 1600
27303063 ayushrai09 A May 23, 2017, 2:17 p.m. OK GNU C TESTS 46 264 36044800 1600
27303000 ayushrai09 A May 23, 2017, 2:14 p.m. OK GNU C TESTS 46 265 36044800 1600
22710190 yah01 A Dec. 5, 2016, 11:34 a.m. OK GNU C++ TESTS 46 202 1638400 1600
39433692 Siyuan A June 20, 2018, 11 a.m. OK GNU C++ TESTS 46 202 2457600 1600
41878470 Scut82 A Aug. 19, 2018, 11:08 p.m. OK GNU C++ TESTS 46 202 4710400 1600
40304800 paulzrm A July 14, 2018, 5:05 a.m. OK GNU C++ TESTS 46 202 6451200 1600
4929746 vjudge2 A Oct. 29, 2013, 3:32 p.m. OK GNU C++ TESTS 46 218 1536000 1600
30567903 ea6102 A Sept. 21, 2017, 6:01 a.m. OK GNU C++ TESTS 46 218 3993600 1600
41823701 Scut82 A Aug. 19, 2018, 10:55 a.m. OK GNU C++ TESTS 46 218 4915200 1600
19832621 ibrahim_tabba A Aug. 12, 2016, 4:11 p.m. OK GNU C++ TESTS 46 233 5222400 1600
4928797 vjudge1 A Oct. 29, 2013, 1:02 p.m. OK GNU C++ TESTS 46 234 819200 1600
4930062 1256 A Oct. 29, 2013, 4:48 p.m. OK GNU C++ TESTS 46 234 1536000 1600
3344268 2011330300713 A March 17, 2013, 6:59 p.m. OK GNU C++0x TESTS 46 343 1536000 1600
3344175 Doxer A March 17, 2013, 6:57 p.m. OK GNU C++0x TESTS 46 359 1638400 1600
3351461 ankit1991.aug A March 18, 2013, 1:07 p.m. OK GNU C++0x TESTS 46 359 1638400 1600
3349489 Doxer A March 18, 2013, 8:14 a.m. OK GNU C++0x TESTS 46 359 1638400 1600
3331587 riadwaw A March 17, 2013, 3:40 p.m. OK GNU C++0x TESTS 46 359 1638400 1600
3477259 MinakoKojima A April 5, 2013, 3:22 p.m. OK GNU C++0x TESTS 46 375 819200 1600
3353996 MinakoKojima A March 18, 2013, 9:07 p.m. OK GNU C++0x TESTS 46 375 819200 1600
3353538 sevenzplus A March 18, 2013, 6:46 p.m. OK GNU C++0x TESTS 46 375 819200 1600
3353526 sevenzplus A March 18, 2013, 6:43 p.m. OK GNU C++0x TESTS 46 375 819200 1600
3348464 guest A March 18, 2013, 5:34 a.m. OK GNU C++0x TESTS 46 375 1638400 1600
48091487 ediiknorand A Jan. 8, 2019, 2:04 p.m. OK GNU C11 TESTS 46 1123 3174400 1600
16504618 komi A March 3, 2016, 11:07 p.m. OK GNU C11 TESTS 46 2932 4812800 1600
56863670 chhokmah A July 12, 2019, 1:34 a.m. OK GNU C++11 TESTS 46 171 1638400 1600
56864009 lukelin A July 12, 2019, 1:47 a.m. OK GNU C++11 TESTS 46 187 23040000 1600
19323601 Bassel A July 22, 2016, 12:12 p.m. OK GNU C++11 TESTS 46 202 1638400 1600
46102547 anand A Nov. 23, 2018, 6:58 a.m. OK GNU C++11 TESTS 46 202 2355200 1600
19323551 Bassel A July 22, 2016, 12:10 p.m. OK GNU C++11 TESTS 46 217 1638400 1600
67386350 5_se7n A Dec. 21, 2019, 5:57 p.m. OK GNU C++11 TESTS 46 217 2252800 1600
64429321 mj101 A Nov. 6, 2019, 8:30 p.m. OK GNU C++11 TESTS 46 218 1433600 1600
30289996 mijatolaxd A Sept. 12, 2017, 3:32 p.m. OK GNU C++11 TESTS 46 218 1638400 1600
51242720 holmium01 A March 13, 2019, 12:46 a.m. OK GNU C++11 TESTS 46 218 1638400 1600
55926549 Davidshx A June 22, 2019, 9:34 a.m. OK GNU C++11 TESTS 46 218 1638400 1600
67518532 mota_haathi A Dec. 24, 2019, 11:40 a.m. OK GNU C++14 TESTS 46 233 2662400 1600
28160873 MaghrabyZ A June 30, 2017, 1:16 a.m. OK GNU C++14 TESTS 46 234 4300800 1600
39462831 terminator A June 21, 2018, 1:02 p.m. OK GNU C++14 TESTS 46 249 3174400 1600
31206167 mengxiang000 A Oct. 11, 2017, 4:27 a.m. OK GNU C++14 TESTS 46 249 3993600 1600
37360853 kansagara A April 15, 2018, 8:11 p.m. OK GNU C++14 TESTS 46 249 5734400 1600
44404692 shtori A Oct. 16, 2018, 2:21 p.m. OK GNU C++14 TESTS 46 265 2355200 1600
55490600 parzival1110 A June 12, 2019, 9:51 a.m. OK GNU C++14 TESTS 46 280 1638400 1600
21649157 siddharths067 A Oct. 21, 2016, 5:49 p.m. OK GNU C++14 TESTS 46 280 2355200 1600
42723148 Reventon A Sept. 10, 2018, 4:30 a.m. OK GNU C++14 TESTS 46 280 2457600 1600
62228688 xvenom99 A Oct. 9, 2019, 7:49 p.m. OK GNU C++14 TESTS 46 280 2969600 1600
54475680 AshutoshAnshul A May 22, 2019, 8:19 a.m. OK GNU C++17 TESTS 46 218 1536000 1600
57012814 nischal_goyal_28 A July 14, 2019, 10:08 a.m. OK GNU C++17 TESTS 46 233 2355200 1600
53275614 hulkmaniac99 A April 25, 2019, 9:13 a.m. OK GNU C++17 TESTS 46 234 2355200 1600
45786800 vjudge3 A Nov. 16, 2018, 2:48 a.m. OK GNU C++17 TESTS 46 295 819200 1600
49780846 deadmans A Feb. 11, 2019, 5:30 p.m. OK GNU C++17 TESTS 46 295 1536000 1600
46198376 The_sound_of_the_fox A Nov. 25, 2018, 9:44 a.m. OK GNU C++17 TESTS 46 295 1638400 1600
45991839 zhangjiusi A Nov. 20, 2018, 10:25 a.m. OK GNU C++17 TESTS 46 295 3174400 1600
52274772 madhavgaba A April 3, 2019, 2:21 p.m. OK GNU C++17 TESTS 46 295 4812800 1600
50073795 mdallrosa A Feb. 17, 2019, 7:32 p.m. OK GNU C++17 TESTS 46 295 5632000 1600
51112027 shrikant.2251 A March 10, 2019, 5:03 a.m. OK GNU C++17 TESTS 46 296 1536000 1600
7920741 rizalgow A Sept. 23, 2014, 10:16 a.m. OK Go TESTS 46 622 3174400 1600
7990398 kaiysh A Sept. 28, 2014, 5:27 a.m. OK Go TESTS 46 654 4710400 1600
3354629 cojna A March 19, 2013, 3:26 a.m. OK Haskell TESTS 46 765 37785600 1600
3347317 cojna A March 18, 2013, 2:35 a.m. OK Haskell TESTS 46 953 37785600 1600
67133055 Oom A Dec. 18, 2019, 1:48 a.m. OK Java 11 TESTS 46 561 0 1600
3344187 emo A March 17, 2013, 6:57 p.m. OK Java 6 TESTS 46 1015 409600 1600
3333063 bsrkaditya A March 17, 2013, 3:49 p.m. OK Java 6 TESTS 46 1078 409600 1600
3331985 Dumpty A March 17, 2013, 3:42 p.m. OK Java 6 TESTS 46 1093 614400 1600
3957465 mkirsche A June 25, 2013, 12:52 a.m. OK Java 6 TESTS 46 1109 409600 1600
3355548 zulkan A March 19, 2013, 8:45 a.m. OK Java 6 TESTS 46 1140 512000 1600
3907358 ilovepink A June 16, 2013, 8:27 p.m. OK Java 6 TESTS 46 1140 14643200 1600
3355589 zulkan A March 19, 2013, 8:53 a.m. OK Java 6 TESTS 46 1154 512000 1600
3345783 bendyna.ivan A March 17, 2013, 8:17 p.m. OK Java 6 TESTS 46 1156 409600 1600
3351570 Petruchcho A March 18, 2013, 1:19 p.m. OK Java 6 TESTS 46 1156 716800 1600
3345058 sayuan A March 17, 2013, 7:24 p.m. OK Java 6 TESTS 46 1156 14643200 1600
3882254 xenoslash A June 14, 2013, 7:45 a.m. OK Java 7 TESTS 46 1076 409600 1600
3416260 rpk74m A March 28, 2013, 3:29 p.m. OK Java 7 TESTS 46 1076 512000 1600
3345481 Sinner A March 17, 2013, 7:52 p.m. OK Java 7 TESTS 46 1076 512000 1600
3333177 phantom11 A March 17, 2013, 3:49 p.m. OK Java 7 TESTS 46 1092 409600 1600
3364791 rais.fathin38 A March 21, 2013, 11:45 a.m. OK Java 7 TESTS 46 1109 409600 1600
3380973 di_halt A March 22, 2013, 1:50 p.m. OK Java 7 TESTS 46 1109 512000 1600
3380654 di_halt A March 22, 2013, 1:07 p.m. OK Java 7 TESTS 46 1109 512000 1600
3345239 yaro A March 17, 2013, 7:35 p.m. OK Java 7 TESTS 46 1109 512000 1600
3335917 Azat_Yusupov A March 17, 2013, 4:10 p.m. OK Java 7 TESTS 46 1123 409600 1600
3346447 ivanovak A March 17, 2013, 10:06 p.m. OK Java 7 TESTS 46 1125 409600 1600
44968696 mandark27 A Oct. 27, 2018, 9:19 p.m. OK Java 8 TESTS 46 436 0 1600
59575188 hasan5788 A Aug. 27, 2019, 1:55 p.m. OK Java 8 TESTS 46 467 0 1600
54859325 ZeyadKhattab A May 30, 2019, 11:14 p.m. OK Java 8 TESTS 46 467 0 1600
51324782 Verdusk A March 15, 2019, 9:10 a.m. OK Java 8 TESTS 46 467 15462400 1600
45215980 Anonymous A Nov. 2, 2018, 5:54 p.m. OK Java 8 TESTS 46 467 18636800 1600
49464267 deepak4669 A Feb. 4, 2019, 2:25 p.m. OK Java 8 TESTS 46 483 0 1600
32053789 kunal_khatri A Nov. 4, 2017, 1 p.m. OK Java 8 TESTS 46 483 0 1600
32320713 parth_15 A Nov. 14, 2017, 9:34 p.m. OK Java 8 TESTS 46 498 0 1600
28016614 Maulik_Patel A June 25, 2017, 6:04 a.m. OK Java 8 TESTS 46 498 21299200 1600
54859088 ZeyadKhattab A May 30, 2019, 10:53 p.m. OK Java 8 TESTS 46 499 0 1600
23538642 JoeBlow A Jan. 4, 2017, 3:43 p.m. OK Kotlin TESTS 46 233 21094400 1600
23538027 JoeBlow A Jan. 4, 2017, 3:05 p.m. OK Kotlin TESTS 46 233 21196800 1600
23529955 JoeBlow A Jan. 4, 2017, 7:18 a.m. OK Kotlin TESTS 46 249 21094400 1600
3540043 MbIX A April 15, 2013, 9:02 a.m. OK Mono C# TESTS 46 781 3686400 1600
36282516 batraz A March 14, 2018, 4:38 p.m. OK Mono C# TESTS 46 857 44953600 1600
36281237 batraz A March 14, 2018, 4:14 p.m. OK Mono C# TESTS 46 920 44953600 1600
3352933 Nayils A March 18, 2013, 4:29 p.m. OK Mono C# TESTS 46 1000 6553600 1600
3352878 Kety93 A March 18, 2013, 4:20 p.m. OK Mono C# TESTS 46 1031 6553600 1600
3333763 AlphaStream A March 17, 2013, 3:53 p.m. OK Mono C# TESTS 46 1125 11673600 1600
3552949 Neverauskas A April 16, 2013, 2:22 p.m. OK Mono C# TESTS 46 1328 5324800 1600
3552965 Neverauskas A April 16, 2013, 2:26 p.m. OK Mono C# TESTS 46 1406 4608000 1600
51789377 toysheeyeyraku A March 24, 2019, 12:08 p.m. OK Mono C# TESTS 46 1450 14643200 1600
12976197 og.kostya A Sept. 12, 2015, 5:46 p.m. OK MS C# TESTS 46 312 4710400 1600
11687149 sicon54 A June 20, 2015, 9:48 p.m. OK MS C# TESTS 46 1902 8396800 1600
27144996 makorro A May 15, 2017, 8:19 p.m. OK MS C++ TESTS 46 264 2252800 1600
29316221 Bob_The_Cow A Aug. 10, 2017, 2:33 a.m. OK MS C++ TESTS 46 280 3686400 1600
28901010 mshcherba A July 26, 2017, 10:18 a.m. OK MS C++ TESTS 46 280 5324800 1600
42536124 vjudge1 A Sept. 6, 2018, 1:42 a.m. OK MS C++ TESTS 46 327 1843200 1600
29816445 Volpe A Aug. 26, 2017, 11:18 p.m. OK MS C++ TESTS 46 327 4096000 1600
45787079 vjudge4 A Nov. 16, 2018, 3:07 a.m. OK MS C++ TESTS 46 343 1638400 1600
45786779 vjudge5 A Nov. 16, 2018, 2:46 a.m. OK MS C++ TESTS 46 358 819200 1600
45786788 vjudge5 A Nov. 16, 2018, 2:47 a.m. OK MS C++ TESTS 46 358 819200 1600
45788286 vjudge4 A Nov. 16, 2018, 4:32 a.m. OK MS C++ TESTS 46 358 819200 1600
45788612 vjudge4 A Nov. 16, 2018, 4:56 a.m. OK MS C++ TESTS 46 358 1638400 1600
58512653 CtrlAlt A Aug. 9, 2019, 8:02 p.m. OK MS C++ 2017 TESTS 46 389 9728000 1600
59414919 yorky A Aug. 24, 2019, 5:41 p.m. OK MS C++ 2017 TESTS 46 701 4608000 1600
59980271 0-jij-0 A Sept. 4, 2019, 7:57 a.m. OK MS C++ 2017 TESTS 46 1404 27443200 1600
3347681 Darooha A March 18, 2013, 3:34 a.m. OK Ocaml TESTS 46 1484 7372800 1600
52581195 Mr.Inconsistent A April 10, 2019, 7:19 p.m. OK PyPy 3 TESTS 46 935 10444800 1600
65430663 Mohamed_Ayman A Nov. 20, 2019, 11:58 a.m. OK PyPy 3 TESTS 46 935 10956800 1600
57945896 tchr A July 29, 2019, 2:20 p.m. OK PyPy 3 TESTS 46 967 30822400 1600
65238668 chaudhary_19 A Nov. 17, 2019, 8:09 a.m. OK PyPy 3 TESTS 46 1075 11571200 1600
69433468 abhivick07 A Jan. 23, 2020, 6:06 p.m. OK PyPy 3 TESTS 46 1091 11366400 1600
13256483 SteelRaven A Sept. 28, 2015, 1:43 a.m. OK PyPy 3 TESTS 46 2900 55398400 1600
55272779 Claustrophobic_Penguin A June 7, 2019, 5:17 p.m. OK Python 2 TESTS 46 841 8192000 1600
58108367 MajAK A Aug. 1, 2019, 5:47 a.m. OK Python 2 TESTS 46 919 8192000 1600
35857444 ______u______ A March 2, 2018, 8:40 p.m. OK Python 2 TESTS 46 919 12800000 1600
35857159 ______n______ A March 2, 2018, 8:34 p.m. OK Python 2 TESTS 46 919 12800000 1600
35856707 _____i_____ A March 2, 2018, 8:26 p.m. OK Python 2 TESTS 46 919 12800000 1600
35856599 _____k_____ A March 2, 2018, 8:23 p.m. OK Python 2 TESTS 46 919 12800000 1600
35847972 ______h______ A March 2, 2018, 4:51 p.m. OK Python 2 TESTS 46 919 12800000 1600
35847958 ______k______ A March 2, 2018, 4:51 p.m. OK Python 2 TESTS 46 919 12800000 1600
35847507 ______i______ A March 2, 2018, 4:45 p.m. OK Python 2 TESTS 46 919 12800000 1600
35843121 ______M______ A March 2, 2018, 3:06 p.m. OK Python 2 TESTS 46 919 12800000 1600
65430777 Mohamed_Ayman A Nov. 20, 2019, noon OK Python 3 TESTS 46 1075 5427200 1600
48554674 jadeddragon A Jan. 19, 2019, 4:35 a.m. OK Python 3 TESTS 46 1076 27238400 1600
37431554 nowyyz A April 18, 2018, 10:10 a.m. OK Python 3 TESTS 46 1388 34406400 1600
41983840 Mk_Python_v1 A Aug. 23, 2018, 4:25 a.m. OK Python 3 TESTS 46 1403 27136000 1600
16259006 orailly A Feb. 21, 2016, 1:01 p.m. OK Python 3 TESTS 46 1870 24166400 1600
16258881 orailly A Feb. 21, 2016, 12:55 p.m. OK Python 3 TESTS 46 1902 24166400 1600
16259086 orailly A Feb. 21, 2016, 1:06 p.m. OK Python 3 TESTS 46 1932 24166400 1600
7858017 WARenie A Sept. 19, 2014, 6:50 p.m. OK Python 3 TESTS 46 2650 27238400 1600
16402653 eboy2914 A Feb. 28, 2016, 12:07 p.m. OK Python 3 TESTS 46 2774 27340800 1600
5046407 yugle7 A Nov. 10, 2013, 5:26 p.m. OK Python 3 TESTS 46 2994 27545600 1600
17256764 reldan A April 9, 2016, 7:57 p.m. OK Scala TESTS 46 2558 68300800 1600

remove filters

Back to search problems