题目传送门:http://poj.org/problem?id=2975
最开始一直在想,怎么优化DP
然而后来发现,这TM只求有效的第一步有几种走法QAQ
#include<iostream> #include<cstdio> using namespace std; const int MAXN = 1000+9; int arr[MAXN],n,sta,vout; int main(){ while (cin>>n && n) { sta = vout = 0; for (int i=1;i<=n;i++) cin>>arr[i], sta ^= arr[i]; if (sta) for (int i=1;i<=n;i++) { sta ^= arr[i]; if (sta < arr[i]) vout++; sta ^= arr[i]; } printf("%d\n",vout); } return 0; }
Yeah bookmaking this wasn’t a high risk conclusion outstanding post! .
Wow! Thank you! I constantly wanted to write on my website something like that. Can I take a fragment of your post to my blog?
321101 425689I like this internet site so considerably, saved to favorites . 470314
271104 907269Hello! I just wish to give an enormous thumbs up for the very good details you may have proper here on this post. I can be coming once again to your weblog for much more soon. 362111
862561 967850The very best and clear News is quite a lot imptortant to us. 487169
3225 77114Just what I was looking for, appreciate it for posting . 167594
734697 554229Thankyou for all your efforts which you have put in this. quite interesting info . 717454
90318 682937Youre so cool! I dont suppose Ive read anything like this before. So nice to search out any individual with some original thoughts on this subject. realy thank you for starting this up. this website is one thing thats wanted on the web, somebody with a bit of originality. helpful job for bringing something new towards the internet! 862838
334760 759619It is difficult to get knowledgeable folks on this topic, but the truth is be understood as what happens you are preaching about! Thanks 914239
518276 343299Having been basically looking at valuable blog articles with regard to the project research when My partner and i happened to stumble on yours. Thanks for this practical info! 26929
484689 537670The best and clear News is extremely considerably imptortant to us. 637256
780189 573403Thank you for your quite good details and feedback from you. car dealers in san jose 343110
792231 588538I enjoyed reading this a lot I really hope to read more of your posts inside the future, so Ive bookmarked your blog. But I couldnt just bookmark it, oh no.. When I see quality websites like this one, I like to share it with other people So Ive developed a backlink to your web site (from 930924
753529 802717I always was interested in this subject and still am, thankyou for posting . 151299