# 【BZOJ 4318】OSU!

### 解题报告

$E_{(i,x^2)}，E_{(i,x)}$分别表示$x^2,x$的期望

$E_{(i,x^3)}=p_i \times E_{(i-1,(x+1)^3)}$
$E_{(i,x^2)}=p_i \times E_{(i-1,(x+1)^2)}$
$E_{(i,x)}=p_i \times (E_{(i-1,x)} + 1)$

$E_{(i,x^3)}=p_i \times (E_{(i-1,x^3)} + 3E_{(i-1,x^2)} + 3E_{(i-1,x)} + 1)$
$E_{(i,x^2)}=p_i \times (E_{(i-1,x^2)} + 2E_{(i-1,x)} + 1)$

### Code

#include<bits/stdc++.h>
#define LL long long
using namespace std;

char c=getchar(); int f=1,ret=0;
while (c<'0'||c>'9') {if(c=='-')f=-1;c=getchar();}
while (c<='9'&&c>='0') {ret=ret*10+c-'0';c=getchar();}
return ret * f;
}

int main() {
double e1=0,e2=0,e3=0,ans=0,p;
for (int i=1;i<=n;i++) {
scanf("%lf",&p);
ans += e3 * (1 - p);
e3 = p * (e3 + 3 * e2 + 3 * e1 + 1);
e2 = p * (e2 + 2 * e1 + 1);
e1 = p * (e1 + 1);
}
printf("%.1lf\n",ans+e3);
return 0;
}


## 286 thoughts to “【BZOJ 4318】OSU!”

1. Hi, great work. I really appeaciate the information you are providing through your site, i have alwasy find it helpful. Keep up the amazing work.

2. I must thank you for the efforts you’ve put in penning this website. I am hoping to see the same high-grade content by you later on as well. In truth, your creative writing abilities has encouraged me to get my very own blog now 😉

3. Hi there, I found your website via Google while looking for a related topic, your web site came up, it looks great. I’ve bookmarked it in my google bookmarks.

4. A round of applause for your blog.Really looking forward to read more. Fantastic.

5. Really appreciate you sharing this blog.Much thanks again. Keep writing.

6. A big thank you for your post.Much thanks again. Great.

8. Awesome article. Cool.

9. wow, awesome blog post.Really thank you! Much obliged.

10. Thanks-a-mundo for the post.Really thank you! Want more.

11. Major thankies for the article post.Really looking forward to read more. Great.

12. Really appreciate you sharing this blog article.Much thanks again. Will read on…

13. Appreciate you sharing, great article.Really looking forward to read more. Awesome.

14. I loved your article.Really thank you! Cool.

15. I loved your article post.Really looking forward to read more. Fantastic.

16. Looking forward to reading more. Great article post.Really looking forward to read more.

17. Major thankies for the article post.Really thank you!

18. A big thank you for your article.Really looking forward to read more. Much obliged.

19. This is one awesome article.Really thank you! Keep writing.

20. A big thank you for your blog article.Really looking forward to read more.

21. I absolutely love your blog and find almost all of your post’s
to be what precisely I’m looking for. can you offer guest writers to write content in your case?
I wouldn’t mind writing a post or elaborating on most of the subjects you write related to here.
Again, awesome web site!

22. Muchos Gracias for your article post.Thanks Again. Want more.

23. After I initially left a comment I appear to have clicked on the -Notify me when new comments are added- checkbox and from now on whenever a comment is added I get 4 emails with the same comment.
Perhaps there is an easy method you can remove me from that
service? Thanks a lot!

24. Thanks again for the post. Really Great.

25. I do not even know how I ended up here, but I thought this post was great.
I don’t know who you are but definitely you are going to a famous
blogger if you aren’t already 😉 Cheers!

26. I truly appreciate this post. I have been looking everywhere for this

27. Great, thanks for sharing this blog post.Much thanks again. Cool.

28. Great article.Really thank you! Will read on…

29. Appreciate you sharing, great blog.Really looking forward to read more. Will read on…

30. Very neat blog post.Really looking forward to read more. Want more.

31. Major thanks for the blog.Thanks Again. Really Cool.

32. Looking forward to reading more. Great blog article.Really looking forward to read more. Fantastic.

33. What’s up to all, how is the whole thing, I think every one is getting more from this site,
and your views are nice in support of new visitors.

34. I pay a visit each day some web pages and information sites to read
content, but this webpage presents quality based writing.

keep it up!

36. Enjoyed every bit of your article.Thanks Again. Really Cool.

37. Thanks a lot for the article. Really Cool.

38. I really like and appreciate your blog.Thanks Again. Really Great.

39. Thanks so much for the article post.Really thank you! Keep writing.

40. Great, thanks for sharing this blog.Really looking forward to read more. Great.

41. Say, you got a nice blog article. Will read on…

42. This is one awesome blog article. Awesome.

43. Thank you for your blog article.Really thank you! Really Cool.

44. This is one awesome blog article.Much thanks again. Really Great.

45. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my
I’ve been looking for a plug-in like this for quite some time and was hoping maybe
you would have some experience with something
like this. Please let me know if you run into anything.

46. Major thanks for the blog post.Much thanks again. Want more.

47. First of all I want to say excellent blog! I had a quick question that I’d
like to ask if you don’t mind. I was curious to find out how you
center yourself and clear your thoughts before writing.
I have had trouble clearing my thoughts in getting my thoughts out.
I do enjoy writing however it just seems like the first
10 to 15 minutes are usually wasted just trying
to figure out how to begin. Any suggestions or tips?
Appreciate it!

48. Thanks a lot for the blog post.Thanks Again. Cool.

49. Say, you got a nice article.Really looking forward to read more. Fantastic.

50. Hey, thanks for the post.Thanks Again. Cool.

51. wow, awesome blog article.Much thanks again. Cool.

52. After going over a few of the blog articles on your
web page, I really like your technique of writing a blog.
I book marked it to my bookmark website list and will be checking
back soon. Please check out my website as well and let me know what you think.

53. Thanks for sharing, this is a fantastic blog article.Thanks Again. Awesome.

55. I think this is a real great blog article. Really Great.

56. Thanks-a-mundo for the blog article.Much thanks again. Cool.

57. A round of applause for your blog.Much thanks again. Cool.

58. Why visitors still make use of to read news papers when in this technological world
all is available on net?

59. Enjoyed every bit of your article.Thanks Again. Much obliged.

60. A round of applause for your article. Great.

61. I really like your writing style, wonderful info, appreciate it for posting :D. “If a cluttered desk is the sign of a cluttered mind, what is the significance of a clean desk” by Laurence J. Peter.

62. Major thanks for the blog.Really thank you! Great.

63. Looking forward to reading more. Great article post.Thanks Again. Great.

65. I am so grateful for your blog article. Fantastic.

66. Very informative blog article. Want more.

67. Major thanks for the blog.Really thank you!

68. I value the blog.Much thanks again. Fantastic.

69. Wow, great blog.Really thank you! Fantastic.

70. I appreciate you sharing this blog.Really looking forward to read more. Really Cool.

71. Very informative article.Really looking forward to read more. Keep writing.

72. Im thankful for the article. Really Cool.

73. Im grateful for the blog article.Thanks Again. Really Cool.

74. Hey, thanks for the article.Really looking forward to read more. Will read on…

75. Awesome blog post.Thanks Again. Much obliged.

76. Very neat blog.Really thank you! Cool.

77. Fantastic blog article.Much thanks again. Want more.

78. Thanks-a-mundo for the article post.Thanks Again. Fantastic.

79. Wow, great post.Really looking forward to read more. Really Great.

80. Thank you ever so for you blog post. Want more.

81. Im grateful for the blog.Really thank you! Fantastic.

82. I really enjoy the article post.Really thank you! Fantastic.

83. I truly appreciate this blog article.Really thank you! Much obliged.

84. Awesome article.Really thank you! Really Cool.

85. Really appreciate you sharing this blog.

86. I really like your blog.. very nice colors & theme. Did you make
this website yourself or did you hire someone to do it
for you? Plz reply as I’m looking to design my
own blog and would like to find out where u got this
from. cheers

87. I am so grateful for your article.Really looking forward to read more. Really Great.

88. Muchos Gracias for your article.Thanks Again. Keep writing.

89. Wow that was strange. I just wrote an incredibly long comment but after I clicked
submit my comment didn’t appear. Grrrr… well I’m not writing all that over again. Regardless,
just wanted to say wonderful blog!

90. Very nice article, totally what I wanted to find.

91. Hey would you mind stating which blog platform you’re using?
but I’m having a difficult time choosing between BlogEngine/Wordpress/B2evolution and
Drupal. The reason I ask is because your layout seems different then most blogs and I’m looking for something unique.

92. Enjoyed every bit of your blog post. Cool.

93. Really informative blog.Really looking forward to read more. Want more.

94. Wow, great blog article.Really thank you! Keep writing.

95. Im thankful for the blog article.Thanks Again. Awesome.

96. Hi to all, since I am really keen of reading
this website’s post to be updated on a regular basis.

It consists of good data.

97. I value the post.

98. Appreciate you sharing, great blog.Really looking forward to read more. Fantastic.

99. Enjoyed every bit of your article post.Really looking forward to read more. Much obliged.

100. Major thanks for the article post.Really looking forward to read more. Fantastic.

101. Muchos Gracias for your article.Really looking forward to read more. Cool.

102. Really appreciate you sharing this blog.Much thanks again. Keep writing.

103. Im obliged for the article post.Really looking forward to read more. Keep writing.

104. Say, you got a nice article post.Thanks Again. Cool.

105. My partner and I stumbled over here different web address and thought I might check things out.
I like what I see so i am just following you. Look forward
to looking over your web page for a second time.

106. I really like and appreciate your blog.Much thanks again. Much obliged.

107. This is one awesome article.Really looking forward to read more.

108. Outstanding quest there. What happened after? Thanks!

109. Muchos Gracias for your article post.Really looking forward to read more. Keep writing.

110. Thank you for another great article. Where else could anybody get that type of info in such a perfect approach of writing? I’ve a presentation next week, and I am on the look for such information.

111. Really appreciate you sharing this blog article.Thanks Again. Want more.

112. I think this is a real great article post.Much thanks again. Will read on…

113. Thanks for the article post.Really looking forward to read more. Keep writing.

114. Fantastic article post.Really thank you! Great.

115. Thanks for sharing, this is a fantastic article. Awesome.

116. Great blog article.Really looking forward to read more. Great.

117. Thank you a lot for sharing this with all people you really know what you’re talking about!
We can have a link alternate contract among us

118. Im grateful for the article.Thanks Again. Keep writing.

119. These kind of post are always inspiring and I prefer to read quality content so I happy to find many good point here in the post

120. Thanks again for the article.Really thank you! Much obliged.

121. Great, thanks for sharing this post.Really thank you! Cool.

122. Great, thanks for sharing this blog.Really looking forward to read more. Much obliged.

123. I really enjoy the blog article.Really thank you! Want more.

124. This is one awesome blog article.Much thanks again. Really Great.

125. Great article.Really looking forward to read more. Much obliged.

126. I really enjoy the post.Really looking forward to read more. Will read on…

127. A big thank you for your blog.Really looking forward to read more. Really Cool.

128. Thanks so much for the article post.Really looking forward to read more. Great.

129. Greate pieces. Keep writing such kind of info on your page.
Im really impressed by your site.
Hi there, You have performed an excellent job. I’ll definitely digg it and in my
view recommend to my friends. I’m confident they’ll be benefited
from this website.

130. Im thankful for the blog article.Thanks Again. Will read on…

131. I value the blog article.Thanks Again. Will read on…

132. I think this is a real great post.Much thanks again. Want more.

133. Awesome blog post.Much thanks again. Really Cool.

134. Very good blog article.Much thanks again. Keep writing.

135. Great, thanks for sharing this blog article.Really looking forward to read more. Really Cool.

136. Really appreciate you sharing this blog.Really looking forward to read more. Cool.

137. I really liked your blog post.Really thank you! Great.

138. Hey, thanks for the article.Really looking forward to read more. Awesome.

139. I think this is a real great blog post.Really thank you! Keep writing.

140. Hey there! I just wanted to ask if you ever have any trouble with hackers?

My last blog (wordpress) was hacked and I ended
up losing several weeks of hard work due to no back up. Do you have any methods to stop hackers?

141. Thanks a lot for the blog.Really thank you! Awesome.

142. Thanks a lot for the post.Thanks Again. Awesome.

143. Very informative article post.Really looking forward to read more. Really Cool.

144. I think this is a real great blog.Really looking forward to read more. Cool.

145. Very neat blog post.Really looking forward to read more. Will read on…

146. Thanks-a-mundo for the blog.Much thanks again. Want more.

147. A round of applause for your blog.Really looking forward to read more. Awesome.

148. just beneath, are many absolutely not related web pages to ours, even so, they’re surely worth going over

149. I value the blog article.Thanks Again.

150. Pretty nice post. I just stumbled upon your weblog and wanted to say that I have reallyenjoyed surfing around your blog posts. In any caseI will be subscribing to your rss feed and Ihope you write again very soon!

151. pay per click programs are really great, i could earn some decent cash from it-

152. [url=https://amoxicillin24.com/]amoxicillin 250mg[/url] [url=https://levitra100.com/]levitra generic[/url] [url=https://suhagra911.com/]suhagra 100[/url] [url=https://xenical365.com/]xenical otc australia[/url] [url=https://dapoxetine911.com/]dapoxetine buy online india[/url] [url=https://sildenafil48.com/]sildenafil prescription[/url] [url=https://tretinoin2019.com/]tretinoin prescription[/url] [url=https://metformin100.com/]metformin generic[/url] [url=https://synthroid100.com/]synthroid 100[/url] [url=https://azithromycin24.com/]azithromycin 250mg[/url]

153. I really liked your post.Really looking forward to read more. Really Cool.

154. I really enjoy the blog post.Thanks Again. Want more.

155. wow, awesome post.Really thank you! Great.

156. I really enjoy the article.Really thank you! Awesome.

157. I am so grateful for your blog post.Really thank you! Awesome.

158. A big thank you for your article post.Thanks Again. Awesome.

159. Thanks for the article post. Really Cool.

160. Really enjoyed this blog.Much thanks again. Really Great.

161. Wow, great article.Really looking forward to read more. Cool.

162. Very neat article.Really looking forward to read more. Really Cool.

163. Wow, great blog post.Really looking forward to read more. Want more.

164. Thank you ever so for you blog article.Really thank you! Want more.

165. Hi there, yeah this post is really good and I have learned lot of things from it concerning blogging. thanks.|

166. It’s impressive that you are getting thoughts from this article as well as from our dialogue made here.|

167. I know this if off topic but I’m looking into starting my own blog and was curious what all is required to get set up? I’m assuming having a blog like yours would cost a pretty penny? I’m not very internet savvy so I’m not 100 positive. Any suggestions or advice would be greatly appreciated. Thanks|

168. whoah this blog is fantastic i like reading your posts. Stay up the good work! You recognize, lots of people are looking around for this info, you could help them greatly. |

169. Wow, this paragraph is fastidious, my younger sister is analyzing these things, so I am going to let know her.|

170. First off I want to say wonderful blog! I had a quick question in which I’d like to ask if you don’t mind. I was curious to find out how you center yourself and clear your head before writing. I’ve had a hard time clearing my mind in getting my thoughts out. I do take pleasure in writing but it just seems like the first 10 to 15 minutes tend to be wasted just trying to figure out how to begin. Any suggestions or hints? Cheers!|

171. Im grateful for the blog post.Really looking forward to read more. Want more.

172. We’re a group of volunteers and opening a new scheme in our community. Your website provided us with valuable info to work on. You’ve done an impressive job and our whole community will be thankful to you.|

173. I really enjoy the blog post. Keep writing.

174. Awesome blog article.Much thanks again. Want more.

175. You’ve made some really good points there. I checked on the net for additional information about the issue and found most individuals will go along with your views on this web site.|

176. I loved your blog.Really thank you! Awesome.

177. No matter if some one searches for his essential thing, so he/she needs to be available that in detail, thus that thing is maintained over here.|

178. I really enjoy the blog article.Really looking forward to read more. Want more.

179. What’s up, the whole thing is going fine here and ofcourse every one is sharing information, that’s in fact good, keep up writing.|

180. Ridiculous story there. What happened after? Take care!|

181. Excellent beat ! I would like to apprentice while you amend your web site, how can i subscribe for a blog site? The account helped me a acceptable deal. I had been a little bit acquainted of this your broadcast offered bright clear idea

182. Keep on working, great job!|

183. Looking forward to reading more. Great article.Much thanks again. Really Great.

184. I really like it when individuals get together and share views. Great site, keep it up!|

185. Thanks a lot for the article.Really thank you! Want more.

186. A big thank you for your article post.Much thanks again. Want more.

187. Im obliged for the blog article. Cool.

188. I could not resist commenting. Very well written!|

189. Thank you ever so for you blog article.Thanks Again. Will read on…

190. Thanks for sharing, this is a fantastic blog.Much thanks again. Really Great.

191. What’s up, its fastidious paragraph about media print, we all understand media is a impressive source of data.|

192. I want to to thank you for this very good read!! I certainly loved every bit of it. I’ve got you book-marked to check out new things you post…|

193. Thanks for sharing, this is a fantastic blog article.Really looking forward to read more. Will read on…

194. Interesting blog! Is your theme custom made or did you download it from somewhere? A theme like yours with a few simple tweeks would really make my blog stand out. Please let me know where you got your theme. Thanks|

195. This is the perfect site for anyone who wishes to understand this topic. You realize so much its almost hard to argue with you (not that I really would want to…HaHa). You certainly put a new spin on a topic which has been discussed for many years. Great stuff, just great!|

196. Hi there, You have performed a great job. I’ll certainly digg it and in my opinion suggest to my friends. I am confident they will be benefited from this site.|