malteklaes/cpp-code-code_search_net-style huggingface dataset:
#include <bits/stdc++.h>   using namespace std;   long long n, low, high, chs;   long long x1up, x2up, x1down, x2down, y1down, y2down, y1up, y2up;   int query(long long x, long long y, long long xx, long long yy) {     cout <<  ?   << x <<     << y <<     << xx <<     << yy << endl;     cout << flush;     int res;     cin >> res;     return res;   }   int query2(long long x, long long y, long long xx, long long yy) {     int res = query(x, y, xx, yy);     if (x <= x1down && y <= y1down && xx >= x1up && yy >= y1up) res--;     return res;   }   int main() {     cin >> n;     low = 1;     high = n;     while (low < high) {       chs = (low + high) / 2;       int res = query(1, 1, n, chs);       if (res == 0)         low = chs + 1;       else         high = chs;     }     y1up = low;     low = 1;     high = n;     while (low < high) {       chs = (low + high) / 2;       int res = query(1, 1, chs, y1up);       if (res == 0)         low = chs + 1;       else         high = chs;     }     x1up = low;     low = 1;     high = x1up;     while (low <= high) {       chs = (low + high) / 2;       int res = query(chs, 1, x1up, y1up);       if (res != 0) {         low = chs + 1;         x1down = chs;       } else         high = chs - 1;     }     low = 1;     high = y1up;     while (low <= high) {       chs = (low + high) / 2;       int res = query(x1down, chs, x1up, y1up);       if (res != 0) {         low = chs + 1;         y1down = chs;       } else         high = chs - 1;     }     low = 1;     high = n;     while (low < high) {       chs = (low + high) / 2;       int res = query2(1, 1, n, chs);       if (res == 0)         low = chs + 1;       else         high = chs;     }     y2up = low;     low = 1;     high = n;     while (low < high) {       chs = (low + high) / 2;       int res = query2(1, 1, chs, y2up);       if (res == 0)         low = chs + 1;       else         high = chs;     }     x2up = low;     low = 1;     high = x2up;     while (low <= high) {       chs = (low + high) / 2;       int res = query2(chs, 1, x2up, y2up);       if (res != 0) {         low = chs + 1;         x2down = chs;       } else         high = chs - 1;     }     low = 1;     high = y2up;     while (low <= high) {       chs = (low + high) / 2;       int res = query2(x2down, chs, x2up, y2up);       if (res != 0) {         low = chs + 1;         y2down = chs;       } else         high = chs - 1;     }     cout <<  !   << x1down <<     << y1down <<     << x1up <<     << y1up <<              << x2down <<     << y2down <<     << x2up <<     << y2up << endl;     cout << flush;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     bool a[5][5];     int b[3][3];     for (int i = 0; i < 3; i++)       for (int j = 0; j < 3; j++) {         cin >> b[i][j];         a[i + 1][j + 1] = true;       }     for (int i = 0; i < 3; i++)       for (int j = 0; j < 3; j++) {         if (b[i][j] % 2) {           a[i + 1][j + 1] = !a[i + 1][j + 1];           a[i][j + 1] = !a[i][j + 1];           a[i + 1][j] = !a[i + 1][j];           a[i + 2][j + 1] = !a[i + 2][j + 1];           a[i + 1][j + 2] = !a[i + 1][j + 2];         }       }     for (int i = 0; i < 3; i++) {       for (int j = 0; j < 3; j++) {         cout << a[i + 1][j + 1];       }       cout << endl;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int n, t, prindex, k, kingdom, ki, prince;     cin >> t;     for (int h = 0; h < t; h++) {       cin >> n;       vector<int> vec(n + 7, 0);       prindex = 0, k, kingdom, ki, prince = 1;       for (int i = 1; i <= n; i++) {         cin >> k;         ki = 0;         for (int j = 0; j < k; j++) {           cin >> kingdom;           if (ki == 0 and vec[kingdom] == 0) {             vec[kingdom]++;             ki++;           }         }         if (ki == 0) prindex = i;       }       for (int i = 1; i <= n and vec[i] != 0; i++) prince = i + 1;       if (prindex > 0)         cout <<  IMPROVE               <<   n               << prindex <<     << prince <<   n ;       else         cout <<  OPTIMAL               <<   n ;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int const maxn = (int)2e6 + 1, inf = (int)2e9 + 1;   map<char, int> pidr;   int n, m, ans, cur, sz, a[maxn], b, l[maxn], r[maxn], x[maxn];   bool used[maxn];   int main() {     cin >> n >> m;     for (int i = 1; i <= n; i++) cin >> a[i];     for (int i = 1; i <= m; i++) {       cin >> l[i] >> r[i] >> x[i];     }     for (int i = 1; i <= m; i++) {       cur = 0;       for (int j = l[i]; j <= r[i]; j++)         if (a[j] < a[x[i]]) cur++;       if (l[i] + cur == x[i])         cout <<  Yes  << endl;       else         cout <<  No  << endl;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const long long INF = 1e18 + 7;   const long double EPS = 1e-8;   const long long MAXI = 20000;   const long long MOD = 16714589;   const long long MAXST = 2000000;   const long double PI = 3.14159265358979323;   ostream &operator<<(ostream &stream, const pair<long long, long long> &p) {     stream << p.first <<     << p.second <<    ;     return stream;   }   bool u[30];   signed main() {     {       ios_base::sync_with_stdio(0);       cin.tie(0);       cout << fixed << setprecision(10);       cerr << fixed << setprecision(10);     };     long long n, m;     cin >> m >> n;     for (long long i = 0; i < n; i++) {       cout << m <<   n ;       cout.flush();       long long x;       cin >> x;       if (x == 0 || x == -2)         exit(0);       else if (x == 1)         u[i] = true;       else         u[i] = false;     }     long long left = 1, right = m;     for (long long i = 0; left < right - 1; i++) {       long long mid = (left + right) / 2;       cout << mid <<   n ;       cout.flush();       long long x;       cin >> x;       if (x == 0 || x == -2) exit(0);       if (u[i % n]) {         if (x == 1)           right = mid;         else           left = mid;       } else {         if (x == 1)           left = mid;         else           right = mid;       }     }     cout << left <<   n ;     cout.flush();     long long x;     cin >> x;     if (x == 0 || x == -2) exit(0);     cout << right <<   n ;     cout.flush();     cin >> x;     if (x == 0 || x == -2) exit(0);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   bool asdfill[1100000];   int main() {     int n;     cin >> n;     int last_known;     for (int i = 0; i < (n); ++i) {       int a;       cin >> a;       asdfill[a] = true;       last_known = a;     }     double min_alpha = 10;     double max_alpha = 1e200;     int fills_done = 1;     for (int p = 1;; ++p) {       double alpha = (p * 10 + 10.0) / fills_done;       if (p <= last_known) {         if (asdfill[p]) {           max_alpha = min(max_alpha, alpha);           ++fills_done;         } else {           min_alpha = max(min_alpha, alpha);         }       } else {         if (max_alpha <= alpha + 1e-8) {           cout <<  unique n  << p;           exit(0);         } else if (min_alpha <= alpha - 1e-8) {           cout <<  not unique ;           exit(0);         }       }     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int MAXN = 5 * 100 * 1000 + 14;   vector<int> comp[MAXN], adj[MAXN];   set<int> res;   int ans = 0;   void dfs(int v) {     comp[ans].push_back(v);     auto it = res.begin();     while (it != res.end()) {       if (find(adj[v].begin(), adj[v].end(), *it) == adj[v].end()) {         int u = *it;         res.erase(u);         dfs(u);         it = res.upper_bound(u);       } else         it++;     }     return;   }   int main() {     ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);     int n, m;     cin >> n >> m;     while (m--) {       int u, v;       cin >> u >> v;       adj[v].push_back(u);       adj[u].push_back(v);     }     for (int i = 1; i <= n; i++) res.insert(i);     while (!res.empty()) {       int v = *res.begin();       res.erase(v);       ans++;       dfs(v);     }     cout << ans <<   n ;     for (int i = 1; i <= ans; i++) {       cout << comp[i].size() <<    ;       for (auto u : comp[i]) cout << u <<    ;       cout <<   n ;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     long long int n;     cin >> n;     vector<long long int> v;     for (int i = 0; i < n; i++) {       long long int x;       cin >> x;       v.push_back(x);     }     if (n > 1) {       cout <<  1 1  << endl;       cout << (long long int)(-1) * v[0] << endl;       cout <<  1   << n << endl;       cout <<  0  ;       for (int i = 1; i < n; i++) {         cout << (long long int)(-1) * n * v[i] <<    ;       }       cout << endl;       cout <<  2   << n << endl;       for (int i = 1; i < n; i++) {         cout << (long long int)(n - 1) * v[i] <<    ;       }       cout << endl;     } else {       cout <<  1 1  << endl;       cout << (-1) * v[0] << endl;       cout <<  1 1  << endl;       cout << 0 << endl;       cout <<  1 1  << endl;       cout << 0 << endl;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int LIM = 200100;   int main() {     ios_base::sync_with_stdio(false);     int n;     cin >> n;     vector<int> a(n);     int mini, maxi;     mini = 1e9 + 3;     maxi = 0;     for (auto &e : a) {       cin >> e;       mini = min(mini, e);       maxi = max(maxi, e);     }     cout << maxi - mini + 1 - n << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const double pi = acos(-1);   int n, d, arr[2001], mx;   long long ans, dp[2001][2];   vector<int> adj[2001];   void DFS(int u = 1, int p = -1) {     for (int i : adj[u])       if (i != p) DFS(i, u);     dp[u][arr[u] == mx] = 1;     dp[u][0] *= (arr[u] >= (mx - d)) && (arr[u] <= mx);     dp[u][1] *= (arr[u] >= (mx - d)) && (arr[u] <= mx);     for (int i : adj[u]) {       if (i == p) continue;       dp[u][1] =           ((dp[u][0] * dp[i][1]) % 1000000007 +            (dp[u][1] * ((dp[i][0] + dp[i][1] + 1) % 1000000007)) % 1000000007) %           1000000007;       dp[u][0] = (dp[u][0] * (dp[i][0] + 1)) % 1000000007;     }     ans += dp[u][1];     if (ans >= 1000000007) ans -= 1000000007;   }   int main() {     scanf( %d %d , &d, &n);     for (int i = 1; i <= n; i++) scanf( %d , arr + i);     for (int i = 1; i < n; i++) {       int u, v;       scanf( %d %d , &u, &v);       adj[u].push_back(v);       adj[v].push_back(u);     }     for (mx = 1; mx <= 2000; mx++) {       memset(dp, 0, sizeof dp);       DFS();     }     printf( %lld , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int INF = 1e9 + 10;   int n, a, b;   int main() {     cin >> n >> a >> b;     int table1_count = 0;     int table2_count = 0;     int one_two_count = 0;     int ans = 0;     for (int i = 0; i < n; i++) {       int t;       cin >> t;       if (t == 1) {         bool is_sit = false;         if (table1_count < a) {           table1_count++;           is_sit = true;         }         if (!is_sit) {           if (table2_count < b) {             table2_count++;             one_two_count++;             is_sit = true;           }         }         if (!is_sit) {           if (one_two_count > 0) {             one_two_count--;             is_sit = true;           }         }         if (!is_sit) {           ans++;         }       } else {         if (table2_count < b) {           table2_count++;         } else {           ans += 2;         }       }     }     cout << ans << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int n, m;     cin >> n >> m;     vector<bool> x;     vector<bool> y;     x.assign(n + 1, 1);     y.assign(n + 1, 1);     x[1] = 0;     y[1] = 0;     x[n] = 0;     y[n] = 0;     for (int i = 0; i < m; i++) {       int tmp_x, tmp_y;       scanf( %i %i , &tmp_x, &tmp_y);       x[tmp_x] = 0;       y[tmp_y] = 0;     }     int result = 0;     for (int i = 1; i <= n / 2; i++) {       if (i * 2 != n + 1) {         if (x[i] == 1) result++;         if (x[n - i + 1] == 1) result++;         if (y[i] == 1) result++;         if (y[n - i + 1] == 1) result++;       }     }     if (n % 2 == 1)       if ((x[n / 2 + 1] == 1) || (y[n / 2 + 1] == 1)) result++;     cout << result << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int iinf = 1e9 + 10;   const long long inf = 1ll << 60;   const long long mod = 1e9 + 7;   void GG() {     cout <<  Impossible n ;     exit(0);   }   long long mpow(long long a, long long n, long long mo = mod) {     long long re = 1;     while (n > 0) {       if (n & 1) re = re * a % mo;       a = a * a % mo;       n >>= 1;     }     return re;   }   long long inv(long long b, long long mo = mod) {     if (b == 1) return b;     return (mo - mo / b) * inv(mo % b, mo) % mo;   }   const int maxn = 1e6 + 5;   signed main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     ;     long long a, b;     cin >> a >> b;     vector<pair<long long, long long> > re;     while (a != 1 || b != 1) {       if (a == b) {         GG();       }       if (a > b) {         long long tk = (a - 1) / b;         re.push_back({tk, 0});         a -= tk * b;       } else {         long long tk = (b - 1) / a;         re.push_back({tk, 1});         b -= tk * a;       }     }     for (int i = 0; i < (int)re.size(); ++i) {       cout << re[i].first << (re[i].second ?  B  :  A );     }   }
#include <bits/stdc++.h>   using namespace std;   int n, k, ans, a[1000002], f[2002], team[1000002], tot;   bool vis1[2002], vis[2002];   int main() {     scanf( %d%d , &n, &k);     bool p1 = 0;     for (int i = 1; i <= k; i++) {       int x;       scanf( %d , &x), x -= n;       if (vis1[x + 1000]) continue;       vis1[x + 1000] = 1;       a[++tot] = x;     }     for (int i = 1; i <= tot; i++)       if (a[i] >= 0) {         p1 = 1;         break;       }     if (!p1) {       printf( %d , -1);       return 0;     }     int head = 1, tail = 1;     team[head] = 0;     bool p = 0;     vis[1000] = 1;     f[1000] = 0;     while (head <= tail) {       int x = team[head];       for (int i = 1; i <= tot; i++) {         if (!vis[1000 + x + a[i]] && x + a[i] <= 1000 && x + a[i] >= -1000) {           f[x + a[i] + 1000] = f[1000 + x] + 1;           vis[1000 + x + a[i]] = 1;           team[++tail] = x + a[i];         }         if (x + a[i] == 0) {           p = 1;           ans = f[1000 + x] + 1;           break;         }       }       if (p) break;       head++;     }     if (p)       printf( %d , ans);     else       printf( %d , -1);   }
#include <bits/stdc++.h>   using namespace std;   const int MX = 300002;   long long N;   int ans[MX], arr[MX], was[MX];   int take;   void f(int L, int R, int vL, int vR) {     if (L > R) return;     if (vL == vR) {       for (int i = L; i <= R; i++) {         ans[i] = vL;       }       return;     }     int mid = L + R, all = 0;     mid /= 2;     for (int i = 1; i <= N; i++) {       all++;       take++;       was[arr[i]] = take;       int now = 1;       while (i < N) {         if (was[arr[i + 1]] == take) {           i++;           continue;         }         if (now == mid) break;         now++;         was[arr[i + 1]] = take;         i += 1;       }     }     ans[mid] = all;     f(L, mid - 1, ans[mid], vR);     f(mid + 1, R, vL, ans[mid]);   }   int main() {     cin >> N;     for (int i = 1; i <= N; i++) {       cin >> arr[i];     }     f(1, N, 1, N);     for (int i = 1; i <= N; i++) cout << ans[i] <<    ;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int arr[100010];   int sieve[100010];   int main() {     int n, i, j, m, x, a, b, ans, q, flag = 0, cnt = 0;     scanf( %d , &n);     for (i = 2; i <= n; i++) {       if (!sieve[i]) {         for (j = i * i; j <= n; j += i) sieve[j] = 1;         for (j = i; j <= n; j = j * i) {           arr[cnt++] = j;         }       }     }     printf( %d n , cnt);     for (i = 0; i < cnt; i++) printf( %d  , arr[i]);     if (cnt) printf(  n );     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int maxn = 1e5 + 10;   int a, b, k, v;   bool check(int x) { return min(x * k, (x + b)) * v >= a ? true : false; }   int main() {     scanf( %d%d%d%d , &k, &a, &b, &v);     for (int i = 1; i <= 1000; i++) {       if (check(i)) {         printf( %d n , i);         return 0;       }     }   }
#include <bits/stdc++.h>   using namespace std;   void snum(long long &x) { scanf( %lld , &x); }   void snum(long long &x, long long &y) { scanf( %lld %lld , &x, &y); }   void snum(long long &x, long long &y, long long &z) {     scanf( %lld %lld %lld , &x, &y, &z);   }   vector<long long> adj[100100];   long long outDegree[100100];   long long out[100100];   bool vis[100100];   void dfs(long long u) {     vis[u] = true;     long long aux = 0;     for (long long i = 0; i < adj[u].size(); i++) {       long long v = adj[u][i];       if (!vis[v]) {         aux++;         dfs(v);       }     }     out[u] = outDegree[u] = aux;   }   long long n;   long long cant[100100];   long long need[100100];   void bfs() {     deque<long long> q;     for (long long i = 0; i < n; i++) {       if (outDegree[i] == 0) {         q.push_back(i);         cant[i]++;       }     }     while (!q.empty()) {       long long u = q.front();       q.pop_front();       for (long long i = 0; i < adj[u].size(); i++) {         long long v = adj[u][i];         outDegree[v]--;         if (outDegree[v] >= 0) {           cant[v] += cant[u];         }         if (outDegree[v] == 0) {           q.push_back(v);         }       }     }   }   void doit() {     snum(n);     for (long long i = 0; i < n - 1; i++) {       long long x;       snum(x);       x--;       adj[i + 1].push_back(x);       adj[x].push_back(i + 1);     }     dfs(0);     bfs();     for (long long i = 0; i < n; i++) {       need[cant[i]]++;     }     for (long long i = 1; i <= n; i++) {       long long x = need[i];       for (long long j = 0; j < x; j++) {         printf( %lld  , i);       }     }   }   int main() {     long long T = 1;     while (T--) {       doit();     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     stack<int> s;     int n;     cin >> n;     int max_ = 0;     for (int i = 0; i < n; i++) {       int a;       cin >> a;       max_ = max(max_, a);       if (s.empty()) {         s.push(a);       } else {         if (a == s.top()) {           s.pop();         } else if (a < s.top()) {           s.push(a);         } else           break;       }     }     if (s.size() == 0)       cout <<  YES ;     else if (s.size() > 1)       cout <<  NO ;     else {       if (max_ == s.top())         cout <<  YES ;       else         cout <<  NO ;     }   }
#include <bits/stdc++.h>   using namespace std;   long long int n, k, dp[2009][2009], cnt;   long long int solve(int pos, int mx) {     if (pos == k) return 1;     long long int &res = dp[pos][mx];     if (res != -1) return res;     res = 0;     int lim = mx;     if (lim == 0) lim = 1;     if (mx == 0) {       for (int i = lim; i <= n; i += lim) {         res += solve(pos + 1, i);         res %= 1000000007;       }     } else {       for (int i = lim; i <= n; i += lim) {         if (i % mx == 0) {           res += solve(pos + 1, i);           res %= 1000000007;         }       }     }     return res;   }   int main() {     cin >> n >> k;     memset(dp, -1, sizeof(dp));     long long int ans = solve(0, 0);     cout << ans << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int a, b, d;     char c;     cin >> a >> c >> b;     cin >> d;     for (int i = 1; i <= d; i++) {       b += 1;       if (b == 60) {         a++;         b = 0;       }       if (a == 24) {         a = 0;       }     }     if (a >= 0 && a < 10 && b >= 0 && b < 10) {       cout <<  0  << a << c <<  0  << b << endl;     } else if (a == 0 && b == 0) {       cout <<  00  << c <<  00  << endl;     } else if (b >= 0 && b < 10) {       cout << a << c <<  0  << b << endl;     } else if (a >= 0 && a < 10) {       cout <<  0  << a << c << b << endl;     } else {       cout << a << c << b << endl;     }   }
#include <bits/stdc++.h>   using namespace std;   const int maxn = 10;   char g[maxn][maxn];   long long dp[1 << maxn][1 << maxn];   int main() {     int n, mask1, mask2, i, j, m, k, a, b, count;     long long ans;     cin >> n >> m >> k;     for (i = 0; i < m; i++) {       cin >> a >> b;       a--;       b--;       g[a][b] = g[b][a] = 1;       dp[(1 << a) | (1 << b)][(1 << a) | (1 << b)] = 2;     }     for (mask1 = 0; mask1 < (1 << n); mask1++)       for (mask2 = mask1; mask2; mask2 = (mask1 & (mask2 - 1))) {         if (!dp[mask1][mask2]) continue;         count = 0;         for (i = 0; i < n; i++)           if (mask2 & (1 << i)) count++;         dp[mask1][mask2] /= count;         for (i = 0; i < n; i++)           if (mask1 & (1 << i))             for (j = 0; j < n; j++)               if (g[i][j] && !(mask1 & (1 << j))) {                 if (mask2 & (1 << i))                   dp[mask1 ^ (1 << j)][mask2 ^ (1 << i) ^ (1 << j)] +=                       dp[mask1][mask2];                 else                   dp[mask1 ^ (1 << j)][mask2 ^ (1 << j)] += dp[mask1][mask2];               }       }     ans = 0;     for (i = 0; i < (1 << n); i++) {       count = 0;       for (j = 0; j < n; j++)         if (i & (1 << j)) count++;       if (count == k) ans += dp[(1 << n) - 1][i];     }     cout << ans;   }
#include <bits/stdc++.h>   using namespace std;   const int N = 2e5 + 7, M = 20;   const double eps = 1e-10, pi = acos(-1.0);   double dis[N], op[N][M];   struct node {     long long x, y;   } e[N];   int n, k, f[N][M];   struct query {     double x, y;   } w[N];   inline int read() {     int num = 0;     char t =  + , g = getchar();     while (g < 48 || 57 < g) t = g, g = getchar();     while (47 < g && g < 58)       num = (num << 1) + (num << 3) + g - 48, g = getchar();     if (t ==  - ) return 0 - num;     return num;   }   inline bool cmp(query a, query b) {     if (a.y == b.y) return a.x < b.x;     return a.y < b.y;   }   inline int getdis(int u) {     for (int i = 0; i <= 18; i++)       if ((1 << i) & k) u = f[u][i];     return u;   }   inline double abst(double u, int x) {     if (x < 0) return 2 * pi - u;     return u;   }   inline bool check(double u) {     for (int i = 1; i <= n; i++)       if (u > dis[i]) return false;     memset(f, 0, sizeof(f));     for (int i = 1; i <= n; i++)       w[i].x = abst(acos(e[i].x / dis[i]), e[i].y) - acos(u / dis[i]),       w[i].y = abst(acos(e[i].x / dis[i]), e[i].y) + acos(u / dis[i]);     for (int i = 1; i <= n; i++) {       if (w[i].y >= pi * 2) w[i].y = w[i].y - 2 * pi, w[i].x = w[i].x - 2 * pi;     }     sort(w + 1, w + n + 1, cmp);     f[0][0] = 1;     for (int i = 1; i <= n; i++)       w[i + n].x = w[i].x + 2 * pi, w[i + n].y = w[i].y + 2 * pi;     for (int i = 1; i <= (n << 1); i++) {       f[i][0] = f[i - 1][0];       while (w[f[i][0]].x <= w[i].y && f[i][0] <= (n << 1)) f[i][0]++;     }     f[n << 1 | 1][0] = n << 1 | 1;     for (int x = 1; x <= 18; x++)       for (int i = 1; i <= (n << 1 | 1); i++) f[i][x] = f[f[i][x - 1]][x - 1];     for (int i = 1; i <= n; i++)       if (getdis(i) >= i + n) return true;     return false;   }   int main() {     n = read(), k = read();     double l = 0.00, r = 200000.00, ans = 0.00;     for (int i = 1; i <= n; i++) e[i].x = read(), e[i].y = read();     for (int i = 1; i <= n; i++)       dis[i] = sqrt(1.0 * e[i].x * e[i].x + 1.0 * e[i].y * e[i].y);     while (r - l > eps) {       double d = (l + r) / 2.0;       if (check(d))         ans = d, l = d;       else         r = d;     }     printf( %.7lf n , ans);   }