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

居然1A 计算几何也能1A?

Posted by moretimes at 2013-03-18 21:01:35 on Problem 1228
inline bool ck ()
{
	int ans (0);
	for (int i = 1; i <= top; i ++)
	{
		int t1 = cross (*stk[i + 1] - *stk[i], *stk[i + 2] - *stk[i + 1]);
		int t2 = cross (*stk[i + 2] - *stk[i + 1], *stk[i + 3] - *stk[i + 2]);
		if (t1 != 0 && t2 != 0)
			return false;
		ans += t1 + t2;
	}	
	if (ans == 0)
		return false;
	return true;
}

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