请问为什么只得了90分?
#include <bits/stdc++.h>
using namespace std;
int n,m,temp = 1;
struct t{
int cx;
string zy;
}toy[100009];
int b(int x,int y,int temp){
if(toy[temp].cx==0){
if(x==0){
temp = (temp-y+n)%n;
}else{
temp += y;
temp %= n;
}
}else{
if(x==0){
temp += y;
temp %= n;
}else{
temp = (temp-y+n)%n;
}
}
return temp;
}
int main(){
cin>>n>>m;
for(int i = 1;i<=n;i++){
cin>>toy[i].cx>>toy[i].zy;
}
for(int i = 1;i<=m;i++){
int a,s;
cin>>a>>s;
temp = b(a,s,temp);
}
cout<<toy[temp].zy;
}