Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
小看这题了if(x==0||y==0||z==0) ans=x*x+y*y+z*z; else { if(x==a) ans=min(min(sqr(x+y)+z*z,sqr(x+z)+y*y),min(sqr(c+y)+sqr(a+c-z),sqr(b+z)+sqr(a+b-y))); if(y==b) ans=min(min(sqr(y+x)+z*z,sqr(y+z)+x*x),min(sqr(a+z)+sqr(b+a-x),sqr(c+x)+sqr(b+c-z))); if(z==c) ans=min(min(sqr(z+x)+y*y,sqr(z+y)+x*x),min(sqr(a+y)+sqr(c+a-x),sqr(b+x)+sqr(c+b-y))); } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator