| ||||||||||
| 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 | |||||||||
为什么Run Time Error... 郁闷#include <iostream>
#include <iomanip>
using namespace std;
long int a[1000][10000];
void input1() {
char c;
long int i=1,n=0,m;
while (i<=7) {
cin>>c;
if (c=='-') continue;
++i;
if ((c<='9') && (c>='0')) m=long int(c)-long int('0');
else {
if ((c>'Q')) c--;
m=(c-long int('A'))/3+2;
}
n=(n+m)*10;
}
n=n/10;
a[n/10000][n%10000]++;
};
int main() {
long int n,i,j;
cin>>n;
for (i=1;i<=n;i++) input1();
cout<<setfill('0');
for (i=0;i<=1000;i++)
for (j=0;j<=10000;j++)
if (a[i][j]>1) {
cout<<setw(3)<<i;
cout<<setw(0)<<'-';
cout<<setw(4)<<j;
cout<<setw(0)<<' '<<a[i][j];
cout<<setw(0)<<endl;
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator