.
bool judgeCircle(char * moves){
int n = strlen(moves),int count1=0,count2=0;
for (int i=0; i<n; i++)
{
if (moves[i] == 'U') count1++;
else if (moves[i] == 'D') count1--;
else if (moves[i] == 'R') count2++;
else count2--;
}
return !count1 && !count2;
}