This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int re=0;
vector<char>v;
int main()
{ios_base::sync_with_stdio(false);
cin.tie(NULL);
string s;cin>>s;
int n=s.size();
int r=-1;
for(int i=0;i<n;i++)
{
if(r<0||i==0||s[i]!=v[r])
{
v.push_back(s[i]);
r++;
}
else {
v.pop_back();
re=1-re;
r--;
}
}
if (re==0)
{
cout<<"No";return 0;
}
cout<<"Yes";
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |