malteklaes/cpp-code-code_search_net-style huggingface dataset:
#include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     long long int n, m;     cin >> n >> m;     vector<long long int> v;     long long int s = (m + 1) / 2;     v.push_back(s);     long long int i = 1;     if (m % 2) {       while (1) {         if (s + i == m + 1) break;         if (s - i > 0) v.push_back(s - i);         v.push_back(s + i);         i++;       }     } else {       while (1) {         if (s + i == m + 1) break;         v.push_back(s + i);         if (s - i > 0) v.push_back(s - i);         i++;       }     }     i = 0;     while (i < n) {       cout << v[i] <<   n ;       v.push_back(v[i]);       i++;     }     return 0;   }
#include <bits/stdc++.h>   const int INF = 1 << 29;   int cmp(const void* a, const void* b);   long long maxv(long long a, long long b);   long long minv(long long a, long long b);   long long gcd(long long u, long long v);   int main() {     long long t = 1, i = 0;     while (t--) {       long long r, d, n;       scanf( %lld%lld%lld , &r, &d, &n);       long long ans = 0, x, y, cr;       for (long long i = 0; i < (n); i++) {         scanf( %lld%lld%lld , &x, &y, &cr);         if (x * x + y * y <= (r - cr) * (r - cr) && 2 * cr <= d &&             x * x + y * y >= (r - d + cr) * (r - d + cr))           ans++;       }       printf( %lld n , ans);     }   }   int cmp(const void* a, const void* b) {     if (*(long long*)a - *(long long*)b < 0) return -1;     if (*(long long*)a - *(long long*)b > 0) return 1;     return 0;   }   long long maxv(long long a, long long b) {     if (a > b) return a;     return b;   }   long long minv(long long a, long long b) {     if (a < b) return a;     return b;   }   long long gcd(long long u, long long v) {     if (v == 0) return u;     return gcd(v, u % v);   }
#include <bits/stdc++.h>   using namespace std;   int dx[] = {1, -1, 0, 0};   int dy[] = {0, 0, -1, 1};   void arquivo() {     freopen(  ,  r , stdin);     freopen(  ,  w , stdout);   }   const int N = 505050;   struct no {     int l, r;     int op;     no(){};     no(int a, int b, int c) {       op = a;       l = b;       r = c;     }   };   no vet[N];   int n, m, p;   char s[N];   inline void print() {     p = vet[0].r;     while (p != n + 1) {       printf( %c , vet[p].op == 1 ?  (  :  ) );       p = vet[p].r;     }     printf(  n );   }   inline void goRemove() {     int p1 = p;     int p2 = p;     int qtd = vet[p1].op;     while (qtd > 0) {       p2 = vet[p2].r;       qtd += vet[p2].op;     }     while (qtd < 0) {       p2 = vet[p2].l;       qtd += vet[p2].op;     }     int esq = min(p1, p2);     int dir = max(p1, p2);     esq = vet[esq].l;     dir = vet[dir].r;     vet[esq].r = dir;     vet[dir].l = esq;     if (dir != n + 1)       p = dir;     else       p = esq;   }   int main() {     scanf( %d %d %d , &n, &m, &p);     vet[0].r = 1;     vet[0].l = 0;     for (int i = 1; i <= n; ++i) {       char c;       scanf(  %c , &c);       if (c ==  ( )         vet[i] = no(1, i - 1, i + 1);       else         vet[i] = no(-1, i - 1, i + 1);     }     vet[n + 1].l = n;     vet[n + 1].r = n + 1;     scanf(  %s , s);     int len = strlen(s);     for (int i = 0; i < len; ++i) {       if (s[i] ==  L )         p = vet[p].l;       else if (s[i] ==  R )         p = vet[p].r;       else         goRemove();     }     print();     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int n, m;   long long f[305][305][5];   struct point {     int x, y;     point(int x = 0, int y = 0) : x(x), y(y) {}   } a[305];   struct edge {     int u, v;     double w;     edge(int u = 0, int v = 0, double w = 0) : u(u), v(v), w(w) {}     bool operator<(const edge b) const { return w < b.w; }   } s[305 * 305];   int read() {     char c = getchar();     int x = 0, s = 1;     while (!isdigit(c)) {       if (c ==  - ) s = -1;       c = getchar();     }     while (isdigit(c)) {       x = (x << 3) + (x << 1) + c -  0 ;       c = getchar();     }     return x * s;   }   int main() {     n = read();     for (int i = 1; i <= n; ++i) {       a[i].x = read();       a[i].y = read();     }     for (int i = 1; i <= n; ++i)       for (int j = 1; j <= n; ++j)         if (i != j) s[++m] = edge(i, j, atan2(a[i].y - a[j].y, a[i].x - a[j].x));     sort(s + 1, s + m + 1);     for (int i = 1; i <= m; ++i) {       int u = s[i].u, v = s[i].v;       f[u][v][0] = 1;       for (int k = 1; k <= 4; ++k)         for (int j = 1; j <= n; ++j) f[j][v][k] += f[j][u][k - 1];     }     long long ans = 0;     for (int i = 1; i <= n; ++i) ans += f[i][i][4];     printf( %I64d n , ans);   }
#include <bits/stdc++.h>   using namespace std;   int in[30];   int out[1050000][2];   int oc;   int n;   int pre[30];   int cnt[30][2];   inline int cntf(int np, int b) {     if (cnt[np][b] != -1) return cnt[np][b];     if (np == n) return cnt[np][b] = 0;     if (!b)       return cnt[np][b] = cntf(pre[np] + 1, b) * 2 + (pre[np] - np + 1);     else {       int w1 = cntf(np + 1, 0) * 2 + 1;       int w2 = cntf(pre[np] + 1, 0) * 2 + cntf(pre[np] + 1, 1) +                (pre[np] - np + 1) * 2;       return cnt[np][b] = min(w1, w2);     }   }   inline void move(int a, int b, int c, bool base, int np) {     if (np == n) return;     if (base) {       int d1 = cntf(np, 1);       int d2 = cntf(np + 1, 0) * 2 + 1;       if (d1 == d2) {         move(a, c, b, false, np + 1);         out[oc][0] = a;         out[oc][1] = b;         oc++;         move(c, b, a, false, np + 1);       } else {         move(a, b, c, false, pre[np] + 1);         for (int i = np; i <= pre[np]; i++) {           out[oc][0] = a;           out[oc][1] = c;           oc++;         }         move(b, a, c, false, pre[np] + 1);         for (int i = np; i <= pre[np]; i++) {           out[oc][0] = c;           out[oc][1] = b;           oc++;         }         move(a, b, c, true, pre[np] + 1);       }     } else {       move(a, c, b, false, pre[np] + 1);       for (int i = np; i <= pre[np]; i++) {         out[oc][0] = a;         out[oc][1] = b;         oc++;       }       move(c, b, a, false, pre[np] + 1);     }   }   int main() {     int i;     scanf( %d , &n);     for (i = 0; i < n; i++) {       scanf( %d , &in[i]);     }     pre[n - 1] = n - 1;     for (i = n - 2; i >= 0; i--) {       if (in[i] == in[i + 1])         pre[i] = pre[i + 1];       else         pre[i] = i;     }     memset(cnt, -1, sizeof(cnt));     oc = 0;     move(1, 3, 2, true, 0);     printf( %d n , oc);     for (i = 0; i < oc; i++) printf( %d %d n , out[i][0], out[i][1]);   }
#include <bits/stdc++.h>   using namespace std;   using std::bitset;   const double Pi = acos(-1);   inline long long read() {     long long x = 0;     bool fu = 0;     char ch = 0;     while (ch >  9  || ch <  0 ) {       ch = getchar();       if (ch ==  - ) fu = 1;     }     while (ch <=  9  && ch >=  0 ) x = (x * 10 - 48 + ch), ch = getchar();     return fu ? -x : x;   }   long long n, mod, w[100002], q, l, r;   map<long long, long long> phi;   inline long long go(long long num) {     long long rt = num;     for (long long i = 2; i * i <= num; i++) {       if (num % i == 0) rt = rt * (i - 1) / i;       while (num % i == 0) num /= i;     }     if (num > 1) rt = rt * (num - 1) / num;     return rt;   }   inline long long pw(long long x, long long p, long long mod) {     bool flag = 0;     long long rt = 1;     while (p) {       if (p & 1) {         if (rt * x >= mod) flag = 1;         rt = rt * x % mod;       }       if (x * x >= mod) flag = 1;       x = x * x % mod, p >>= 1;     }     return rt + flag * mod;   }   inline long long dfs(long long pos, long long mod) {     if (pos > r || mod == 1) return 1;     return pw(w[pos], dfs(pos + 1, phi[mod]), mod);   }   signed main() {     cin >> n >> mod;     l = mod;     phi[1] = 1;     while (l > 1) phi[l] = go(l), l = phi[l];     for (register long long i = 1, iend = n; i <= iend; ++i) w[i] = read();     cin >> q;     while (q--) {       l = read(), r = read();       cout << dfs(l, mod) % mod <<   n ;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const long long INF = 1e18;   const int maxn = 200;   long long x, y, l, r;   void solve() {     set<long long> a, b, S;     a.insert(1);     b.insert(1);     long long base = x;     while (base <= INF) {       a.insert(base);       if (INF / base < x || x == 1) break;       base *= x;     }     base = y;     while (base <= INF) {       b.insert(base);       if (INF / base < y || y == 1) break;       base *= y;     }     for (auto i : a)       for (auto j : b)         if (i + j <= r && i + j >= l) S.insert(i + j);     S.insert(r + 1);     long long pre = l - 1;     long long ans = 0;     for (auto z : S) {       ans = max(ans, z - pre - 1);       pre = z;     }     cout << ans << endl;   }   int main() {     ios::sync_with_stdio(false);     while (cin >> x >> y >> l >> r) solve();     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     string s;     int m;     int a[100005] = {0};     int b[100005] = {0};     cin >> s;     s =     + s;     cin >> m;     for (int i = 1; i <= s.length(); i++) {       if (s[i] == s[i + 1]) a[i] = 1;     }     for (int i = 1; i <= s.length(); i++) {       b[i] = b[i - 1] + a[i];     }     while (m--) {       int l, r, flag = 0;       cin >> l >> r;       flag = b[r - 1] - b[l - 1];       cout << flag << endl;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   void test_case() {     int n, i, cnt;     cin >> n;     string str;     cin >> str;     cnt = 0;     vector<int> c(n + 5, 0);     vector<int> flag(n + 5, 0);     int fl = 0;     for (i = n - 1; i >= 0; i--) {       if (str[i] ==  ( )         cnt++;       else         cnt--;       c[i] = cnt;       if (cnt > 0) fl = 1;       flag[i] = fl;     }     cnt = 0;     int ans = 0;     fl = 0;     for (i = 0; i < n; i++) {       if (fl == 0 && str[i] ==  )  && cnt + 1 == -c[i + 1] && cnt + 1 >= 0 &&           flag[i + 1] == 0) {         ans++;       } else if (fl == 0 && str[i] ==  (  && cnt - 1 == -c[i + 1] &&                  cnt - 1 >= 0 && flag[i + 1] == 0) {         ans++;       }       if (str[i] ==  ( )         cnt++;       else if (str[i] ==  ) )         cnt--;       if (cnt < 0) fl = 1;     }     cout << ans <<   n ;     return;   }   signed main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     ;     int t;     t = 1;     while (t--) {       test_case();     }   }
#include <bits/stdc++.h>   using namespace std;   const int maxn = 2000 + 4;   char s[maxn];   int a[maxn];   void get(bitset<maxn> &B) {     scanf( %s , s);     int m = strlen(s);     int x = 1, y = -1;     for (int i = 0; i < m; i++) a[m - 1 - i] = s[i] -  0 ;     m--;     x += m + y;     ++x;     for (int i = 0; i < maxn && x >= 0; i++) {       int rem = 0;       for (int j = m; j >= 0; j--) a[j] += rem * 10, rem = (a[j] & 1), a[j] >>= 1;       B[i] = rem;       while (m >= 0 && !a[m]) m--;       x = m;     }   }   int pos[maxn];   bitset<maxn> b[maxn], st[maxn];   int main() {     if (fopen( in ,  r )) {       freopen( in ,  r , stdin);       freopen( out ,  w , stdout);     }     memset(pos, -1, sizeof(pos));     int n;     scanf( %d , &n);     for (int i = 0; i < n; i++) {       get(b[i]);       st[i][i] = 1;       bool ok = 1;       for (int j = 0; j < maxn; j++)         if (b[i][j]) {           if (pos[j] == -1) {             ok = 0;             pos[j] = i;             break;           }           b[i] ^= b[pos[j]];           st[i] ^= st[pos[j]];         }       if (!ok) {         printf( 0 n );         continue;       }       st[i][i] = 0;       printf( %d , st[i].count());       for (int j = 0; j < maxn; j++)         if (st[i][j]) printf(  %d , j);       printf(  n );     }   }
#include <bits/stdc++.h>   using namespace std;   ifstream fin;   ofstream fout;   FILE *outt, *inn;   const int N = 100009, M = 70;   int k, b[M], d[M], k2, y, yy;   unsigned long long m, c[M][M], l, r, cur;   void find() {     for (int i = 0; i <= 64; i++) {       for (int j = 0; j <= 64; j++) {         if (i == 0) {           c[i][j] = 1;           continue;         }         if (i > j) continue;         c[i][j] = c[i - 1][j - 1] + c[i][j - 1];       }     }   }   int cnt;   bool is;   void binary(unsigned long long x) {     memset(b, 0, sizeof(b));     is = 0;     cnt = 69;     while (x > 0) {       b[--cnt] = x % 2;       x /= 2;     }     b[0] = cnt;     for (int i = b[0] + 1; i <= 68; i++) {       if (b[i]) {         return;       }     }     is = 1;   }   unsigned long long solve(unsigned long long x) {     cur = 0;     binary(2 * x);     k2 = k - 1;     for (int i = b[0] + 1; i <= 68; i++) {       if (b[i] == 1) {         y = 68 - i;         cur += c[k2][y];         k2--;       }       if (k2 == 0) {         for (int j = i + 1; j <= 68; j++) {           if (b[j]) {             cur++;             break;           }         }         break;       }     }     k2 = 0;     for (int i = b[0]; i <= 68; i++) {       if (b[i]) k2++;     }     if (k2 == k) cur++;     binary(x + 1);     if (!is) {       k2 = k - 1;       for (int i = b[0] + 1; i <= 68; i++) {         if (b[i] == 0) {           cur += c[k2 - 1][68 - i];         }         if (b[i] == 1) {           k2--;         }         if (k2 == 0) {           break;         }       }       k2 = 0;       for (int i = b[0]; i <= 68; i++) {         if (b[i]) k2++;       }       if (k2 == k) cur++;     }     return cur;   }   int main() {     memset(c, 0, sizeof(c));     find();     cin >> m >> k;     r = (unsigned long long)1;     while (solve(r) < m) {       r *= 2;     }     l = r / 2 + 1;     while (l < r) {       unsigned long long mid = (l + r) / 2;       unsigned long long res = solve(mid);       if (res < m) {         l = mid + 1;       } else if (res > m) {         r = mid - 1;       } else {         cout << mid;         return 0;       }     }     cout << l;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   map<pair<int, int>, int> ord;   vector<pair<int, int> > edges;   vector<int> adj[200000];   int n;   int main() {     cin >> n;     cout << n - 1 << endl;     for (int i = 1; i < n; i++) {       int a, b;       cin >> a >> b;       edges.push_back(make_pair(a, b));       ord[make_pair(a, b)] = ord[make_pair(b, a)] = i;       adj[a].push_back(b);       adj[b].push_back(a);       cout <<  2   << a <<     << b << endl;     }     for (int i = 1; i <= n; i++)       for (int j = 0; j < adj[i].size() - 1; j++)         cout << ord[make_pair(i, adj[i][j])] <<                  << ord[make_pair(i, adj[i][j + 1])] << endl;   }
#include <bits/stdc++.h>   using namespace std;   int Max[100010 * 4], Min[100010 * 4];   int dp_Min[100010 * 4];   int a[100010];   int dp[100010];   int ql, qr, val;   void build(int l, int r, int o) {     if (l == r) {       Max[o] = Min[o] = a[l];       return;     }     int mid = l + (r - l) / 2;     build(l, mid, o * 2);     build(mid + 1, r, o * 2 + 1);     Max[o] = max(Max[o * 2], Max[o * 2 + 1]);     Min[o] = min(Min[o * 2], Min[o * 2 + 1]);   }   int query_max(int l, int r, int o) {     if (ql <= l && qr >= r) {       return Max[o];     }     int mid = l + (r - l) / 2;     int ans = -0x3f3f3f3f;     if (ql <= mid) ans = max(ans, query_max(l, mid, o * 2));     if (qr > mid) ans = max(ans, query_max(mid + 1, r, o * 2 + 1));     return ans;   }   int query_min(int l, int r, int o) {     if (ql <= l && qr >= r) {       return Min[o];     }     int mid = l + (r - l) / 2;     int ans = 0x3f3f3f3f;     if (ql <= mid) ans = min(ans, query_min(l, mid, o * 2));     if (qr > mid) ans = min(ans, query_min(mid + 1, r, o * 2 + 1));     return ans;   }   int query2(int l, int r, int o) {     if (ql <= l && qr >= r) {       return dp_Min[o];     }     int mid = l + (r - l) / 2;     int ans = 0x3f3f3f3f;     if (ql <= mid) ans = min(ans, query2(l, mid, o * 2));     if (qr > mid) ans = min(ans, query2(mid + 1, r, o * 2 + 1));     return ans;   }   void update(int l, int r, int o) {     if (l == r) {       dp_Min[o] = val;       return;     }     int mid = l + (r - l) / 2;     if (ql <= mid)       update(l, mid, o * 2);     else       update(mid + 1, r, o * 2 + 1);     dp_Min[o] = min(dp_Min[o * 2], dp_Min[o * 2 + 1]);   }   int main() {     int n, s, l;     scanf( %d%d%d , &n, &s, &l);     for (int i = 1; i <= n; i++) {       scanf( %d , &a[i]);     }     build(1, n, 1);     memset(dp_Min, 0x3f3f3f3f, sizeof(dp_Min));     for (int i = 1; i < l; i++) dp[i] = 0x3f3f3f3f;     for (int i = l; i <= n; i++) {       int x = 1, y = i - l + 2;       while (x < y) {         int mid = x + (y - x) / 2;         ql = mid, qr = i;         int val = query_max(1, n, 1) - query_min(1, n, 1);         if (val > s)           x = mid + 1;         else           y = mid;       }       if (x == i - l + 2) {         dp[i] = 0x3f3f3f3f;         continue;       }       ql = x - 1, qr = i - l;       if (ql <= qr && qr)         dp[i] = query2(1, n, 1) + 1;       else         dp[i] = 0x3f3f3f3f;       if (x - 1 == 0) dp[i] = 1;       val = dp[i];       ql = i;       update(1, n, 1);     }     printf( %d n , dp[n] >= 0x3f3f3f3f ? -1 : dp[n]);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int a[100010];     int b[100010];     while (scanf( %d , &a[0]) != EOF) {       getchar();       int n = 1;       while (scanf( %d , &a[n]) != EOF) {         n++;         getchar();       }       sort(a, a + n);       a[n] = 9999999;       int h = 0;       for (int i = 0; i < n; i++) {         if (i == 0) {           b[h++] = a[i];         } else if (a[i] != a[i - 1]) {           b[h++] = a[i];         }       }       b[h] = 99999;       int p = b[0];       int q = b[0];       int flag = 0;       int ff = 0;       for (int i = 1; i <= h; i++) {         if (b[i] == b[i - 1] + 1) {           p = b[i];         } else if (b[i] != b[i - 1] + 1) {           ff = 1;           if (flag == 1) {             printf( , );           }           flag = 1;           if (p == q) {             printf( %d , p);           } else {             printf( %d-%d , q, p);           }           p = b[i];           q = b[i];         }       }       printf(  n );     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long a[1010];   int main() {     long long n, k, p;     int q;     scanf( %I64d%I64d%d , &n, &k, &q);     p = n - k;     for (int i = 0; i < q; i++) scanf( %I64d , a + i);     if (k == 0) {       for (int i = 0; i < q; i++) printf( . );       return 0;     }     for (int i = 0; i < q; i++) {       if (n % 2 == 0) {         if (k <= p) {           if (a[i] <= n - 2 * k)             printf( . );           else if (a[i] % 2 == 1)             printf( . );           else             printf( X );         } else {           if (a[i] > 2 * p)             printf( X );           else if (a[i] % 2 == 1)             printf( . );           else             printf( X );         }       } else {         if (p < k) {           if (a[i] <= 2 * p) {             if (a[i] % 2 == 1)               printf( . );             else               printf( X );           } else             printf( X );         } else {           if (a[i] == n)             printf( X );           else if (a[i] <= p - k + 1)             printf( . );           else if (a[i] % 2 == 1)             printf( . );           else             printf( X );         }       }     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const long double PI = 3.14159265358979323846;   const int MAXN = 1e5 + 3;   long long n, a, b, p, q;   bool isLeap(int a) {     if (a % 400 == 0) return true;     if (a % 4 == 0 && a % 100) return true;     return false;   }   void solve() {     int y;     cin >> y;     int cnt = 0;     bool f = 0;     if (isLeap(y)) f = 1;     y++;     bool isl = 0;     while (1) {       cnt += 365;       isl = isLeap(y);       if (isl) cnt++;       if (cnt % 7 == 0 && isl == f) break;       y++;     }     cout << y;   }   int main() {     solve();     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const long long mod1 = 1e9 + 7, mod = 998244353;   const long long N = 3e5 + 7;   long long ncr[N];   void fact(long long A) {     auto binexp = [&](long long a, long long b) {       long long res = 1;       while (b) {         if (b & 1) res *= a;         a *= a;         b >>= 1;         a %= mod;         res %= mod;       }       return res;     };     ncr[0] = 1;     for (long long i = 1; i <= A; i++)       ncr[i] = ncr[i - 1] * (A - i + 1) % mod * binexp(i, mod - 2) % mod;   }   void a_b_l() {     long long n;     cin >> n;     n <<= 1;     long long ar[n];     for (long long i = 0; i < n; i++) cin >> ar[i];     sort(ar, ar + n);     long long k = 0;     for (long long i = 0; i < n / 2; i++) {       k += ar[n - i - 1] - ar[i];       k %= mod;     }     fact(n);     long long ans = k * ncr[n / 2] % mod;     cout << ans <<   n ;   }   signed main() {     ios::sync_with_stdio(false);     cin.tie(0), cout.tie(0);     ;     long long t = 1;     while (t--) a_b_l();   }
#include <bits/stdc++.h>   using namespace std;   const double PAI = atan(1.0) * 4;   const double EPS = 1e-5;   int n;   double theta;   struct Point {     double x, y;     Point() {}     Point(double _x, double _y) : x(_x), y(_y) {}     Point operator+(const Point &r) const { return Point(x + r.x, y + r.y); }     Point operator-(const Point &r) const { return Point(x - r.x, y - r.y); }     Point operator*(double r) const { return Point(x * r, y * r); }     Point operator/(double r) const { return Point(x / r, y / r); }     Point rotate(double alpha) const {       double s = sin(alpha), c = cos(alpha);       return Point(x * c - y * s, x * s + y * c);     }     double lenght(const Point &r) const {       return sqrt((x - r.x) * (x - r.x) + (y - r.y) * (y - r.y));     }     Point cross_X(const Point &r) const {       double l = x - r.x;       l = l * r.y / (r.y - y);       return Point((x * r.y - y * r.x) / (r.y - y), 0);     }   } p[105];   bool same(double x, double y) { return ((x - y) <= EPS && (y - x) <= EPS); }   bool check() {     double l[105];     l[1] = p[1].lenght(p[n]);     for (int i = 2; i <= n; i++) l[i] = p[i].lenght(p[i - 1]);     for (int i = 1; i <= n; i++) {       if (p[i].x > 1000000 || p[i].x < -1000000) return false;       if (p[i].y > 1000000 || p[i].y < -1000000) return false;       if (l[i] > 1000 || l[i] < 1) return false;       for (int j = 1; j < i; j++)         if (same(l[i], l[j])) return false;     }     return true;   }   int main() {     ios::sync_with_stdio(false);     cin >> n;     if (n <= 4) {       cout <<  No solution  << endl;       return 0;     }     theta = 2 * PAI / n;     while (true) {       p[1] = Point(0, 0);       for (int i = 2; i <= n / 2; i++) {         p[i] = Point(2 * i, 0);         p[i] = p[i].rotate(theta * (i - 1)) + p[i - 1];       }       p[n / 2 + 1] = Point(900, 0);       p[n / 2 + 1] = p[n / 2 + 1].rotate(theta * (n / 2)) + p[n / 2];       for (int i = n / 2 + 2; i <= n; i++) {         p[i] = Point(2 * (i - n / 2) - 1, 0);         p[i] = p[i].rotate(theta * (i - 1)) + p[i - 1];       }       p[n] = p[n - 1].cross_X(p[n]);       if (check()) break;     }     for (int i = 1; i <= n; i++) printf( %lf %lf n , p[i].x, p[i].y);     return 0;   }