/// Gheorghies Alexandru - greedy solution #include using namespace std; typedef long long ll; typedef long double ld; typedef pair pll; typedef pair pld; const ll LGMAX=20,NMAX=3e5+5; void tc(){ ll n,ans=0,len=0; string s; cin>>n>>s; for(ll i=0;i>t; while(t--) tc(); return 0; }