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

this is my code for the special judge, could anybody told my that my code is not true??

Posted by hasan83 at 2007-06-09 09:14:42 on Problem 3239
void acceptnace(vector<int> ar)
{
	for(int i=0;i<ar.size();i++)
	{
		int count=1;
		for(int j=i-1;j>=0;j--)
		{
			if(ar[i]+i==j-ar[j]/*||ar[i]+count==ar[j]*/)
			{
				cout<<"REJECTED"<<endl;
				return;
			}
			count++;
		}
	}
	for(int i=0;i<ar.size();i++)
	{
		for(int j=i+1;j<ar.size();j++)
		{
			if(ar[i]==ar[j])
			{
				cout<<"REJECTED"<<endl;
				return;
			}
		}
	}
	cout<<"ACCEPTED"<<endl;
}

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