题目传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1005
数据生成器:http://paste.ubuntu.com/23338303/
这题和BZOJ_1211几乎一毛一样
唯一的区别:这题要写高精 qwq
于是果断弃疗,扔一份不带高精的代码:
#include<bits/stdc++.h> #define LL long long using namespace std; const int N = 1000+9; const int MX = 1000; int C[N][N],res,n,emp; LL vout=1; inline int read(){ char c=getchar(); int ret=0,f=1; 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; } inline void prework(){ C[0][0] = C[1][1] = C[0][1] = 1; for (int j=1;j<=MX;j++) { C[0][j] = 1; for (int i=1;i<=j;i++) { C[i][j] = C[i][j-1] + C[i-1][j-1]; } } } int main(){ if ((n=read()) == 1) { if (!read()) puts("1"); else puts("1"); } else if (n == 2) { if (read() == 1 && read() == 1) puts("1"); else puts("0"); } else { prework(); emp = n - 2; for (int i=1,tmp;i<=n;i++) { if ((tmp=read()) == -1) { res++; } else { vout *= C[tmp-1][emp]; emp -= tmp - 1; } } if (emp < 0) puts("0"); else { for (int i=1;i<=emp;i++) { vout *= res; } cout<<vout; } } return 0; }
Wow, great post.Really thank you! Will read on…
Im grateful for the blog article.Really thank you! Great.
Thanks a lot for the blog post.Thanks Again. Want more.
I really like and appreciate your blog.Really thank you! Really Cool.
Major thanks for the blog post.Thanks Again. Great.
Muchos Gracias for your post. Really Great.
Looking forward to reading more. Great post.Really looking forward to read more. Want more.
wow, awesome article.Thanks Again. Keep writing.
Thanks for the blog post.Much thanks again. Fantastic.
Really enjoyed this post.Much thanks again. Will read on…
A big thank you for your post.Thanks Again. Cool.
I value the post. Really Great.
Im thankful for the post.Thanks Again. Awesome.
I really liked your blog article.Thanks Again. Really Cool.
Really informative blog.Really thank you! Really Cool.
Fantastic post.Really thank you! Awesome.
I am so grateful for your blog article.Really looking forward to read more. Really Great.
Enjoyed every bit of your article post.Really looking forward to read more. Great.
I pay a quick visit everyday a few blogs and blogs to
read posts, except this webpage provides feature based content.
I all the time emailed this webpage post page
to all my associates, as if like to read it then my
contacts will too.
Thanks for the blog. Keep writing.
Great article post.Much thanks again. Want more.
Heya i’m for the first time here. I came across this board and
I find It truly useful & it helped me out much.
I hope to give something back and aid others
like you helped me.
Enjoyed every bit of your post. Cool.
Really appreciate you sharing this blog.Really thank you! Awesome.
I really liked your post.Thanks Again. Great.
Very informative blog post.Really looking forward to read more. Keep writing.
Heya i am for the first time here. I found this board and I find It truly helpful & it helped me out a lot.
I am hoping to provide something back and help others like you aided me.
Very neat blog.Really thank you! Cool.
Im thankful for the article.Thanks Again. Awesome.
Thank you ever so for you blog.Really thank you! Really Great.
Very neat post.Much thanks again. Fantastic.
Im thankful for the blog post. Keep writing.
My developer is trying to convince me to move to .net from PHP.
I have always disliked the idea because of the costs.
But he’s tryiong none the less. I’ve been using Movable-type on various websites for about a year and am worried
about switching to another platform. I have heard fantastic things about
blogengine.net. Is there a way I can transfer all my wordpress posts into it?
Any help would be greatly appreciated!
I appreciate you sharing this article.Much thanks again. Keep writing.
A round of applause for your blog.Really looking forward to read more. Really Great.
Great blog.Thanks Again. Want more.
I really liked your blog article.Really looking forward to read more. Much obliged.
Today, I went to the beach front with my kids. I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She put the shell to her
ear and screamed. There was a hermit crab inside and it pinched her ear.
She never wants to go back! LoL I know this is totally off topic but I had to tell someone!
This is one awesome blog article.Really looking forward to read more. Really Great.
I really enjoy the post.Really looking forward to read more. Want more.
Great blog article.Much thanks again. Will read on…
Thanks again for the blog article. Great.
Hey, thanks for the post.Really thank you! Awesome.
Great article.Really thank you! Want more.
I know this web page provides quality depending content and additional material, is there
any other web site which gives such information in quality?
Hi there, I log on to your blogs regularly. Your writing style is witty, keep doing what you’re doing!
Simply desire to say your article is as astounding.
The clarity on your publish is simply cool and that
i could think you are a professional in this subject. Fine along with your permission allow me
to clutch your RSS feed to keep updated with drawing close post.
Thanks a million and please keep up the enjoyable work.
Wow, great blog article.Really looking forward to read more. Want more.
Im obliged for the post.Much thanks again. Much obliged.
Enjoyed every bit of your post.Thanks Again. Really Great.
Thanks a lot for the post. Much obliged.
I am so grateful for your article.Really thank you! Really Cool.
Im obliged for the post.
Thank you for your article.Really thank you! Keep writing.
I think this is a real great blog article.
Thanks for sharing, this is a fantastic blog.Really looking forward to read more. Fantastic.
Say, you got a nice blog post.Much thanks again. Really Great.
I value the blog post.Really thank you! Really Great.
Hello There. I found your blog using msn. That is an extremely smartly written article.
I will be sure to bookmark it and come back to read extra of your useful information.
Thanks for the post. I will certainly comeback.
Really appreciate you sharing this article.Much thanks again. Awesome.
Good day! I know this is kind of off topic but I was wondering which blog platform are you using for this site?
I’m getting sick and tired of WordPress because I’ve had issues with hackers and I’m
looking at options for another platform. I would be awesome if you could point me in the direction of a good platform.
Really appreciate you sharing this post.Really looking forward to read more. Really Great.
Hey, thanks for the article.Much thanks again. Much obliged.
Thank you for your article post.
Im thankful for the blog article. Great.
Thanks a lot for the article.Really thank you! Want more.
I cannot thank you enough for the post.Thanks Again. Really Great.
Really enjoyed this blog post. Really Great.
I really enjoy the post.Thanks Again. Will read on…
I appreciate you sharing this blog post. Really Great.
A big thank you for your blog article.Much thanks again. Really Cool.
Say, you got a nice blog post.Thanks Again. Much obliged.
I cannot thank you enough for the blog article.Really looking forward to read more. Really Cool.
Very neat article.Much thanks again. Will read on…
Thanks for sharing, this is a fantastic blog.Thanks Again. Great.
I really liked your blog post. Really Cool.
Im grateful for the blog.Really looking forward to read more. Awesome.
Heya just wanted to give you a brief heads up and let you know a few of the pictures aren’t loading properly.
I’m not sure why but I think its a linking issue. I’ve tried it in two different browsers and both show the same outcome.
“4 Songs for the Club” Is a 4 song CD-EP from B-Rock, For Dj’s and Bars and Dance clubs ..”Dance”Features Rockman doing the electronic Vocals on the Chorus. A hand clapping song to get people on tha dance floor ….”Mix It With Tha Water”. Features B-Rocks Team member Pif .. Tha song is an urban street tale with a great Trap Beat….”I Like It Straight” is Bound to be a New Club/ Bar Anthem for the DJ’s to get the crowds up on their feet and to get another drink..LOL…and “Crack Them bottle (Get Fucked Up)” well that’s a story that all party goers live on the weekend! … 4 Dance Hits 4 tha Club.. a great EP for any DJ to have
I really liked your blog article.Thanks Again. Awesome.
A big thank you for your article post.Really looking forward to read more. Really Great.
Enjoyed every bit of your article. Much obliged.
It’s awesome to go to see this website and reading the views
of all friends regarding this paragraph, while I
am also eager of getting knowledge.
I really like and appreciate your blog post.
Thank you ever so for you blog.Much thanks again. Really Great.
Im obliged for the article. Will read on…
I really enjoy the article post.Thanks Again. Much obliged.
Great, thanks for sharing this post.Thanks Again. Keep writing.
Major thanks for the blog.Much thanks again.
Thanks so much for the blog post.Really thank you! Much obliged.
Thank you ever so for you blog.
Really informative blog post.Thanks Again. Great.
Major thankies for the article. Cool.
Very informative blog post. Cool.
Very neat post.Much thanks again. Much obliged.
Fantastic blog article.Much thanks again. Really Great.
When some one searches for his essential thing, therefore
he/she wishes to be available that in detail, so that
thing is maintained over here.
WOW just what I was looking for. Came here by searching for sling
tv
I think this is a real great blog article. Cool.
Great, thanks for sharing this blog. Keep writing.
Major thankies for the blog post.Really looking forward to read more. Really Great.
Wow, great article post. Want more.
Wow, great article.Much thanks again. Keep writing.
Thank you ever so for you article. Keep writing.
Great blog post.Thanks Again. Really Great.
Major thanks for the article post. Cool.
Hello there! Do you know if they make any plugins to protect against hackers?
I’m kinda paranoid about losing everything I’ve
worked hard on. Any tips?
I loved your blog.Thanks Again. Cool.
Great blog.
Im obliged for the blog.Much thanks again. Awesome.
I cannot thank you enough for the blog post.Really thank you! Cool.
Major thanks for the article post. Awesome.
Thanks for the article post.Really thank you! Awesome.
Im obliged for the blog post.Really looking forward to read more. Really Cool.
Great, thanks for sharing this post.Really looking forward to read more. Great.
Thank you ever so for you blog post.Much thanks again. Fantastic.
I really liked your blog article.Thanks Again. Will read on…
Thanks so much for the article post.Really thank you! Fantastic.
Great, thanks for sharing this blog.Much thanks again. Great.
wow, awesome blog. Will read on…
I cannot thank you enough for the article. Much obliged.
wow, awesome blog post.Much thanks again.
I truly appreciate this article.Much thanks again. Awesome.
Hey would you mind sharing which blog platform you’re using?
I’m looking to start my own blog in the near future but I’m having a hard time making a decision between BlogEngine/Wordpress/B2evolution and
Drupal. The reason I ask is because your design and style seems different
then most blogs and I’m looking for something unique.
P.S Apologies for getting off-topic but I had to ask!
Thanks a lot for the blog article.Really thank you! Fantastic.
Enjoyed every bit of your post.Really thank you! Keep writing.
Great article. Great.
Very informative post.Thanks Again. Keep writing.
Major thanks for the blog post.Much thanks again. Much obliged.
This is one awesome blog.Really thank you! Great.
Very neat blog post.Much thanks again. Cool.
I really enjoy the post.
I really liked your blog. Cool.
This is one awesome post.Really thank you! Will read on…
Major thankies for the article.Thanks Again. Keep writing.
Really informative blog.Really looking forward to read more. Want more.
Wow, great blog post. Keep writing.
Thanks for sharing, this is a fantastic article post.Thanks Again. Will read on…
Im grateful for the article post.Really thank you! Fantastic.
A round of applause for your article post. Great.
Say, you got a nice article.Thanks Again. Really Great.
Im obliged for the blog.Much thanks again. Great.
Having read this I believed it was very enlightening.
I appreciate you taking the time and effort to put this
content together. I once again find myself spending a lot of time both reading and leaving comments.
But so what, it was still worth it!
Appreciate you sharing, great article post. Want more.
A big thank you for your article post.Really thank you! Cool.
This is one awesome article.Much thanks again. Really Cool.
Very good blog.Really looking forward to read more. Want more.
Looking forward to reading more. Great blog.Much thanks again. Really Great.
I appreciate you sharing this blog.Thanks Again. Want more.
Thanks-a-mundo for the blog.Much thanks again. Fantastic.
Hey there, I think your website might be having browser
compatibility issues. When I look at your blog in Firefox, it looks fine but when opening
in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads
up! Other then that, fantastic blog!
Wonderful blog! I found it while browsing on Yahoo News. Do you have any suggestions on how to get listed in Yahoo News? I’ve been trying for a while but I never seem to get there! Appreciate it
Major thankies for the blog.Really thank you! Keep writing.
I really liked your post.Much thanks again. Will read on…
Do you have a spam issue on this site; I also am a blogger, and I was wondering your situation; we have created some nice
procedures and we are looking to swap strategies with others, why not shoot me an e-mail if interested.
Hey, thanks for the post.Much thanks again. Cool.
I value the article.Really looking forward to read more. Will read on…
Really enjoyed this article.Much thanks again. Keep writing.
Thanks-a-mundo for the blog post.Much thanks again. Great.
Say, you got a nice blog. Will read on…
Im obliged for the post. Really Great.
Great post.Really looking forward to read more. Really Cool.
Thank you for your post.Much thanks again.
This is one awesome blog. Really Cool.
Great, thanks for sharing this blog.Much thanks again. Really Great.
Major thanks for the blog post.Really thank you! Great.
I appreciate you sharing this post.Much thanks again. Keep writing.
Major thankies for the blog post. Great.
This is one awesome article.Really looking forward to read more. Will read on…
A round of applause for your blog article.Really thank you! Want more.
Thanks-a-mundo for the article post. Much obliged.
I appreciate you sharing this post.Really thank you! Really Great.
Thanks a lot for the post.Really thank you! Cool.
Thanks for the article post.Much thanks again. Cool.
wow, awesome blog post.Much thanks again. Fantastic.
Very good post.Thanks Again. Keep writing.
A big thank you for your article. Awesome.
I cannot thank you enough for the blog post.Much thanks again. Fantastic.
Thank you for your blog article.Really thank you! Cool.
Muchos Gracias for your blog article.Thanks Again.
I think this is a real great article post.Really looking forward to read more. Want more.
Really informative article post.Really thank you! Really Great.
Enjoyed every bit of your blog article.Really looking forward to read more. Really Cool.
Thanks for sharing, this is a fantastic article post. Keep writing.
Thanks again for the blog article.Really thank you! Really Great.
I cannot thank you enough for the post.Really looking forward to read more. Really Cool.
Say, you got a nice blog article.Thanks Again. Really Great.
Thanks so much for the blog post.Really looking forward to read more. Keep writing.
I value the article post.Much thanks again. Will read on…
Im grateful for the blog.Really thank you! Really Great.
I really enjoy the article.Really looking forward to read more.
Im grateful for the blog post.Really thank you!
I think this is a real great blog article. Really Great.
Im thankful for the article post.Really thank you! Great.