Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

要极度小心lefttop,rightbottom!!!附正确的输入处理代码.

Posted by donkeyinacm at 2010-02-09 13:00:51 on Problem 1410
scanf("%lf%lf%lf%lf%lf%lf%lf%lf\n",&s.x,&s.y,&e.x,&e.y,&lt.x,&lt.y,&rb.x,&rb.y);
        double minx,miny,maxx,maxy;
		minx=min(lt.x,rb.x);
		miny=min(lt.y,rb.y);
		maxx=max(lt.x,rb.x);
		maxy=max(lt.y,rb.y);
		P[0]=Point(minx,maxy); P[1]=Point(maxx,maxy); P[2]=Point(maxx,miny); P[3]=Point(minx,miny);

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator