|
|
back to boardWA #8 Please help, I can't find a problem. #include <stdio.h> #include <iostream> using namespace std; int main() { const short max=255; int n; char a[1001][max],t[2]; scanf("%i",&n); int k=0; cin.getline(t,max); for (int i=0;i<n;++i) { cin.getline(a[i],max); for (int j=0;j<i;++j) { bool r=1; for (int t=0;t<max;++t) { if (!(a[i][t]==a[j][t])) { r=0; break; } } if (r) { ++k; break; } } } printf("%i\n",k); } Edited by author 08.08.2012 17:56 |
|
|