Codeforces Round 146 (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
235 Codeforces Round 146 (Div. 1) FINISHED False 7200 386722223 Oct. 21, 2012, 7:10 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3638 ) B Let's Play Osu! PROGRAMMING dp math probabilities 2100

B'You 're playing a game called Osu! Here 's a simplified version of it. There are n clicks in a game. For each click there are two outcomes: correct or bad. Let us denote correct as "O", bad as "X", then the whole play can be encoded as a sequence of n characters "O" and "X". Using the play sequence you can calculate the score for the play as follows: for every maximal consecutive "O"s block, add the square of its length (the number of characters "O") to the score. For example, if your play can be encoded as "OOXOOOXXOO", then there 's three maximal consecutive "O"s block "OO", "OOO", "OO", so your score will be 22 xe2 x80 x89+ xe2 x80 x8932 xe2 x80 x89+ xe2 x80 x8922 xe2 x80 x89= xe2 x80 x8917. If there are no correct clicks in a play then the score for the play equals to 0. You know that the probability to click the i-th (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) click correctly is pi. In other words, the i-th character in the play sequence has pi probability to be "O", 1 xe2 x80 x89- xe2 x80 x89pi to be "X". You task is to calculate the expected score for your play. The first line contains an integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of clicks. The second line contains n space-separated real numbers p1, xe2 x80 x89p2, xe2 x80 x89..., xe2 x80 x89pn (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89pi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891). There will be at most six digits after the decimal point in the given pi. Print a single real number -- the expected score for your play. Your answer will be considered correct if its absolute or relative error does not exceed 10 xe2 x80 x89- xe2 x80 x896. For the first example. There are 8 possible outcomes. Each has a probability of 0.125. So the expected score is '...

Tutorials

