#include #define MOD 1000000007LL using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair P; class segtree{ public: static const int N=1<<18; int dp[1<<19]; segtree(){ memset(dp,0,sizeof(dp)); } void update(int k,int v){ k+=N-1; dp[k]+=v; while(k>0){ k=(k-1)/2; dp[k]=dp[k*2+1]+dp[k*2+2]; } } int query(int a,int b,int k=0,int l=0,int r=N){ if(b<=l || r<=a)return 0; if(a<=l && r<=b)return dp[k]; int mid=(l+r)/2; int vl=query(a,b,k*2+1,l,mid); int vr=query(a,b,k*2+2,mid,r); return vl+vr; } }; ull seed; int next() { seed = seed ^ (seed << 13); seed = seed ^ (seed >> 7); seed = seed ^ (seed << 17); return (seed >> 33); } segtree seg; int n,q; int a[200001]; vector vec; int main(void){ scanf("%d%d",&n,&q); cin >> seed; for(int i=0;i<10000;i++){ next(); } for(int i=0;i