// // File: unique.cc // Author: cteam21 // // Created on November 13, 2011, 9:20 AM // #include #include #include // // // int main(int argc, char** argv) { int bits[125000000]; //int bits[1250]; int pole[1000000]; //int pole[1000]; int interval[1000000][2]; //int interval[1000][2]; int n, q, start; int low, high; int count; while (42){ scanf("%d%d", &n, &q); if(n==0) return 0; count=0; start=0; memset(bits, 0, 125000000); //memset(bits, 0, 1250); for(int i=0;ilow){ if (high<=interval[j-1][1]){ printf("OK\n"); break; } else{ printf("%d\n", pole[interval[j-1][1]+1]); break; } } } if (j==count) printf("OK\n"); } printf("\n"); } return 0; }