Codeforces Round #146 Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3658740 mr_justadog B May 1, 2013, 5:59 p.m. OK Delphi TESTS 72 31 3072000 2100
2396839 tourist B Oct. 21, 2012, 7:22 a.m. OK Delphi TESTS 72 31 6041600 2100
2407008 xy666 B Oct. 22, 2012, 6:38 a.m. OK Delphi TESTS 72 46 0 2100
2404886 ruban B Oct. 21, 2012, 3:50 p.m. OK Delphi TESTS 72 46 2969600 2100
2423390 Depool B Oct. 24, 2012, 10:25 p.m. OK Delphi TESTS 72 62 2048000 2100
40990606 ReaLNero1 B July 31, 2018, 12:04 a.m. OK Delphi TESTS 72 62 3379200 2100
2408679 swordfeng B Oct. 22, 2012, 1:15 p.m. OK FPC TESTS 72 46 0 2100
2404439 nhandi B Oct. 21, 2012, 2:32 p.m. OK FPC TESTS 72 46 0 2100
3652603 ljcc B April 30, 2013, 1:40 a.m. OK FPC TESTS 72 46 1024000 2100
2443695 t_t_0000 B Oct. 27, 2012, 3:25 p.m. OK FPC TESTS 72 46 1024000 2100
2403795 lsmll B Oct. 21, 2012, 1:07 p.m. OK FPC TESTS 72 46 1228800 2100
2417340 n_cqt B Oct. 23, 2012, 12:33 p.m. OK FPC TESTS 72 46 1638400 2100
2440755 zxh809444285 B Oct. 27, 2012, 2:11 a.m. OK FPC TESTS 72 46 2355200 2100
2409124 y.kemaev B Oct. 22, 2012, 2:24 p.m. OK FPC TESTS 72 46 6041600 2100
7560911 WARenie B Aug. 23, 2014, 3:06 p.m. OK FPC TESTS 72 62 0 2100
6170427 cjqw B March 29, 2014, 3:30 a.m. OK FPC TESTS 72 62 0 2100
3425633 atpec B March 31, 2013, 5:45 a.m. OK GNU C TESTS 72 78 0 2100
4814849 Picks B Oct. 17, 2013, 3:10 p.m. OK GNU C TESTS 72 92 2457600 2100
2404606 NoSoul B Oct. 21, 2012, 2:58 p.m. OK GNU C TESTS 72 156 0 2100
2637175 dimitris B Nov. 24, 2012, 11:10 a.m. OK GNU C TESTS 72 171 0 2100
39415303 Re_xy B June 19, 2018, 3:27 p.m. OK GNU C++ TESTS 72 62 819200 2100
4029390 hehaodele B July 6, 2013, 5:17 a.m. OK GNU C++ TESTS 72 78 0 2100
3689727 chnst B May 7, 2013, 9:21 a.m. OK GNU C++ TESTS 72 78 0 2100
3011864 fts96 B Jan. 26, 2013, 11:52 a.m. OK GNU C++ TESTS 72 78 819200 2100
2868698 amirmd76 B Jan. 3, 2013, 9:08 a.m. OK GNU C++ TESTS 72 78 819200 2100
3205259 bnuvjudge B Feb. 28, 2013, 6:49 a.m. OK GNU C++ TESTS 72 78 1536000 2100
2869187 lzl65825 B Jan. 3, 2013, 11:46 a.m. OK GNU C++ TESTS 72 78 1536000 2100
2856111 RsEnts B Dec. 30, 2012, 8:28 a.m. OK GNU C++ TESTS 72 78 1536000 2100
14125105 130705009 B Nov. 7, 2015, 1:49 p.m. OK GNU C++ TESTS 72 92 0 2100
7665345 I_love_tigersugar B Sept. 2, 2014, 5:16 a.m. OK GNU C++ TESTS 72 92 0 2100
4912466 yutaka1999 B Oct. 27, 2013, 11:59 a.m. OK GNU C++0x TESTS 72 62 0 2100
8606057 IcyGirl B Nov. 7, 2014, 3:51 p.m. OK GNU C++0x TESTS 72 122 819200 2100
10033604 sdya B Feb. 26, 2015, 2:34 p.m. OK GNU C++0x TESTS 72 122 921600 2100
5923444 diego_v1 B March 4, 2014, 12:09 p.m. OK GNU C++0x TESTS 72 122 1536000 2100
10332735 FatalEagle B March 18, 2015, 5:24 a.m. OK GNU C++0x TESTS 72 122 1638400 2100
10190337 damowang B March 7, 2015, 1:16 p.m. OK GNU C++0x TESTS 72 122 1638400 2100
9303210 Duxar B Dec. 30, 2014, 6:58 a.m. OK GNU C++0x TESTS 72 122 1638400 2100
5240876 No_stopII B Nov. 26, 2013, 6:55 a.m. OK GNU C++0x TESTS 72 124 0 2100
9468475 slavik B Jan. 18, 2015, 11:04 p.m. OK GNU C++0x TESTS 72 124 819200 2100
8611211 IcyGirl B Nov. 8, 2014, 3:25 a.m. OK GNU C++0x TESTS 72 124 819200 2100
58833588 rainboy B Aug. 14, 2019, 7:15 p.m. OK GNU C11 TESTS 72 92 819200 2100
26334334 rprtr258 B April 13, 2017, 9:59 a.m. OK GNU C++11 TESTS 72 60 3686400 2100
50261283 Trick-t B Feb. 21, 2019, 1:02 a.m. OK GNU C++11 TESTS 72 62 2252800 2100
66754572 LLCS B Dec. 13, 2019, 5:53 a.m. OK GNU C++11 TESTS 72 92 0 2100
61351398 Karnage B Sept. 27, 2019, 8:22 a.m. OK GNU C++11 TESTS 72 92 0 2100
61350419 Karnage B Sept. 27, 2019, 7:49 a.m. OK GNU C++11 TESTS 72 92 0 2100
61071289 pigg B Sept. 22, 2019, 12:52 p.m. OK GNU C++11 TESTS 72 92 0 2100
60708256 ByHa B Sept. 17, 2019, 6:41 a.m. OK GNU C++11 TESTS 72 92 0 2100
59978274 zsben_love_tomorrow B Sept. 4, 2019, 7:03 a.m. OK GNU C++11 TESTS 72 92 0 2100
59692929 luogu_bot1 B Aug. 30, 2019, 7:06 a.m. OK GNU C++11 TESTS 72 92 0 2100
69073165 ASTiKi B Jan. 19, 2020, 12:24 a.m. OK GNU C++11 TESTS 72 92 0 2100
46155211 --d B Nov. 24, 2018, 8:29 a.m. OK GNU C++14 TESTS 72 92 819200 2100
28153973 I_love_ProParThinkNot B June 29, 2017, 5:13 p.m. OK GNU C++14 TESTS 72 122 1945600 2100
63921564 vjudge4 B Oct. 31, 2019, 11:52 a.m. OK GNU C++14 TESTS 72 124 0 2100
28153546 vjudge4 B June 29, 2017, 5:07 p.m. OK GNU C++14 TESTS 72 124 1945600 2100
61592465 MinecraftFuns B Oct. 1, 2019, 7:31 a.m. OK GNU C++14 TESTS 72 216 0 2100
44998691 ZNI B Oct. 28, 2018, 3:43 p.m. OK GNU C++14 TESTS 72 216 3584000 2100
47360321 Sciorz B Dec. 22, 2018, 8:22 a.m. OK GNU C++14 TESTS 72 218 0 2100
61700501 sunyunqi B Oct. 2, 2019, 8:24 a.m. OK GNU C++14 TESTS 72 218 0 2100
26975352 vjudge1 B May 9, 2017, 2:10 p.m. OK GNU C++14 TESTS 72 218 819200 2100
52349715 bluefi B April 5, 2019, 2:05 p.m. OK GNU C++14 TESTS 72 218 819200 2100
58058366 goat18_310 B July 31, 2019, 6:25 a.m. OK GNU C++17 TESTS 72 124 7987200 2100
65244184 I_love_Kuroni B Nov. 17, 2019, 9:45 a.m. OK GNU C++17 TESTS 72 218 0 2100
59100957 spectaclehong B Aug. 19, 2019, 4:03 p.m. OK GNU C++17 TESTS 72 218 819200 2100
46099529 m1sch3f B Nov. 23, 2018, 4:28 a.m. OK GNU C++17 TESTS 72 218 1228800 2100
57592067 vjudge4 B July 23, 2019, 12:37 p.m. OK GNU C++17 TESTS 72 218 1536000 2100
57170543 vjudge3 B July 17, 2019, 2:43 a.m. OK GNU C++17 TESTS 72 218 1536000 2100
68925016 pedrohlf B Jan. 16, 2020, 10:10 a.m. OK GNU C++17 TESTS 72 218 1638400 2100
58074264 CYW_lyr B July 31, 2019, 11:49 a.m. OK GNU C++17 TESTS 72 218 2457600 2100
62335972 vjudge5 B Oct. 11, 2019, 1:16 a.m. OK GNU C++17 TESTS 72 218 2457600 2100
49148536 CoodeForces B Jan. 29, 2019, 11:45 a.m. OK GNU C++17 TESTS 72 218 2662400 2100
2454585 bsrkaditya B Oct. 28, 2012, 6:02 a.m. OK Haskell TESTS 72 203 13619200 2100
2454576 bsrkaditya B Oct. 28, 2012, 5:57 a.m. OK Haskell TESTS 72 218 12595200 2100
2408695 kost B Oct. 22, 2012, 1:19 p.m. OK Haskell TESTS 72 1187 39936000 2100
2396274 Egor B Oct. 21, 2012, 7:17 a.m. OK Java 6 TESTS 72 109 0 2100
2399934 PeterGriffin B Oct. 21, 2012, 8:06 a.m. OK Java 6 TESTS 72 125 307200 2100
2398264 dgozman B Oct. 21, 2012, 7:41 a.m. OK Java 6 TESTS 72 125 409600 2100
2607305 gh_ost B Nov. 20, 2012, 7:02 p.m. OK Java 6 TESTS 72 140 204800 2100
2422290 llaki B Oct. 24, 2012, 3:36 p.m. OK Java 6 TESTS 72 140 307200 2100
2408630 Mark_Fan B Oct. 22, 2012, 1:05 p.m. OK Java 6 TESTS 72 140 307200 2100
2399544 VArtem B Oct. 21, 2012, 8 a.m. OK Java 6 TESTS 72 140 307200 2100
2472191 jmoreira B Oct. 30, 2012, 9:55 p.m. OK Java 6 TESTS 72 156 204800 2100
2414357 calculus.saransh B Oct. 22, 2012, 11:16 p.m. OK Java 6 TESTS 72 156 307200 2100
2396194 Petr B Oct. 21, 2012, 7:17 a.m. OK Java 6 TESTS 72 156 307200 2100
2404698 jiangzhijie B Oct. 21, 2012, 3:14 p.m. OK Java 7 TESTS 72 109 0 2100
2397274 yaro B Oct. 21, 2012, 7:27 a.m. OK Java 7 TESTS 72 125 307200 2100
4094969 santjuan B July 17, 2013, 10:26 p.m. OK Java 7 TESTS 72 140 307200 2100
2567279 fnozoszzt B Nov. 16, 2012, 1:50 p.m. OK Java 7 TESTS 72 140 307200 2100
2406586 nitegazer B Oct. 22, 2012, 3:37 a.m. OK Java 7 TESTS 72 140 307200 2100
2396899 mrNobody B Oct. 21, 2012, 7:23 a.m. OK Java 7 TESTS 72 140 307200 2100
4313007 Azat_Yusupov B Aug. 19, 2013, 4:08 p.m. OK Java 7 TESTS 72 186 204800 2100
7281252 miguelmaurizio B July 28, 2014, 11:32 p.m. OK Java 7 TESTS 72 186 409600 2100
11254697 Sumeet.Varma B May 24, 2015, 1:20 p.m. OK Java 7 TESTS 72 218 0 2100
9371370 alibaba B Jan. 6, 2015, 9:46 a.m. OK Java 7 TESTS 72 218 0 2100
50837937 hongquanntct B March 5, 2019, 3:43 p.m. OK Java 8 TESTS 72 248 0 2100
39078339 Hoda_Hisham B June 9, 2018, 8:33 p.m. OK Java 8 TESTS 72 310 0 2100
30019178 pitfall B Sept. 2, 2017, 7:02 p.m. OK Java 8 TESTS 72 342 0 2100
9118138 Rox B Dec. 13, 2014, 7:14 p.m. OK Java 8 TESTS 72 342 0 2100
20291030 Ahmad_Elsagheer B Aug. 30, 2016, 10:30 p.m. OK Java 8 TESTS 72 372 0 2100
7281240 miguelmaurizio B July 28, 2014, 11:27 p.m. OK Java 8 TESTS 72 498 1024000 2100
7281244 miguelmaurizio B July 28, 2014, 11:28 p.m. OK Java 8 TESTS 72 530 1126400 2100
7281237 miguelmaurizio B July 28, 2014, 11:25 p.m. OK Java 8 TESTS 72 654 1536000 2100
44540156 Anonymous B Oct. 19, 2018, 11:05 a.m. OK Java 8 TESTS 72 872 0 2100
58833587 Dukkha B Aug. 14, 2019, 7:15 p.m. OK Java 8 TESTS 72 872 0 2100
65240276 VietThienTranPPUTL B Nov. 17, 2019, 8:34 a.m. OK Mono C# TESTS 72 154 10444800 2100
2401528 it4.kp B Oct. 21, 2012, 8:39 a.m. OK Mono C# TESTS 72 171 6758400 2100
2396836 pperm B Oct. 21, 2012, 7:22 a.m. OK MS C++ TESTS 72 109 0 2100
2421770 caustique B Oct. 24, 2012, 1:44 p.m. OK MS C++ TESTS 72 109 0 2100
2555486 Schullz B Nov. 14, 2012, 6:42 a.m. OK MS C++ TESTS 72 109 1638400 2100
2398546 NuM B Oct. 21, 2012, 7:45 a.m. OK MS C++ TESTS 72 109 2355200 2100
2420857 tyamgin B Oct. 24, 2012, 10:31 a.m. OK MS C++ TESTS 72 109 2355200 2100
2402566 mugurelionut B Oct. 21, 2012, 9:02 a.m. OK MS C++ TESTS 72 109 3993600 2100
2400237 -DMYTRO- B Oct. 21, 2012, 8:12 a.m. OK MS C++ TESTS 72 125 0 2100
2700168 daidailanlan B Dec. 6, 2012, 12:17 p.m. OK MS C++ TESTS 72 125 819200 2100
2753518 pratikmoona B Dec. 12, 2012, 7:23 a.m. OK MS C++ TESTS 72 125 819200 2100
2526449 tomas.svab B Nov. 9, 2012, 11:51 a.m. OK MS C++ TESTS 72 125 819200 2100
23878806 vjudge5 B Jan. 16, 2017, 9:53 a.m. OK PyPy 2 TESTS 72 218 29900800 2100
66440963 bularond B Dec. 7, 2019, 7:55 a.m. OK PyPy 3 TESTS 72 434 9728000 2100
3726943 lyrics B May 16, 2013, 12:02 p.m. OK Python 2 TESTS 72 140 6041600 2100
2419911 lyrics B Oct. 24, 2012, 4:46 a.m. OK Python 2 TESTS 72 156 5836800 2100
2405332 nealzane B Oct. 21, 2012, 5:25 p.m. OK Python 2 TESTS 72 171 5836800 2100
2476203 khuongnd B Nov. 1, 2012, 4:40 a.m. OK Python 2 TESTS 72 203 6144000 2100
15914985 not_bot_but_POT B Feb. 9, 2016, 1:57 p.m. OK Python 2 TESTS 72 218 6041600 2100
35853552 ______u______ B March 2, 2018, 7:19 p.m. OK Python 2 TESTS 72 248 10649600 2100
35849254 ______n______ B March 2, 2018, 5:11 p.m. OK Python 2 TESTS 72 248 10649600 2100
35848975 _____i_____ B March 2, 2018, 5:06 p.m. OK Python 2 TESTS 72 248 10649600 2100
35848928 _____k_____ B March 2, 2018, 5:06 p.m. OK Python 2 TESTS 72 248 10649600 2100
35842242 ______h______ B March 2, 2018, 2:49 p.m. OK Python 2 TESTS 72 248 10649600 2100
27062027 Boson007 B May 12, 2017, 8:35 p.m. OK Python 3 TESTS 72 342 9318400 2100
29623282 cen B Aug. 20, 2017, 2:23 p.m. OK Python 3 TESTS 72 374 9318400 2100
27062032 toster1287 B May 12, 2017, 8:35 p.m. OK Python 3 TESTS 72 374 9318400 2100
42066490 DESmart18 B Aug. 24, 2018, 8 p.m. OK Python 3 TESTS 72 404 8396800 2100
42124065 Mk_Python_v1 B Aug. 26, 2018, 2:03 p.m. OK Python 3 TESTS 72 436 9011200 2100
2566053 lfp B Nov. 16, 2012, 7:04 a.m. OK Ruby TESTS 72 437 5222400 2100
2405969 Cromel B Oct. 21, 2012, 8:29 p.m. OK Ruby TESTS 72 453 9113600 2100
2406469 Adelaide B Oct. 22, 2012, 2:40 a.m. OK Ruby TESTS 72 468 9113600 2100

remove filters

Back to search problems