第一发别看了。。。自己改过后第2 5 组没过。。
```cpp
#include <iostream>
#include <string>
using namespace std;
const int siz = 9;
string da[siz][siz];
char cha[siz];
int n, cnt = 0, bi, num[siz];
int trans(string a)
{
int i = 0, sum = 0;
while (i < a.length()) {
for (int j = 1; j <= bi; j++)
if (a[i] == cha[j]) sum = sum * bi + num[j];
i++;
}
return sum;
}
int main()
{
cin >> n;
bi = n - 1;
for (int i = 1; i <= bi; i++)
num[i] = -1;
for (int i = 1; i <= n; i++)
for (int j = 1; j <= n; j++)
{
cin >> da[i][j];
if (i == 1 && j>1) cha[++cnt] = da[i][j][0];
if (da[i][j].length() == 1 && i>1 && j>1)
for (int l = 1; l <= cnt; l++)
if (cha[l] == da[i][j][0]) num[l]++;
}
for (int i = 2; i <= n; i++)
for (int j = 2; j <= n; j++)
if (trans(da[i][1]) + trans(da[j][1]) != trans(da[i][j]))
{
cout << da[i][1] << "=" << trans(da[i][1]) << endl;
cout << da[j][1] << "=" << trans(da[j][1]) << endl;
cout << da[i][j] << "=" << trans(da[i][j]) << endl;
cout << "ERROR!";
cout <<" "<< cha[1] <<" "<< num[1];
system("pause");
return 0;
}
for (int i = 1; i <= n - 1; i++)
cout << cha[i] << "=" << num[i] << " ";
cout << "\n" << bi;
system("pause");
return 0;
}
```
by OAOA @ 2017-07-31 18:14:51
谁能告诉我怎么删帖子。。。。。
by OAOA @ 2017-07-31 18:22:55
。。。。。。~~我也不知道~~
by Sirius墨狼 @ 2017-08-30 21:53:16
;
by a2063436123 @ 2017-09-24 16:51:55
@[OAOA](/space/show?uid=48928) 联系管理可以删
by Lyrics @ 2017-10-24 08:07:24
@[chen_zhe](/space/show?uid=8457) @[yjjr](/space/show?uid=5088)
by wxy_god @ 2018-08-20 12:05:42
@[我是一个垃圾](/space/show?uid=89396) 坟贴不管。。。
by yjjr @ 2018-08-20 14:01:49
@[yjjr](/space/show?uid=5088) 哦知道了
by wxy_god @ 2018-08-20 14:48:40
@[我是一个垃圾](/space/show?uid=89396) 发现dalao并捕捉
by 徒司王 @ 2018-09-17 21:29:55
@[花落丶离殇](/space/show?uid=54964) 你是这么找到这篇帖子的?
by wxy_god @ 2018-09-17 21:39:20