#include #include #include #include using namespace std; struct Struct{ int count,level; bool operator<(const Struct &other)const{ if(level==other.level) return count>other.count; else return level>other.level; } }; int main(){ int N; cin >>N; vector b; vector a; priority_queue aaa; for(int i=0 ; i> x.level; x.count=0; a.push_back(x); aaa.push(x); }for(int i=0 ; i> x; b.push_back(x/2); } int Max=2000000000; for(int i=0 ; i now=aaa; int counter=0,tmax=0; while(counter!=N){ int l=(i+counter)%N; Struct next; next.level=now.top().level+b[l]; next.count=now.top().count+1; now.pop(); now.push(next); counter++; if(tmaxtmax)Max=tmax; } cout <