#pragma GCC optimize ("Ofast") #include using namespace std; void *wmem; char memarr[96000000]; template inline void walloc1d(T **arr, int x, void **mem = &wmem){ static int skip[16] = {0, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}; (*mem) = (void*)( ((char*)(*mem)) + skip[((unsigned long long)(*mem)) & 15] ); (*arr)=(T*)(*mem); (*mem)=((*arr)+x); } template void sortA_L(int N, T1 a[], void *mem = wmem){ sort(a, a+N); } template void sortA_L(int N, T1 a[], T2 b[], T3 c[], void *mem = wmem){ int i; pair > *arr; walloc1d(&arr, N, &mem); for(i=(0);i<(N);i++){ arr[i].first = a[i]; arr[i].second.first = b[i]; arr[i].second.second = c[i]; } sort(arr, arr+N); for(i=(0);i<(N);i++){ a[i] = arr[i].first; b[i] = arr[i].second.first; c[i] = arr[i].second.second; } } template void sortA_L(int N, T1 a[], T2 b[], T3 c[], T4 d[], void *mem = wmem){ int i; pair, pair > *arr; walloc1d(&arr, N, &mem); for(i=(0);i<(N);i++){ arr[i].first.first = a[i]; arr[i].first.second = b[i]; arr[i].second.first = c[i]; arr[i].second.second = d[i]; } sort(arr, arr+N); for(i=(0);i<(N);i++){ a[i] = arr[i].first.first; b[i] = arr[i].first.second; c[i] = arr[i].second.first; d[i] = arr[i].second.second; } } inline int my_getchar_unlocked(){ static char buf[1048576]; static int s = 1048576; static int e = 1048576; if(s == e && e == 1048576){ e = fread_unlocked(buf, 1, 1048576, stdin); s = 0; } if(s == e){ return EOF; } return buf[s++]; } inline void rd(int &x){ int k; int m=0; x=0; for(;;){ k = my_getchar_unlocked(); if(k=='-'){ m=1; break; } if('0'<=k&&k<='9'){ x=k-'0'; break; } } for(;;){ k = my_getchar_unlocked(); if(k<'0'||k>'9'){ break; } x=x*10+k-'0'; } if(m){ x=-x; } } struct MY_WRITER{ char buf[1048576]; int s; int e; MY_WRITER(){ s = 0; e = 1048576; } ~MY_WRITER(){ if(s){ fwrite_unlocked(buf, 1, s, stdout); } } } ; MY_WRITER MY_WRITER_VAR; void my_putchar_unlocked(int a){ if(MY_WRITER_VAR.s == MY_WRITER_VAR.e){ fwrite_unlocked(MY_WRITER_VAR.buf, 1, MY_WRITER_VAR.s, stdout); MY_WRITER_VAR.s = 0; } MY_WRITER_VAR.buf[MY_WRITER_VAR.s++] = a; } inline void wt_L(char a){ my_putchar_unlocked(a); } inline void wt_L(int x){ int s=0; int m=0; char f[10]; if(x<0){ m=1; x=-x; } while(x){ f[s++]=x%10; x/=10; } if(!s){ f[s++]=0; } if(m){ my_putchar_unlocked('-'); } while(s--){ my_putchar_unlocked(f[s]+'0'); } } template inline T pow2_L(T a){ return a*a; } int N; int X[300000]; int Y[300000]; int ind[300000]; long long val[300000]; int ress; int res[300000]; bool ok(int i, int j){ return (pow2_L((X[i]-X[j])))+(pow2_L((Y[i]-Y[j])))>= 100; } int main(){ int i; wmem = memarr; rd(N); { int Lj4PdHRW; for(Lj4PdHRW=(0);Lj4PdHRW<(N);Lj4PdHRW++){ rd(X[Lj4PdHRW]); rd(Y[Lj4PdHRW]); } } for(i=(0);i<(N);i++){ ind[i] = i; } for(i=(0);i<(N);i++){ val[i] = (long long) X[i] / 10 * 1000000000 + Y[i]; } sortA_L(N, val, X, Y, ind); for(i=(0);i<(N);i++){ int j; for(j=(0);j<(ress);j++){ if(!ok(i,res[j])){ goto xr20shxY; } } res[ress++] = i; if(ress*90 >= N){ break; } xr20shxY:; } for(i=(0);i<(ress);i++){ res[i] = ind[res[i]]; } sortA_L(ress,res); wt_L(ress); wt_L('\n'); { int a2conNHc; if(ress==0){ wt_L('\n'); } else{ for(a2conNHc=(0);a2conNHc<(ress-1);a2conNHc++){ wt_L(res[a2conNHc]+1); wt_L(' '); } wt_L(res[a2conNHc]+1); wt_L('\n'); } } return 0; } // cLay varsion 20200509-1 // --- original code --- // int N, X[3d5], Y[3d5], ind[3d5]; // ll val[3d5]; // int ress, res[3d5]; // // bool ok(int i, int j){ // return (X[i]-X[j])**2 + (Y[i]-Y[j])**2 >= 100; // } // // { // rd(N,(X,Y)(N)); // rep(i,N) ind[i] = i; // rep(i,N) val[i] = (ll) X[i] / 10 * 1d9 + Y[i]; // sortA(N, val, X, Y, ind); // rep(i,N){ // rep(j,ress) if(!ok(i,res[j])) break_continue; // res[ress++] = i; // // wt(X[i],Y[i]); // if(ress*90 >= N) break; // } // rep(i,ress) res[i] = ind[res[i]]; // sortA(ress,res); // wt(ress); // wt(res(ress)+1); // }