请问为什么会
Unknown Error
#include <bits/stdc++.h>
using namespace std;
int x,y,n;
string s;
typedef pair<int,int> P;
map<P,bool> vis;
int main(){
cin >> n >> s;
for(int i=0;i<n;i++){
if(vis[make_pair(x,y)]==true){
cout << "Yes" << endl;
return 0;
}
vis[make_pair(x,y)]=true;
if(s[i]=='R') x++;
else if(s[i]=='L') x--;
else if(s[i]=='U') y++;
else if(s[i]=='D') y--;
}
cout << "No" << endl;
return 0;
}