|
|
вернуться в форумStrange... I have two programs 1st - a right one wich have WA#2 and second - gets AC if you remove comment you get WA#2 WHY? I realy can't understand, anybody please help me! struct point { int ID; double x,y; }; int Chet(point a) { // if (a.x > 0 && a.y >=0) return 0; // if (a.x <=0 && a.y > 0) // return 1; // if (a.x < 0 && a.y <=0) // return 2; // if (a.x >=0 && a.y < 0) // return 3; } inline bool Tr(const point &a, const point &b) { return a.x*b.y-a.y*b.x > 0; } inline bool operator < (const point &a, const point &b) { int ca = Chet(a); int cb = Chet(b); return ca < cb || ca==cb && Tr(a,b); } Re: Strange... Oh sorry, I mean problem 1175, admins you can correct it |
|
|