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 |
为什么是错误呀#include <iostream.h> #include <string.h> char num[100][100]; bool save[100]; void main() { int i,j,k; for(i=0;i<100;i++) for(j=0;j<100;j++) num[i][j]='t'; int P,T; int count=0; cin>>P>>T; for(i=0;i<P;i++) num[i][T]='\0'; while(cin) // for(k=0;k<6;k++) { cin>>i>>j; num[i-1][j]='p'; } for(i=0;i<P && save[i]==false;i++) { for(j=i+1;j<P&&save[j]==false;j++) { if(strcmp(num[i],num[j])==0) { save[j]=true; } } count++; } cout<<count; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator