参考例题:http://poj.org/problem?id=3348
备注:可以处理重点,坐标值可以是整数和小数
#include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #define LL long long using namespace std; const int N = 100000; const double EPS = 1e-8; int n,cnt; struct Point{ double x,y; inline Point() {} inline Point(double a, double b):x(a),y(b) {} inline Point operator + (const Point &A) {return Point(x+A.x, y+A.y);} inline Point operator - (const Point &A) {return Point(x-A.x, y-A.y);} inline Point operator / (double A) {return Point(x/A, y/A);} inline Point operator * (double A) {return Point(x*A, y*A);} inline double operator * (const Point &A) {return x*A.x + y*A.y;} inline double operator ^ (const Point &A) {return x*A.y - A.x*y;} inline bool operator < (const Point &B) const {return x < B.x - EPS || (fabs(x-B.x) < EPS && y < B.y - EPS);} inline bool operator == (const Point &B) const {return fabs(x - B.x) + fabs(y - B.y) < EPS;} }p[N],cvx[N]; inline int read() { 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; } inline void ConvexHull(int tot, Point *a, int &sz, Point *ret) { if (!tot) {sz = 0; return;} sort(a+1, a+1+tot); ret[sz=1] = a[1]; tot = unique(a+1, a+1+tot) - a - 1; for (int i=2;i<=tot;i++) { while (sz > 1 && ((ret[sz] - ret[sz-1]) ^ (a[i] - ret[sz])) < EPS) sz--; ret[++sz] = a[i]; } for (int i=tot-1,mn=sz;i>0;i--) { while (sz > mn && ((ret[sz] - ret[sz-1]) ^ (a[i] - ret[sz])) < EPS) sz--; ret[++sz] = a[i]; } sz -= sz > 2; } int main() { n = read(); for (int i=1;i<=n;i++) p[i].x = read(), p[i].y = read(); ConvexHull(n, p, cnt, cvx); double vout = 0; for (int i=2;i<cnt;i++) vout += (cvx[i] - cvx[1]) ^ (cvx[i+1] - cvx[1]) / 2; printf("%d\n",(int)(vout/50)); return 0; }
Excellent way of explaining, and nice paragraph to take information on the topic
of my presentation subject matter, which i am going to convey in academy.
Hey there! Do you use Twitter? I’d like to follow you if that
would be okay. I’m absolutely enjoying your blog and look forward to new updates.
It’s not my first time to pay a visit this site, i am
browsing this website dailly and obtain fastidious information from here everyday.
Spot on with this write-up, I truly believe this site
needs a lot more attention. I’ll probably be back again to read
through more, thanks for the info!
Wow, wonderful blog structure! How long have you ever been blogging for?
you make blogging look easy. The entire look of your website is fantastic, as neatly as the content!
I really like reading a post that can make men and women think.
Also, many thanks for allowing me to comment!
Asking questions are actually pleasant thing if you are not understanding
something fully, however this article offers pleasant understanding yet.
Good day! This post could not be written any better!
Reading this post reminds me of my good old room mate! He always kept chatting about this.
I will forward this article to him. Fairly certain he will have a
good read. Many thanks for sharing!
I have been surfing online greater than 3 hours as of late, yet I by no
means found any interesting article like yours.
It’s lovely value sufficient for me. In my opinion, if all site owners and bloggers made excellent content as you probably did,
the web shall be much more useful than ever before.
Keep on writing, great job!
We are a group of volunteers and opening a new scheme in our community.
Your web site provided us with valuable information to work on. You have done an impressive job and our whole community will
be grateful to you.
Everything is very open with a precise explanation of the challenges.
It was really informative. Your site is very helpful.
Thanks for sharing!
What a information of un-ambiguity and preserveness of precious experience about unexpected feelings.
Normally I don’t learn post on blogs, however I wish to say that this write-up very compelled me to try and do it!
Your writing taste has been amazed me. Thanks, quite nice post.
When someone writes an piece of writing he/she keeps the image of a user in his/her
mind that how a user can understand it. Thus that’s why this piece
of writing is great. Thanks!
Woah! I’m really enjoying the template/theme of this website.
It’s simple, yet effective. A lot of times it’s challenging to get that “perfect balance” between superb usability and
visual appearance. I must say you have done a superb job with this.
Also, the blog loads super quick for me on Internet explorer.
Outstanding Blog!
If some one wishes expert view about blogging then i propose
him/her to pay a visit this weblog, Keep up the pleasant job.
I absolutely love your site.. Very nice colors & theme. Did you create this amazing site yourself?
Please reply back as I’m looking to create my own website and
would like to learn where you got this from or just what the theme is named.
Cheers!
I am actually grateful to the holder of this web site who has shared this enormous paragraph at at this place.
This piece of writing will help the internet visitors for creating
new web site or even a blog from start to end.
If some one desires expert view on the topic of blogging afterward i advise him/her to visit this website,
Keep up the nice work.
Hey I am so thrilled I found your site, I really found
you by error, while I was browsing on Digg for something
else, Nonetheless I am here now and would just like
to say kudos for a tremendous post and a all round entertaining blog (I
also love the theme/design), I don’t have time to read it all
at the moment but I have saved it and also included your RSS feeds, so when I have time I will be
back to read a lot more, Please do keep up the
awesome job.
Heya i am for the primary time here. I came across this board and I in finding It really useful & it helped me out much.
I am hoping to give one thing back and help others such as you helped me.
I think this is among the most significant information for me.
And i’m glad reading your article. But want to remark
on some general things, The website style is ideal,
the articles is really excellent : D. Good job, cheers
What’s up, this weekend is pleasant designed for me, since this point in time i am
reading this fantastic educational post here at my residence.
Hello, just wanted to tell you, I loved this post. It
was practical. Keep on posting!
I’m gone to say to my little brother, that he should also pay a visit this blog on regular basis to get updated from
newest reports. pof natalielise
We’re a gaggle of volunteers and opening a new scheme in our community.
Your website provided us with helpful info to work on.
You’ve performed a formidable task and our entire group will likely
be thankful to you.
I know this website offers quality based articles or reviews and extra data, is
there any other web page which presents these stuff in quality?
Thanks for finally talking about >【模板库】二维凸包 – Qizy’s Database <Liked it!
Hello, Neat post. There is a problem along with your web site in web explorer, might check this? IE nonetheless is the marketplace leader and a big component of other people will miss your excellent writing because of this problem.
Excellent article. I will be facing many of these issues as well..
Hey there! I’ve been following your blog for a long time
now and finally got the bravery to go ahead and give
you a shout out from Kingwood Tx! Just wanted to say keep up the fantastic work!
pof natalielise
We stumbled over here by a different web page and thought I may as well check things out. I like what I see so now i’m following you. Look forward to going over your web page for a second time.
You should be a part of a contest for one of the greatest websites on the web. I am going to highly recommend this web site!
I’m impressed, I have to admit. Seldom do I come across a blog that’s equally educative and amusing, and without a doubt, you have hit the nail on the head. The problem is something not enough folks are speaking intelligently about. I’m very happy that I came across this in my hunt for something relating to this.
What’s up i am kavin, its my first occasion to commenting anywhere, when i read this post i thought i could also create comment due to this sensible paragraph.
Your mode of describing all in this article is genuinely pleasant, every one can effortlessly be aware of it, Thanks a lot.
Hi there, I enjoy reading through your article post. I like to write a little comment to support you.
Fascinating blog! Is your theme custom made or did you download it from
somewhere? A design like yours with a few simple tweeks would really make my blog shine.
Please let me know where you got your theme. Kudos
Valuable info. Lucky me I discovered your web site unintentionally, and I’m shocked why this coincidence didn’t came about
in advance! I bookmarked it.
WOW just what I was looking for. Came here by searching for plenty of fish dating site
Thank you for the good writeup. It in fact used to be a enjoyment account it.
Glance advanced to more delivered agreeable from you! By the way, how could we be in contact?
Excellent blog! Do you have any tips and hints for aspiring writers?
I’m hoping to start my own blog soon but I’m a little lost on everything.
Would you suggest starting with a free platform like WordPress
or go for a paid option? There are so many choices out
there that I’m totally confused .. Any recommendations?
Thanks!
Thanks in support of sharing such a pleasant thinking, paragraph is nice, thats why i
have read it completely
Hi there to every single one, it’s really a fastidious for me to
pay a quick visit this site, it consists of important Information.
Good post. I learn something new and challenging on blogs I stumbleupon everyday.
It’s always exciting to read articles from other authors and use something from their web sites.
Its like you read my mind! You appear to know a lot about this, like you wrote the book in it
or something. I think that you could do with some pics to drive the message home
a bit, but other than that, this is magnificent blog.
A fantastic read. I will certainly be back.
Thank you for the auspicious writeup. It in fact was a amusement account
it. Look advanced to far added agreeable from you! However, how could we communicate?
I have fun with, cause I found exactly what I used to be taking
a look for. You’ve ended my four day lengthy hunt! God Bless
you man. Have a nice day. Bye
Hey 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 suggestions?
Hi there to all, how is all, I think every
one is getting more from this website, and your views are
fastidious in support of new people.
Heya i am for the primary time here. I found this
board and I to find It really helpful & it helped me out
a lot. I hope to offer one thing again and aid others such as
you helped me.
Pretty nice post. I simply stumbled upon your weblog and
wanted to mention that I have truly loved browsing your blog
posts. After all I’ll be subscribing in your feed and I hope you write
again soon!
I’m extremely impressed with your writing skills as well
as with the layout on your weblog. Is this a paid theme or did you customize it
yourself? Either way keep up the nice quality writing, it is rare to see a
great blog like this one nowadays.
Hi there, the whole thing is going sound here and
ofcourse every one is sharing information, that’s truly fine, keep up writing.
We’re a group of volunteers and opening a new scheme in our community.
Your web site offered us with valuable information to work on. You’ve done a formidable
activity and our entire group will likely be grateful to
you.
I am actually delighted to glance at this web site posts which
contains lots of useful information, thanks for providing these information.
Great information. Lucky me I found your blog by chance (stumbleupon).
I have bookmarked it for later!
Thanks for ones marvelous posting! I quite enjoyed reading it, you happen to be a great author.I
will be sure to bookmark your blog and will eventually come
back in the foreseeable future. I want to encourage you
to definitely continue your great work, have a nice
holiday weekend!
This blog was… how do I say it? Relevant!! Finally
I have found something that helped me. Thanks!
Right now it seems like BlogEngine is the preferred blogging
platform available right now. (from what I’ve read) Is that what you’re
using on your blog?
Great blog right here! Additionally your website quite a bit up
fast! What host are you the usage of? Can I am getting your affiliate hyperlink on your host?
I want my web site loaded up as quickly as yours lol
Have you ever thought about including a little bit
more than just your articles? I mean, what you say is valuable and everything.
Nevertheless imagine if you added some great graphics
or video clips to give your posts more, “pop”! Your content is
excellent but with images and videos, this blog
could definitely be one of the very best in its niche.
Awesome blog!
I always emailed this webpage post page to all my friends,
because if like to read it afterward my contacts will too.
I think that what you posted made a ton of sense. However,
what about this? what if you added a little information? I
am not saying your information is not solid,
but what if you added something that grabbed people’s attention? I mean 【模板库】二维凸包
– Qizy's Database is a little boring.
You ought to look at Yahoo’s front page and see how they write
post titles to get viewers interested. You might add a related video
or a related pic or two to grab people excited about what
you’ve written. Just my opinion, it might make your posts a little bit more interesting.
I have been exploring for a bit for any high-quality articles or
blog posts on this sort of area . Exploring in Yahoo I at last stumbled upon this website.
Reading this info So i’m satisfied to express that I have an incredibly
just right uncanny feeling I found out just what I needed.
I most no doubt will make sure to don?t overlook this site and provides it a look regularly.
I seriously love your site.. Very nice colors & theme.
Did you develop this site yourself? Please reply back as I’m wanting
to create my own site and want to know where you got this from or exactly what the theme is called.
Thanks!
Valuable information. Fortunate me I discovered your web site accidentally, and I’m surprised why this coincidence did not happened
in advance! I bookmarked it.
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 completely off topic but I had to tell someone!
It’s truly a great and helpful piece of information. I’m happy that you shared this helpful information with us.
Please keep us informed like this. Thanks for sharing.
We absolutely love your blog and find a lot of your post’s to be
just what I’m looking for. Does one offer guest writers
to write content to suit your needs? I wouldn’t mind publishing a post or elaborating on a few of the subjects you write regarding here.
Again, awesome web log!
Greetings I am so grateful I found your website, I really found you by
error, while I was looking on Google for something else, Regardless I
am here now and would just like to say thank you for a remarkable post and a all round entertaining blog
(I also love the theme/design), I don’t have time to browse it all
at the moment but I have saved it and also added your
RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the excellent b.
Woah! I’m really enjoying the template/theme of this blog. It’s simple, yet effective.
A lot of times it’s very difficult to get that “perfect balance” between superb usability and visual appearance.
I must say that you’ve done a excellent job with this.
In addition, the blog loads super fast for me on Chrome.
Superb Blog!
great publish, very informative. I’m wondering why the opposite specialists of this sector do not notice this.
You must proceed your writing. I’m confident, you have a great readers’ base already!
Everything is very open with a clear clarification of
the issues. It was really informative. Your site is very useful.
Thank you for sharing!
This blog was… how do I say it? Relevant!! Finally I’ve found something that helped
me. Thank you!
It’s actually a cool and useful piece of information. I am glad that
you shared this helpful information with us. Please keep
us up to date like this. Thank you for sharing.
I loved as much as you will receive carried out right here.
The sketch is attractive, your authored subject matter stylish.
nonetheless, you command get got an impatience over that you wish be delivering the following.
unwell unquestionably come more formerly again since exactly the same nearly a lot often inside case
you shield this hike.
Its like you read my mind! You seem to know so much about this,
like you wrote the book in it or something. I think that you can do with a few pics
to drive the message home a little bit, but instead of that,
this is fantastic blog. A fantastic read. I’ll definitely be back.
constantly i used to read smaller articles that
also clear their motive, and that is also happening with
this article which I am reading at this place.
Hey there, I think your site might be having browser compatibility issues.
When I look at your blog site 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, very good
blog!
Your style is very unique compared to other
people I’ve read stuff from. Thanks for posting when you have the
opportunity, Guess I will just book mark this page.
I’m really impressed with your writing skills and also with the layout
on your weblog. Is this a paid theme or did you modify it yourself?
Anyway keep up the excellent quality writing, it is rare to
see a great blog like this one today.
I always spent my half an hour to read this weblog’s
articles everyday along with a mug of coffee.
An outstanding share! I’ve just forwarded this onto a coworker who has been doing a
little homework on this. And he actually bought me lunch simply because I stumbled upon it for him…
lol. So let me reword this…. Thanks for the meal!! But yeah, thanx for spending time
to discuss this issue here on your internet site.
Wonderful site. Plenty of useful info here. I’m sending it to a few buddies ans also sharing in delicious.
And certainly, thanks for your sweat!
We stumbled over here coming from a different website and thought I might
check things out. I like what I see so now i’m following you.
Look forward to finding out about your web page for a second time.
Hi, its nice paragraph concerning media print, we all be familiar with
media is a impressive source of data.
Great article, just what I needed.
Thanks for your marvelous posting! I quite enjoyed reading it,
you might be a great author.I will always bookmark your blog and may come back very
soon. I want to encourage you to continue your great work, have a nice afternoon!
Hey there just wanted to give you a quick heads up and let you know a few of the pictures aren’t loading correctly.
I’m not sure why but I think its a linking issue.
I’ve tried it in two different internet browsers and both show the
same results.
Good day! This post couldn’t be written any better! Reading through this post reminds me of my previous room mate! He always kept talking about this. I will forward this write-up to him. Fairly certain he will have a good read. Thank you for sharing!
Keep this going please, great job!
I’ve read several good stuff here. Certainly price
bookmarking for revisiting. I surprise how much effort you place to create any such great informative web site.
Do you mind if I quote a couple of your posts as long as I provide
credit and sources back to your site? My blog is in the exact same niche as yours and my visitors
would genuinely benefit from some of the information you present here.
Please let me know if this ok with you. Thank you!
Your method of telling the whole thing in this piece of writing is truly nice, all can without difficulty be aware of it, Thanks a lot.
We’re a group of volunteers and opening a new scheme in our community.
Your website offered us with valuable information to work on. You have done a formidable job
and our whole community will be thankful
to you.
Hi there, of course this article is really pleasant and I have learned lot of things from it regarding blogging.
thanks.
What a stuff of un-ambiguity and preserveness of valuable know-how on the topic of unpredicted
emotions.
I feel that is one of the such a lot important info for me.
And i am glad reading your article. But should remark on some
general issues, The site taste is great, the articles is
truly great : D. Just right job, cheers
Wonderful beat ! I wish to apprentice while you amend your website, how could i subscribe
for a blog site? The account aided me a acceptable deal.
I had been tiny bit acquainted of this your broadcast provided bright clear concept
Definitely consider that that you stated. Your favorite
reason seemed to be at the net the simplest thing to consider of.
I say to you, I certainly get irked at the same time as other people consider concerns
that they just do not recognize about. You managed to hit the nail upon the top and also defined out the entire thing
with no need side effect , folks could take a
signal. Will likely be back to get more. Thanks
It is appropriate time to make some plans for the future and it’s time to
be happy. I’ve read this post and if I could I want to suggest
you some interesting things or advice. Perhaps you can write next articles referring to this article.
I desire to read even more things about it!
Good post! We are linking to this particularly great post on our
website. Keep up the great writing.
What a material of un-ambiguity and preserveness of valuable familiarity
on the topic of unpredicted emotions.
My spouse and I stumbled over here coming from a different web page and thought I
should check things out. I like what I see so now i am following
you. Look forward to looking into your web page repeatedly.
It’s going to be end of mine day, except before finish I am reading this great paragraph to improve my experience.
Unquestionably believe that that you said. Your favourite reason seemed to
be at the net the simplest thing to take into accout of. I say to you, I certainly get irked whilst other people think about
concerns that they just do not know about. You controlled to hit the nail upon the highest as smartly as defined out the entire thing without having side
effect , other people can take a signal. Will likely
be back to get more. Thanks
You work hard to dress up your life and control the big and small things in life. But be sure to dress yourself. That way, your life is refined enough.
It’s going to be finish of mine day, however before
finish I am reading this wonderful article to increase my experience.
My friend is a raincoat, even if I ca n’t think of it on a sunny day, the rainy season will accompany you; my lover is a thick cloth, even if it is not beautiful, it can cover the wind and cold; my parents are old jackets, although they are not fashionable, even stupid, but they are the warmest and warmest .
If some one wishes expert view about blogging then i suggest
him/her to visit this blog, Keep up the pleasant job.
We were two small trees fighting side by side, we were two voices in a duet, and we were once alumni on a desk. Today, please accept my affectionate blessings.
Thank you for the good writeup. It in fact was a amusement account it.
Look advanced to more added agreeable from you! By the way, how can we communicate?
Don’t use your time to witness the success of others. May all the detours you go through become beautiful rainbows in the end.
If some one needs to be updated with most up-to-date technologies afterward he must be pay a
quick visit this website and be up to date daily.
Someone essentially lend a hand to make critically posts
I might state. That is the very first time I frequented your website page
and up to now? I surprised with the analysis you made to create this particular put up extraordinary.
Wonderful process!
Just hate me for being too young to see the tenderness behind his little tricks.
What other people think of you and how you say it is their business, it has nothing to do with you, how you live, how you live, and it has nothing to do with them, be yourself.
Hello! Do you know if they make any plugins to safeguard against hackers?
I’m kinda paranoid about losing everything I’ve worked hard on. Any recommendations?
whoah this blog is wonderful i love studying your articles.
Keep up the good work! You realize, a lot of people are hunting round for this info, you could help them
greatly.
I want to be with you, even if it is a headless and tailless farce, I will persist until the moment the world fades after you leave the stage, hold a small lamp and stand in the memory waiting for you.
Spot on with this write-up, I honestly feel this site needs a great deal more
attention. I’ll probably be returning to read more, thanks for
the information!
Genuinely when someone doesn’t be aware of then its
up to other visitors that they will help, so here it happens.
There is a kind of love that obviously wants to give up, but can’t give up; there is a kind of love, knowing that it is suffering, but can’t hold back; Can’t take it back already.
I want to be with you, even if it is a headless and tailless farce, hold a small lamp and stand in the memory waiting for you.
I want to be with you, even if it is a headless and tailless farce, hold a small lamp and stand in the memory waiting for you.
It’s truly a nice and helpful piece of information. I am happy that you simply shared this helpful info with us. Please keep us informed like this. Thank you for sharing.