// Wrongri-La Shower #include #include typedef long long ll; ll B, C[10]; int N; ll remaining(int i, ll x){ ll res = B; for(int j=i;j 1){ ll mid = (lb+ub) / 2; if(can(i, mid)){ lb = mid; }else{ ub = mid; } } if(!can(i, lb)){break;} ll cost = remaining(i, lb) - B; for(int j=0;j