。。。样例都不过
by 天南星魔芋 @ 2021-04-20 20:38:41
@[beta_Cyg](/user/452531)
```cpp
#include<iostream>
using namespace std;
int n,na,nb,cntA,cntB,nowA,nowB,i;
short SPR(const int& a,const int& b){//原来判断有误
if(a==b)return 0;
else if(a==0){
if(b==1 or b==4)return -1;
}
else if(a==1){
if(b==2 or b==4)return -1;
}
else if(a==2){
if(b==0 or b==3)return -1;
}
else if(a==3){
if(b==0 or b==1)return -1;
}
else if(a==4){
if(b==2 or b==3)return -1;
}
return 1;
}
int main(){
cin>>n>>na>>nb;
int roundA[na],roundB[nb];
for(;i<na;i++)cin>>roundA[i];
for(i=0;i<nb;i++)cin>>roundB[i];
for(i=0;i<n;i++){
if(nowA>=na)nowA=0;//注意边界
if(nowB>=nb)nowB=0;
if(SPR(roundA[nowA],roundB[nowB])==1)cntA++;
if(SPR(roundA[nowA],roundB[nowB])==-1)cntB++;
nowA++;
nowB++;
}
cout<<cntA<<' '<<cntB;
return 0;
}
```
by 天南星魔芋 @ 2021-04-20 20:47:36
qwq我就是样例没过才来的
by cygnus_beta @ 2021-04-20 20:53:27