为何DEV编译通过,洛谷和Atcoder显示CompileError?
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
int n,x;
cin>>n>>x;
char s[n+1];
cin>>s;
int l=strlen(s);
for(int i=0;i<l;i++)
{
if(s[i]=='o')x++;
if(s[i]=='x')x=max(0,x-1);
}
cout<<x;
return 0;
}