#include #include #include #include #include #include #include #include #include #define X first #define Y second using namespace std; typedef long long ll; typedef pair pii; const int maxn=1e6+10; const int INF=0x3f3f3f3f; const int mod=1000000007; int ans[100010]; int main() { int T; scanf("%d",&T); while (T--) { int n,m,pos=0; scanf("%d%d",&n,&m); ll MAX=0; ll num; for (int i=0;iMAX) ans[pos++]=1; else ans[pos++]=0; } for (int i=0;i