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

两天了,还AC不了!可怜可怜我吧!

Posted by 00 at 2005-07-02 10:52:27 on Problem 2419
#include<iostream.h>
void main()
{
	int P,T,a,b,i,j,pt[101][101],r=0;
	cin>>P>>T;
	while(cin>>a>>b)
		pt[a-1][b-1]=1;
	for(i=0;i<P;i++)
	{
		int l=0;
		for(j=0;j<i;j++)
		{
			for(int k=0;k<T;k++)
			{
				if(pt[i][k]!=pt[j][k])
					break;
			}
			if(k!=T)
				l++;
		}
		if(l==j)
			r++;
	}
	cout<<r<<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