This documentation is automatically generated by online-judge-tools/verification-helper
View the Project on GitHub ningenMe/compro-library
vector<pair<char,long long>> Rarts(string S){ char ch = S[0]; int cnt = 1; vector<pair<char,long long>> res; for(int i = 1; i < S.size(); ++i){ if(S[i]==ch) { cnt++; } else{ res.push_back({ch,cnt}); ch = S[i]; cnt = 1; } } res.push_back({ch,cnt}); return res; } //verify https://atcoder.jp/contests/agc039/tasks/agc039_a
#line 1 "non-verified/Rarts.cpp" vector<pair<char,long long>> Rarts(string S){ char ch = S[0]; int cnt = 1; vector<pair<char,long long>> res; for(int i = 1; i < S.size(); ++i){ if(S[i]==ch) { cnt++; } else{ res.push_back({ch,cnt}); ch = S[i]; cnt = 1; } } res.push_back({ch,cnt}); return res; } //verify https://atcoder.jp/contests/agc039/tasks/agc039_a