相关链接
题目传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=2456
神犇题解:https://oi.men.ci/bzoj-2456/
解题报告
考虑将不同的数抵消掉
因为题目所求的数多于一半
所以剩下的就一定是答案啦!
Code
#include<cstdio> #define LL long long int main() { int n,tot=0; LL num,cur; for (scanf("%d",&n);n;n--) { scanf("%lld",&cur); if (num != cur) { if (tot) tot--; else tot = 1, num = cur; } else tot++; } printf("%lld\n",num); return 0; }
—– UPD 2016.12.29 —–
这题似乎还有一个做法:
考虑将原数分解成二进制
统计每一位二进制上0多还是1多
酱紫的话,最后在在二进制下逐位确定答案就好啦!
Im thankful for the blog.Much thanks again. Really Cool.
Hey, thanks for the post.Really looking forward to read more. Great.
wow, awesome article.Really thank you! Much obliged.
Hey, thanks for the blog.Really looking forward to read more. Much obliged.
Im obliged for the blog.
I really liked your blog post.Really looking forward to read more. Fantastic.
A round of applause for your blog article.Much thanks again. Want more.
A round of applause for your blog article. Want more.
Thanks a lot for the blog post.Much thanks again. Great.
Im grateful for the blog article.Much thanks again. Will read on…
Thanks a lot for the article.Thanks Again. Keep writing.
Awesome blog article.Really looking forward to read more. Awesome.
Hey, thanks for the blog post.Really thank you! Fantastic.
I loved your post.Thanks Again. Keep writing.
Major thanks for the article post.Thanks Again. Want more.
Thank you for your article post.Much thanks again. Great.
A round of applause for your article post.Really thank you! Really Cool.
Appreciate you sharing, great article.Really looking forward to read more. Want more.
When some one searches for his necessary thing, thus he/she wants to be available that in detail, thus that thing is
maintained over here.
Hello, I enjoy reading through your post. I wanted to write a little comment to
support you.
Wow, great blog.Really thank you! Much obliged.
I really liked your blog.Thanks Again. Really Cool.
Hi there mates, good article and fastidious urging commented at this place, I
am actually enjoying by these.
Thanks again for the blog article.Really looking forward to read more.
Really appreciate you sharing this post. Will read on…
It’s very effortless to find out any topic on web as compared to textbooks, as I found this paragraph
at this web site.
A round of applause for your blog post.Really thank you! Fantastic.
Enjoyed every bit of your article post.Much thanks again. Really Cool.
Say, you got a nice article post.Really thank you! Want more.
I loved your article post. Really Great.
Howdy! I just would like to offer you a huge thumbs up for
the excellent info you’ve got right here on this post.
I am returning to your site for more soon.
Really informative article.Thanks Again. Cool.
Very good info. Lucky me I came across your site by accident (stumbleupon).
I’ve saved as a favorite for later!
This is one awesome blog.Really looking forward to read more. Will read on…
Thanks again for the article post.Really looking forward to read more. Much obliged.
Hey, thanks for the article post.Really looking forward to read more. Want more.
I really like and appreciate your article. Cool.
I really like and appreciate your blog post.Thanks Again. Much obliged.
Say, you got a nice article.Really thank you! Great.
Hey there! I realize this is sort of off-topic however I
needed to ask. Does operating a well-established
blog like yours require a massive amount work? I am completely new to operating a blog
but I do write in my journal everyday. I’d like to
start a blog so I can easily share my experience and thoughts
online. Please let me know if you have any recommendations or tips for brand new
aspiring bloggers. Thankyou!
Im obliged for the blog post.Really thank you! Great.
I am so grateful for your post.Thanks Again. Want more.
Im obliged for the article.Much thanks again. Cool.
Thank you for your blog article.Really looking forward to read more. Awesome.
Magnificent goods from you, man. I have understand your stuff
previous to and you’re just extremely great. I really
like what you have acquired here, certainly like what you’re stating and the way in which you say it.
You make it entertaining and you still take care of
to keep it smart. I cant wait to read far more from you.
This is really a tremendous website.
Thank you ever so for you post.Much thanks again. Much obliged.
A big thank you for your article.Really thank you! Will read on…
I’m not that much of a online reader to be honest
but your sites really nice, keep it up! I’ll go ahead and
bookmark your site to come back later on. Cheers
Muchos Gracias for your post.Much thanks again. Much obliged.
Fantastic article. Fantastic.
I couldn’t resist commenting. Well written!
I loved your blog article.Really thank you! Cool.
I’m amazed, I have to admit. Rarely do I come across a blog that’s both equally educative and
interesting, and let me tell you, you’ve hit the nail on the
head. The problem is something not enough men and women are speaking
intelligently about. I’m very happy I found this during my search
for something regarding this.
Muchos Gracias for your article post. Will read on…
Hi! Would you mind if I share your blog with my myspace group?
There’s a lot of folks that I think would really appreciate your content.
Please let me know. Thanks
Muchos Gracias for your blog. Cool.
Thanks-a-mundo for the post.Thanks Again. Much obliged.
Very neat blog post.Much thanks again. Keep writing.
Major thankies for the blog article.Much thanks again. Will read on…
Looking forward to reading more. Great blog.Really thank you!
Major thankies for the blog article.Much thanks again. Really Cool.
Just a smiling visitor here to share the love (:, btw outstanding style and design. “Justice is always violent to the party offending, for every man is innocent in his own eyes.” by Daniel Defoe.
Whats up are using WordPress for your site platform?
I’m new to the blog world but I’m trying to get started and set up my
own. Do you need any coding expertise to make your own blog?
Any help would be really appreciated!
I value the blog.Really thank you! Want more.
A round of applause for your article.Much thanks again. Fantastic.
Wow, amazing blog layout! How long have you been blogging for?
you made blogging look easy. The overall look of your site is wonderful, as well as the
content!
Really informative blog article.Really looking forward to read more. Fantastic.
Looking forward to reading more. Great post. Want more.
Hey, thanks for the blog post.Much thanks again. Want more.
I really liked your blog post.Thanks Again. Cool.
A round of applause for your article post.Really thank you! Cool.
I loved your article.Thanks Again. Awesome.
I value the blog.Much thanks again. Much obliged.
Major thanks for the blog.Much thanks again. Will read on…
Im thankful for the article post.Really looking forward to read more.
I appreciate you sharing this article.Much thanks again. Keep writing.
Fantastic post.Really thank you! Keep writing.
I really like and appreciate your blog post.Really looking forward to read more.
I really liked your article.
This is one awesome blog post.Really looking forward to read more. Keep writing.
It’s awesome designed for me to have a web site, which is good
for my know-how. thanks admin
Thanks so much for the post.Really thank you! Will read on…
What’s up, yeah this post is in fact fastidious
and I have learned lot of things from it on the topic of blogging.
thanks.
Hello, i believe that i saw you visited my web site so i got
here to go back the desire?.I’m trying to in finding issues to improve my web site!I suppose
its good enough to use a few of your concepts!!
I really liked your article post.
wow, awesome blog.Really looking forward to read more. Much obliged.
Thank you ever so for you blog article. Want more.
Piece of writing writing is also a excitement, if you know afterward you can write otherwise it is difficult to write.
A round of applause for your blog article. Awesome.
Thanks again for the article.Really thank you! Want more.
Great blog article.Really looking forward to read more. Much obliged.
Thanks for the blog article.Thanks Again. Great.
Im obliged for the blog article.Really thank you! Awesome.
Im obliged for the blog post.Really looking forward to read more. Awesome.
I think this is a real great article post.Really thank you! Fantastic.
Thanks so much for the post.Really thank you! Great.
Enjoyed every bit of your article.Really looking forward to read more. Want more.
Hey There. I found your blog using msn. This is a really well written article.
I will be sure to bookmark it and return to read more of your useful info.
Thanks for the post. I’ll certainly comeback.
Thanks for the blog article.Really looking forward to read more. Fantastic.
Im obliged for the post. Cool.
Thanks a lot for the post. Really Great.
wow, awesome blog article.Really thank you! Much obliged.
I cannot thank you enough for the blog.Thanks Again. Will read on…
Thanks-a-mundo for the post.Really looking forward to read more. Fantastic.
I truly appreciate this blog post.Thanks Again. Fantastic.
A round of applause for your blog post.Thanks Again. Much obliged.
Major thankies for the article post.Much thanks again. Really Great.
Enjoyed every bit of your post.Much thanks again. Keep writing.
Good response in return of this question with firm arguments and describing everything about
that.
Thanks so much for the article.Really thank you!
I really like and appreciate your post.Much thanks again. Will read on…
Looking forward to reading more. Great blog.Really looking forward to read more. Great.
Thanks for the article post.Really thank you! Really Great.
Very neat article. Want more.
I appreciate you sharing this article.Really thank you! Really Cool.
Major thanks for the blog post.Really thank you! Fantastic.
Im obliged for the post. Keep writing.
I value the article post.Thanks Again. Great.
Fantastic blog post.Really looking forward to read more. Fantastic.
A round of applause for your article post.Really looking forward to read more. Much obliged.
Really enjoyed this article post.Really looking forward to read more. Really Cool.
Say, you got a nice blog article.Really thank you! Really Cool.
Major thankies for the blog article.Thanks Again. Will read on…
Looking forward to reading more. Great blog. Will read on…
Awesome post.Thanks Again. Really Cool.
This is one awesome article.Much thanks again. Will read on…
Thank you for sharing your info. I truly appreciate your efforts and
I am waiting for your next post thank you once again.
This is one awesome article post. Great.
I really liked your blog post. Want more.
Great, thanks for sharing this article.Thanks Again. Will read on…
This is one awesome blog post.Really thank you! Fantastic.
Thank you ever so for you blog post.Really thank you! Great.
I truly appreciate this blog post.Really thank you! Will read on…
I really enjoy the article.Much thanks again. Really Great.
Enjoyed every bit of your blog post. Will read on…
I really liked your blog article.Much thanks again. Really Great.
Appreciate you sharing, great blog post.Really thank you! Fantastic.
Thanks for the post.Really thank you! Much obliged.
I really enjoy the blog article. Want more.
I am so grateful for your article post.Really thank you! Fantastic.
Major thankies for the blog post.Much thanks again. Fantastic.
I am so grateful for your blog post.Really looking forward to read more. Want more.
Muchos Gracias for your article post.Really looking forward to read more. Fantastic.
Im grateful for the blog article.Thanks Again. Will read on…
A big thank you for your article.Much thanks again. Fantastic.
Im grateful for the blog article.Really thank you! Awesome.
Looking forward to reading more. Great blog article.Really thank you! Fantastic.
Major thanks for the article.Really looking forward to read more. Fantastic.
Very informative blog article.Thanks Again. Cool.
I truly appreciate this blog.Thanks Again. Much obliged.
Muchos Gracias for your post.Thanks Again. Cool.
Thanks for any other informative blog. The place else may I am getting that kind of info written in such a perfect approach? I have a challenge that I’m simply now running on, and I’ve been at the look out for such info.
Say, you got a nice article.Really looking forward to read more. Will read on…
Im thankful for the post.Really thank you!
Im thankful for the blog post.Much thanks again. Much obliged.
Looking forward to reading more. Great article.Really looking forward to read more. Great.
Great, thanks for sharing this post. Much obliged.
I think this is a real great blog post. Want more.
A big thank you for your article.Thanks Again. Really Cool.
Very neat article. Really Great.
Im grateful for the post.Really looking forward to read more. Much obliged.
Very good blog article.Really looking forward to read more. Great.
Muchos Gracias for your article.Really looking forward to read more. Will read on…
I loved your blog.Really thank you! Want more.
Very good article.Really thank you! Keep writing.
I am so grateful for your blog post.Really looking forward to read more. Keep writing.
Thank you ever so for you article.Really looking forward to read more. Much obliged.
Looking forward to reading more. Great blog article.Really looking forward to read more. Keep writing.
Appreciate you sharing, great blog.Much thanks again. Will read on…
Im obliged for the blog post. Want more.
Thanks for the post.Much thanks again. Great.
Great, thanks for sharing this blog post.Much thanks again. Great.
Thanks for the blog post.Much thanks again. Cool.
Thanks for sharing, this is a fantastic article post. Want more.
Very neat article.Much thanks again. Want more.
Very good blog article.Really thank you! Want more.
I loved your blog article.Really looking forward to read more. Fantastic.
I am so grateful for your blog article.Really looking forward to read more. Keep writing.
I cannot thank you enough for the blog post.Thanks Again. Much obliged.
I cannot thank you enough for the article post.Really looking forward to read more. Want more.
I am so grateful for your post. Cool.
Thanks for sharing, this is a fantastic blog.Really thank you! Great.
Appreciate you sharing, great article.Much thanks again. Really Great.
I really liked your blog.Much thanks again. Awesome.
Great, thanks for sharing this post. Will read on…
I cannot thank you enough for the blog.Thanks Again.
Major thankies for the post.Much thanks again. Keep writing.
Major thankies for the post.Really looking forward to read more. Awesome.
Thank you ever so for you article post. Keep writing.
Thanks for the blog article.Really thank you! Want more.
Very good blog article.Much thanks again. Keep writing.
I am so grateful for your blog article. Really Cool.