#include using namespace std; #define ll long long const int N = 1<<21, P = 1000000007; int T, n, ans, f[N]; char s[N]; void solve(int l, int r){ // printf("solve: %d %d\n", l, r); int mid=(l+r)>>1; if(r-l>2) solve(l, mid); for(int i=mid; i> %d\n", f[n-mid+l]); if(r-l>2) solve(mid, r); for(int i=mid; i>x) ++x; ans=0, solve(0, 1<