@[暴雪海南](/space/show?uid=214912) ```cpp
return 1.0 ; ```是什么鬼?
by StarKnight @ 2019-07-25 09:34:08
定义的返回类型是int,你却返回的是double型,这样真的可以吗?
by My_666 @ 2019-07-25 09:37:20
@[君莫笑~](/space/show?uid=127608)
by 暴雪海南 @ 2019-07-25 09:45:24
@[AC之心](/space/show?uid=71548)
by 暴雪海南 @ 2019-07-25 09:45:30
那是因为枚举的条件都不符合的话就可以re了
by 暴雪海南 @ 2019-07-25 09:46:22
。。。
你把这句改成```return -1;```试试
by StarKnight @ 2019-07-25 09:50:04
@[暴雪海南](/space/show?uid=214912) 返回值好像可以强制类型转换吧?
by StarKnight @ 2019-07-25 09:50:40
好吧
by 暴雪海南 @ 2019-07-25 09:51:21
```c
#include<iostream>
using namespace std;
int judge[5][5]=
{
0,-1, 1, 1,-1,
1, 0,-1, 1,-1,
-1, 1, 0,-1, 1,
-1,-1, 1, 0, 1,
1, 1,-1,-1, 0
};
int main()
{
int N,Na,Nb;
cin>>N>>Na>>Nb;
int *A=new int[Na];
int *B=new int[Nb];
for(int i=0;i<Na;i++)
cin>>A[i];
for(int i=0;i<Nb;i++)
cin>>B[i];
int score_A=0;
int score_B=0;
for(int i=0;i<N;i++)
{
if(judge[A[i%Na]][B[i%Nb]]==1)
score_A++;
else if(judge[A[i%Na]][B[i%Nb]]==-1)
score_B++;
}
cout<<score_A<<' '<<score_B;
return 0;
}
```
by huangchao @ 2019-08-18 22:33:20