| ||||||||||
| 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 | |||||||||
为什么会WA呢?高手指点啊,给个测试数据吧#include<iostream.h>
void main()
{
int P,T,a,b,i,j;
cin>>P>>T;
int pt[101][101];
while(cin>>a>>b)
pt[a-1][b-1]=1;
int r=P;
for(i=0;i<P;i++)
{
for(j=i+1;j<P;j++)
{
for(int k=0;k<T;k++)
{
if(pt[i][k]!=pt[j][k])
break;
}
if(k==T)
r--;
}
}
cout<<r<<endl;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator