malteklaes/cpp-code-code_search_net-style huggingface dataset:
#include <bits/stdc++.h>   #pragma comment(linker,  /stack:200000000 ]   #pragma GCC optimize( Ofast ]   #pragma GCC target( sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native ]   using namespace std;   long long int n, k;   map<vector<pair<long long int, long long int>>, long long int> mp;   vector<pair<long long int, long long int>> get(long long int num) {     vector<pair<long long int, long long int>> pr;     for (long long int i = 2; i * i <= num; i++) {       long long int cnt = 0;       while (num % i == 0) {         cnt++;         num /= i;       }       if (cnt % k > 0) pr.push_back({i, cnt % k});     }     if (num > 1) {       pr.push_back({num, 1});       num /= num;     }     sort(pr.begin(), pr.end());     return pr;   }   signed main() {     cin >> n >> k;     vector<long long int> a(n);     for (long long int i = 0; i < n; i++) cin >> a[i];     mp[get(a[0])]++;     long long int ans = 0;     for (long long int i = 1; i < n; i++) {       long long int num = a[i];       auto pr = get(num);       vector<pair<long long int, long long int>> pr2;       for (auto& i : pr) {         if ((k - i.second) % k > 0) pr2.push_back({i.first, k - i.second});       }       ans += mp[pr2];       mp[pr]++;     }     cout << ans;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   vector<vector<int> > g;   bool flag[100003];   int down[100003];   int max1[100003];   int max2[100003];   int up[100003];   void dfs(int x) {     flag[x] = true;     int i;     for (i = 0; i < g[x].size(); i++) {       if (!flag[g[x][i]]) {         dfs(g[x][i]);         if (down[g[x][i]] + 1 > max1[x]) {           max2[x] = max1[x];           max1[x] = down[g[x][i]] + 1;         } else if (down[g[x][i]] + 1 > max2[x])           max2[x] = down[g[x][i]] + 1;       }     }     down[x] = max1[x];   }   void dfs2(int x) {     flag[x] = true;     int i;     int res;     for (i = 0; i < g[x].size(); i++) {       if (!flag[g[x][i]]) {         if (down[g[x][i]] + 1 > max1[x] - 1)           res = max2[x];         else           res = max1[x];         up[g[x][i]] = max(up[x] + 1, res + 1);         dfs2(g[x][i]);       }     }   }   int n, m, d;   int main() {     scanf( %d %d %d , &n, &m, &d);     g.resize(n);     int x, y;     int i;     for (i = 0; i < n; i++) max1[i] = max2[i] = up[i] = down[i] = -2000000000;     for (i = 0; i < m; i++) {       scanf( %d , &x);       x--;       down[x] = 0;       up[x] = 0;       max1[x] = 0;     }     for (i = 0; i < n - 1; i++) {       scanf( %d %d , &x, &y);       x--;       y--;       g[x].push_back(y);       g[y].push_back(x);     }     dfs(0);     for (i = 0; i < n; i++) flag[i] = false;     dfs2(0);     int ans = 0;     for (i = 0; i < n; i++)       if (down[i] < d + 1 && up[i] < d + 1) ans++;     printf( %d n , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int n, flag = 0;   int matrix[2505][2505];   int parent[2505];   vector<int> graph[2505];   int vis[2505], num[2505];   struct Edge {     int u, v, w;     Edge() {}     Edge(int u, int v, int w) : u(u), v(v), w(w) {}   };   vector<Edge> edge;   bool cmp(const Edge &a, const Edge &b) { return a.w < b.w; }   void init() {     for (int i = 1; i <= 2505; i++) parent[i] = i;   }   void input() {     for (int i = 1; i <= n; i++) {       for (int j = 1; j <= n; j++) {         scanf( %d , &matrix[i][j]);         if (i == j && matrix[i][j] != 0) flag = 1;         if (i > j && matrix[i][j] != matrix[j][i]) flag = 1;         if (i < j) edge.push_back(Edge(i, j, matrix[i][j]));       }     }   }   int findfather(int x) {     if (x == parent[x]) return x;     return parent[x] = findfather(parent[x]);   }   void Union(int x, int y) {     int rx = findfather(x);     int ry = findfather(y);     if (rx > ry) swap(rx, ry);     if (rx != ry) parent[ry] = rx;   }   void Krukal() {     sort(edge.begin(), edge.end(), cmp);     int cnt = 0;     for (int i = 0; i < edge.size(); i++) {       int u = edge[i].u;       int v = edge[i].v;       int ru = findfather(u);       int rv = findfather(v);       if (ru != rv) {         graph[u].push_back(v);         graph[v].push_back(u);         cnt++;         Union(u, v);       }       if (cnt == n - 1) break;     }   }   void dfs(int u, int fa, int tmp) {     vis[u] = 1;     for (int i = 0; i < graph[u].size(); i++) {       int k = graph[u][i];       if (vis[k]) continue;       if (k == fa) continue;       num[k] = max(tmp, matrix[u][k]);       dfs(k, u, num[k]);     }   }   int main() {     scanf( %d , &n);     init();     input();     if (flag) {       printf( NOT MAGIC n );       return 0;     }     Krukal();     for (int i = 1; i <= n; i++) {       memset(vis, 0, sizeof(vis));       dfs(i, -1, 0);       for (int j = i + 1; j <= n; j++) {         if (num[j] != matrix[i][j]) {           flag = 1;           break;         }       }       if (flag) break;     }     if (flag)       printf( NOT MAGIC n );     else       printf( MAGIC n );     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int already = 0;     int n, k;     cin >> n >> k;     int ans = 0;     for (int i = 0; i < k; ++i) {       int cnt;       cin >> cnt;       int first;       cin >> first;       if (first == 1) {         int good = 1;         already = 1;         --ans;         while (good < cnt) {           cin >> first;           if (first == good + 1) {             ++good;             already = good;             --ans;           } else {             ++good;             break;           }         }         ans += cnt;         while (good < cnt) {           cin >> first;           ++good;         }       } else {         ans += (cnt - 1);         for (int j = 1; j < cnt; ++j) cin >> first;       }     }     ans += (n - already);     cout << ans;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long t, x, y, p, q;   bool check(long long mid) {     long long pp = p * mid;     long long qq = q * mid;     if (pp - x < 0 || qq - y < 0) return false;     return (pp - x <= qq - y);   }   int main() {     scanf( %lld , &t);     while (t--) {       scanf( %lld %lld %lld %lld , &x, &y, &p, &q);       if (x * q == p * y) {         printf( 0 n );         continue;       }       long long lo = 1, hi = 2000000000;       while (lo + 1 < hi) {         long long mid = (lo + hi) / 2LL;         if (check(mid))           hi = mid;         else           lo = mid;       }       if (check(lo)) hi = lo;       if (check(hi))         printf( %lld n , hi * q - y);       else         printf( -1 n );     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int t, i, x;     cin >> t;     while (t--) {       int angle;       cin >> angle;       x = 360 % (180 - angle);       if (x == 0) {         cout <<  YES  << endl;       } else         cout <<  NO  << endl;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long M = 1e9 + 7;   const int N = 3e5 + 7;   const int K = 5e3 + 7;   int n, k;   int a[N];   int dp[K][K];   int main() {     scanf( %d%d , &n, &k);     for (int i = 1; i <= n; i++) scanf( %d , &a[i]);     sort(a + 1, a + n + 1);     int top = (n + k - 1) / k;     int low = n / k;     int ctop = n % k;     int clow = k - ctop;     for (int i = 0; i < K; i++)       for (int j = 0; j < K; j++) dp[i][j] = -1;     dp[0][0] = 0;     for (int i = 0; i <= ctop; i++)       for (int j = 0; j <= clow; j++)         if (i || j) {           dp[i][j] = 2e9 + 7;           int pnt = i * top + j * low;           if (j) dp[i][j] = dp[i][j - 1] + a[pnt] - a[pnt - low + 1];           if (i)             dp[i][j] = min(dp[i][j], dp[i - 1][j] + a[pnt] - a[pnt - top + 1]);         }     cout << dp[ctop][clow];     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int h1, t1, h2, t2, ansh, anst;     scanf( %2d:%2d , &h1, &t1);     scanf( %2d:%2d , &h2, &t2);     if (t1 < t2) {       h1--, t1 += 60;     }     anst = t1 - t2;     ansh = h1 - h2;     if (ansh < 0) ansh += 24;     printf( %02d:%02d n , ansh, anst);     return 0;   }
#include <bits/stdc++.h>   int n;   int a[105], l[105];   int id[105];   int dp[105][105][2];   int main() {     scanf( %d , &n);     for (int i = 0; i < (int)(n); ++i) scanf( %d %d , &a[i], &l[i]);     for (int i = 0; i < (int)(n); ++i) id[i] = i;     std::sort(id, id + n, [&](int x, int y) { return a[x] < a[y]; });     dp[0][0][0] = 0;     for (int i = 0; i < (int)(n); ++i) {       for (int j = 0; j < (int)(i + 1); ++j) {         for (int k = 0; k < (int)(2); ++k) {           int mj = -1, mk = -1;           for (int nj = i; nj < n; ++nj) {             for (int nk = 0; nk < (int)(2); ++nk) {               if (mj == -1 ||                   a[id[mj]] + mk * l[id[mj]] < a[id[nj]] + nk * l[id[nj]])                 mj = nj, mk = nk;               dp[nj + 1][mj + 1][mk] = std::max(                   dp[nj + 1][mj + 1][mk],                   dp[i][j][k] + a[id[mj]] + mk * l[id[mj]] -                       std::max(                           (j ? a[id[j - 1]] + k * l[id[j - 1]] : -0x3f3f3f3f),                           a[id[nj]] - (!nk) * l[id[nj]]));             }           }         }       }     }     int ans = 0;     for (int j = 0; j < (int)(n + 1); ++j)       for (int k = 0; k < (int)(2); ++k) {         ans = std::max(ans, dp[n][j][k]);       }     printf( %d n , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int MAX = 111, K = 26;   int n;   string name[MAX];   namespace G {   struct V : vector<int> {     V() : odw(false) {}     bool odw;     int wyj;   };   V g[K];   void krawedz(char a, char b) {     g[int(a) - int( a )].push_back(int(b) - int( a ));   }   int t = 0;   stack<int> stos;   void dfs(int v) {     g[v].odw = true;     for (int i = 0; i < ((int((g[v]).size()))); i++) {       int u = g[v][i];       if (!g[u].odw) dfs(u);     }     stos.push(v);     g[v].wyj = t++;   }   bool poprawne_sortowanie() {     for (int v = 0; v < (K); v++)       for (int i = 0; i < ((int((g[v]).size()))); i++) {         int u = g[v][i];         if (g[v].wyj < g[u].wyj) return false;       }     return true;   }   bool sortowanie_topologiczne() {     for (int i = 0; i < (K); i++)       if (!g[i].odw) dfs(i);     return poprawne_sortowanie();   }   void wypisz_sortowanie() {     assert((int((stos).size())) == 26);     while (!stos.empty()) {       cout << char(int( a ) + stos.top());       stos.pop();     }     cout <<   n ;   }   }  // namespace G   void wczytaj_dane() {     cin >> n;     for (int i = 0; i < (n); i++) cin >> name[i];   }   int roznica(const string& a, const string& b) {     int m = min((int((a).size())), (int((b).size())));     for (int i = 0; i < (m); i++)       if (a[i] != b[i]) return i;     return -1;   }   bool porownuj(const string& a, const string& b) {     int i = roznica(a, b);     if (i == -1) return (int((a).size())) < (int((b).size()));     G::krawedz(a[i], b[i]);     return true;   }   void zrob_test() {     wczytaj_dane();     for (int i = 0; i < (n - 1); i++)       if (!porownuj(name[i], name[i + 1])) {         cout <<  Impossible n ;         return;       }     if (G::sortowanie_topologiczne())       G::wypisz_sortowanie();     else       cout <<  Impossible n ;   }   int main() {     ios_base::sync_with_stdio(0);     zrob_test();     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long Pow(int a, int b) {     long long ans = 1;     for (int i = 0; i < b; i++) {       ans = (ans * a) % 1000000007;     }     return ans;   }   int main() {     long long n, k;     cin >> n >> k;     cout << (Pow(n - k, n - k) * Pow(k, k - 1)) % 1000000007 << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   vector<int> v[200005];   int CR, n, k, sz[200005], target[200005], cented[200005];   void getsize(int now, int pre) {     sz[now] = (target[now] == 1);     for (int i = 0; i < v[now].size(); i++) {       int next = v[now][i];       if (next == pre || cented[next]) continue;       getsize(next, now);       sz[now] += sz[next];     }   }   int getcent(int now, int pre, int R) {     for (int i = 0; i < v[now].size(); i++) {       int next = v[now][i];       if (next == pre || cented[next]) continue;       if (sz[next] > sz[R] / 2) return getcent(next, now, R);     }     return now;   }   priority_queue<pair<int, int> > pq;   int centdfs(int now) {     getsize(now, -1);     int cc = getcent(now, -1, now);     cented[cc] = 1;     if (CR == -1) CR = cc;     return cc;   }   int gcnt = 0;   vector<int> tmp[200005];   void go(int now, int pre) {     if (target[now]) tmp[gcnt].push_back(now);     for (int i = 0; i < v[now].size(); i++) {       int next = v[now][i];       if (next == pre) continue;       go(next, now);     }   }   int main() {     CR = -1;     scanf( %d %d , &n, &k);     for (int a, b, i = 0; i < n - 1; i++) {       scanf( %d %d , &a, &b);       v[a].push_back(b);       v[b].push_back(a);     }     for (int i = 1; i <= k; i++) {       for (int t, j = 0; j < 2; j++) {         scanf( %d , &t);         target[t] = 1;       }     }     centdfs(1);     printf( 1 n%d n , CR);     for (int i = 0; i < v[CR].size(); i++) {       ++gcnt;       go(v[CR][i], CR);       if (tmp[gcnt].empty()) continue;       pq.push(make_pair((int)tmp[gcnt].size(), gcnt));     }     while (!pq.empty()) {       pair<int, int> p = pq.top();       pq.pop();       if ((int)pq.size() == 0) {         printf( %d %d %d n , tmp[p.second].back(), CR, CR);         break;       }       pair<int, int> p2 = pq.top();       pq.pop();       printf( %d %d %d n , tmp[p.second].back(), tmp[p2.second].back(), CR);       tmp[p.second].pop_back();       tmp[p2.second].pop_back();       if (--p.first != 0) {         pq.push(p);       }       if (--p2.first != 0) {         pq.push(p2);       }     }   }
#include <bits/stdc++.h>   using namespace std;   const int MAX = 100005;   vector<int> A, B[MAX], C, D;   int visited[MAX];   int n, m;   void DFS(int u) {     visited[u] = 1;     C.push_back(u);     for (int i = 0; i < B[u].size(); i++) {       int current = B[u][i];       if (visited[current] == 0) DFS(current);     }   }   int main() {     int n;     scanf( %d , &n);     A.clear();     for (int i = 0; i <= n; i++) visited[i] = 0;     string s;     for (int i = 0; i < n; i += 1) {       int val;       cin >> val;       A.push_back(val);     }     for (int i = 0; i < MAX; i++) B[i].clear();     for (int i = 0; i < n; i++) {       cin >> s;       for (int j = 0; j < n; j++) {         if (s[j] ==  1 ) {           B[i + 1].push_back(j + 1);           B[j + 1].push_back(i + 1);         }       }     }     for (int i = 1; i <= n; i++) {       C.clear();       D.clear();       if (visited[i] == 0) {         DFS(i);         for (int j = 0; j < C.size(); j++) {           D.push_back(A[C[j] - 1]);         }         sort(C.begin(), C.end());         sort(D.begin(), D.end());         for (int j = 0; j < C.size(); j++) {           A[C[j] - 1] = D[j];         }       }     }     for (int i = 0; i < A.size(); i++) printf( %d  , A[i]);     printf(  n );     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int n, m, s, ans = 0, f[2 * 200005];   inline int find(int x) { return f[x] == x ? x : f[x] = find(f[x]); }   int main() {     scanf( %d%d%d , &n, &m, &s);     for (register int i = 1; i <= m + n; i++) f[i] = i;     for (register int i = 1; i <= s; i++) {       register int a, b;       scanf( %d%d , &a, &b), b += n;       f[find(b)] = find(a);     }     for (register int i = 1; i <= n + m; i++)       if (f[i] == i) ans++;     printf( %d , ans - 1);     return 0;   }
#include <bits/stdc++.h>   #pragma GCC optimize(3,  Ofast ,  inline )   const double eps = 1e-7;   const int maxn = 3e5 + 10;   const int prime[15] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37};   const int dir[4][2] = {1, 0, -1, 0, 0, 1, 0, -1};   int spgcd(int a, int b) {     while (b ^= a ^= b ^= a %= b)       ;     return a;   }   inline int mul(int a, int b, int p) { return (long long)a * b % p; }   template <typename T>   void scan(T &x) {     x = 0;     bool _ = 0;     T c = getchar();     _ = c == 45;     c = _ ? getchar() : c;     while (c < 48 || c > 57) c = getchar();     for (; c < 48 || c > 57; c = getchar())       ;     for (; c > 47 && c < 58; c = getchar()) x = (x << 3) + (x << 1) + (c & 15);     x = _ ? -x : x;   }   template <typename T>   void printn(T n) {     bool _ = 0;     _ = n < 0;     n = _ ? -n : n;     char snum[65];     int i = 0;     do {       snum[i++] = n % 10 + 48;       n /= 10;     } while (n);     --i;     if (_) putchar(45);     while (i >= 0) putchar(snum[i--]);   }   template <typename First, typename... Ints>   void scan(First &arg, Ints &...rest) {     scan(arg);     scan(rest...);   }   template <typename T>   void print(T n) {     printn(n);     putchar(10);   }   template <typename First, typename... Ints>   void print(First arg, Ints... rest) {     printn(arg);     putchar(32);     print(rest...);   }   using namespace std;   map<int, int> mp;   void solve() {     int n;     cin >> n;     for (int i = 1; i <= n; i++) {       int l, r;       cin >> l >> r;       mp[l]++, mp[r]--;     }     int ans = 0, id = 1;     int sum = 0;     for (auto i : mp) {       sum += i.second;       if (sum > ans) {         ans = sum;         id = i.first;       }     }     cout << id <<     << ans << endl;   }   int main() {     ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);     solve();     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int sz = (1 << 22);   bool ar[sz], us[2][sz];   int n, m, bg;   void dfs(int v, int t) {     us[t][v] = 1;     if (t == 0) {       if (us[1][bg ^ v] == 0) dfs(bg ^ v, 1);     } else {       if (ar[v] and us[0][v] == 0) dfs(v, 0);       for (int i = 0; i < n; i++) {         if (v & (1 << i)) {           int ne = v - (1 << i);           if (us[1][ne] == 0) dfs(ne, 1);         }       }     }   }   int main() {     int an = 0;     cin >> n >> m;     bg = (1 << n) - 1;     for (int a = 0; a < m; a++) {       int x;       scanf( %d , &x);       ar[x] = 1;     }     for (int a = 0; a < (1 << n); a++) {       if (ar[a] and us[0][a] == 0) {         dfs(a, 0), an++;       }     }     cout << an;   }
#include <bits/stdc++.h>   using namespace std;   const int mod = 1e9 + 7;   long long a[50];   long long inv[50];   long long Finv[50];   long long n, s;   void init() {     inv[1] = 1;     for (int i = 2; i <= 50; i++) {       inv[i] = (mod - mod / i) * inv[mod % i] % mod;     }     Finv[0] = 1;     for (int i = 1; i <= 50; i++) {       Finv[i] = Finv[i - 1] % mod * inv[i] % mod;     }   }   long long C(long long n, long long m) {     if (n < 0 || m < 0 || m > n) return 0;     long long res = 1;     for (long long i = n; i > n - m; i--) {       res = (i % mod * res) % mod;     }     res = res % mod * Finv[m] % mod;     return res % mod;   }   int main() {     init();     cin >> n >> s;     for (int i = 0; i < n; i++) {       cin >> a[i];     }     long long res = 0;     for (long long i = 0; i < (1ll << n); i++) {       long long tmp = s;       long long cnt = 0;       for (long long j = 0; j < n; j++) {         if ((1ll << j) & i) {           tmp -= a[j] + 1;           cnt++;         }       }       if (tmp < 0) continue;       if (cnt & 1) {         res = (((res - C(tmp + n - 1, n - 1)) % mod + mod) % mod) % mod;       } else {         res = (res + C(tmp + n - 1, n - 1) % mod) % mod;       }     }     cout << res << endl;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int N;     cin >> N;     if (N % 2 == 0)       cout << -1 << endl;     else {       for (int i = 0; i < N; i++) cout << i << (i == N - 1 ?   n  :    );       for (int i = 0; i < N; i++)         cout << ((long long)(N - 2) * i) % N << (i == N - 1 ?   n  :    );       for (int i = 0; i < N; i++)         cout << ((long long)(N - 2) * i + i) % N << (i == N - 1 ?   n  :    );     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   struct trie {     struct tree {       long long al[26];       bool ex;     } nxt[100005];     long long cnt, dep[100005];     void insert(char *s) {       long long l = strlen(s), rt = 0;       for (register long long i = 0; i < l; i++) {         long long c = s[i] -  a ;         if (!nxt[rt].al[c]) nxt[rt].al[c] = ++cnt, dep[cnt] = dep[rt] + 1;         rt = nxt[rt].al[c];       }       nxt[rt].ex = 1;     }   } tr;   priority_queue<long long> q[100005];   long long n, ans = 0;   char s[100005];   template <typename T>   inline void read(T &x) {     T c = getchar(), f = 0;     for (; c < 48 || 57 < c; c = getchar())       if (c ==  - ) f = 1;     for (x = 0; 48 <= c && c <= 57; c = getchar())       x = (x << 3) + (x << 1) + (c ^ 48);     if (f) x = -x;   }   template <typename T>   inline void print(T x) {     if (x < 0) x = -x, putchar( - );     if (x > 9) print(x / 10);     putchar(x % 10 + 48);   }   inline void merge(long long x, long long y) {     while (!q[y].empty()) q[x].push(q[y].top()), q[y].pop();   }   void dfs(long long x) {     for (register long long i = 0; i < 26; i++)       if (tr.nxt[x].al[i]) dfs(tr.nxt[x].al[i]);     for (register long long i = 0; i < 26; i++)       if (tr.nxt[x].al[i]) merge(x, tr.nxt[x].al[i]);     if (!x) return;     if (tr.nxt[x].ex)       ans += tr.dep[x], q[x].push(tr.dep[x]);     else       ans -= q[x].top() - tr.dep[x], q[x].pop(), q[x].push(tr.dep[x]);   }   signed main() {     scanf( %lld , &n);     for (register long long i = 1; i <= n; i++) scanf( %s , s), tr.insert(s);     dfs(0), printf( %lld , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int N = 2e5 + 5;   int n, T, ans;   int t[N];   priority_queue<int> pq;   int main() {     scanf( %d%d , &n, &T);     for (int i = 1; i <= n; ++i) {       scanf( %d , &t[i]);       t[i] = t[i] > i ? t[i] - i : 0;     }     for (int i = 1; i <= n; ++i) {       pq.push(t[i]);       while ((long long)pq.top() + i >= T && !pq.empty()) {         pq.pop();       }       ans = max(ans, (int)pq.size());     }     printf( %d n , ans);     return 0;   }
#include <bits/stdc++.h>   int main() {     int a, b, i, j, c = 0;     int fil, col;     scanf( %d , &a);     scanf( %d , &b);     char myChar;     int aux[2][3];     for (i = 0; i < a; i++) {       for (j = 0; j < b; j++) {         scanf(  %c , &myChar);         if (myChar ==  * ) {           aux[0][c] = i + 1;           aux[1][c] = j + 1;           c++;         }       }     }     for (i = 0; i < 2; i++) {       for (j = i + 1; j < 3; j++) {         if (aux[0][i] == aux[0][j]) {           aux[0][i] = -1;           aux[0][j] = -1;         }         if (aux[1][i] == aux[1][j]) {           aux[1][i] = -1;           aux[1][j] = -1;         }       }     }     for (i = 0; i < 3; i++) {       if (aux[0][i] != -1) {         fil = aux[0][i];       }       if (aux[1][i] != -1) {         col = aux[1][i];       }     }     printf( %d %d , fil, col);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int MOD = 1000000007;   const char nl =   n ;   const int MX = 100001;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(nullptr);     cout.tie(nullptr);     int t;     cin >> t;     for (int tt = 0; tt < (t); tt++) {       int n;       cin >> n;       for (int i = 0; i < (n); i++) cout <<  1  ;       cout <<   n ;     }     return 0;   }