#include #include #include #include #include using namespace std; int main(){ int n; cin >> n; vector v(n); vector buf; for(int i=0;i> v[i]; int cur =0; int cnt=0; int counter=0; do{ cnt=0; cur=0; for(int i=0;i