#include #include #include #include #include #include #include #include #include #define FI first #define SE second #define PF push_front #define PB push_back #define PPF pop_front #define PPB pop_back #define MA make_pair #define ll long long #define PA pair #define VE vector #define VP vector #define FOR(i,a,b) for(int i=a;i=a;i--) #define YES(i) cout<<(i?"YES":"NO")<>S; int N=S.size(); stack st; int now=0; VE V; FOR(i,0,N){ if(st.empty()){ st.push(S[i]); }else if(st.top()==S[i]){ st.push(S[i]); }else{ now=0; while(i