malteklaes/cpp-code-code_search_net-style huggingface dataset:
#include <bits/stdc++.h>   using namespace std;   int main() {     int n;     cin >> n;     vector<int> v(n);     map<int, int> freq;     for (int i = 0; i < n; i++) cin >> v[i];     int min = v[0], max = v[0], maximum = 0;     freq[v[0]]++;     int i = 0, j = 1;     while (j < n) {       while (((v[j] == min || v[j] == max) ||               ((min == max) && abs(v[j] - min) == 1)) &&              j < n) {         freq[v[j]]++;         if (v[j] > min) max = v[j];         if (v[j] < min) min = v[j];         j++;       }       if (j - i > maximum) maximum = j - i;       while (!((v[j] == min || v[j] == max) ||                ((min == max) && abs(v[j] - min) == 1)) &&              i < n) {         freq[v[i]]--;         if (freq[v[i]] == 0) {           if (min == max) {             min = v[j];             max = v[j];             freq[v[j]]++;             j++;           } else if (v[i] == max)             max--;           else if (v[i] == min)             min++;         }         i++;       }     }     cout << maximum;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int maxn = 14;   int dp[1 << maxn], n, m, ver[maxn][maxn][1 << maxn];   pair<pair<int, int>, int> pre[1 << maxn];   bool valid[maxn][maxn][1 << maxn];   vector<int> G[maxn];   int main() {     scanf( %d%d , &n, &m);     while (m--) {       int u, v;       scanf( %d%d , &u, &v);       u--, v--;       G[u].emplace_back(v);       G[v].emplace_back(u);     }     for (int(u) = (0); (u) <= ((n)-1); (u)++)       for (int v : G[u]) valid[u][v][0] = true;     for (int(mask) = (0); (mask) <= ((1 << n) - 1); (mask)++)       for (int(i) = (0); (i) <= ((n)-1); (i)++)         for (int(j) = (0); (j) <= ((n)-1); (j)++) {           if (!valid[i][j][mask]) continue;           for (int k : G[i])             if (!(mask & (1 << k)) && !valid[k][j][mask | (1 << i)] &&                 (mask || k != j)) {               ver[k][j][mask | (1 << i)] = i;               valid[k][j][mask | (1 << i)] = true;             }         }     memset(dp, 0x3f, sizeof(dp));     for (int(mask) = (1); (mask) <= ((1 << n) - 1); (mask)++) {       int cnt = __builtin_popcount(mask);       if (cnt == 1) {         dp[mask] = 0;         pre[mask] = {{-1, -1}, 0};         continue;       }       for (int sub = mask & (mask - 1); sub; sub = mask & (sub - 1)) {         int rem = mask ^ sub, inc = __builtin_popcount(rem) + 1;         for (int(i) = (0); (i) <= ((n)-1); (i)++)           if (sub & (1 << i)) {             for (int(j) = (0); (j) <= ((n)-1); (j)++)               if (sub & (1 << j)) {                 if (valid[i][j][rem] && dp[sub] + inc < dp[mask]) {                   dp[mask] = dp[sub] + inc;                   pre[mask] = {{i, j}, rem};                 }               }           }       }     }     printf( %d n , dp[(1 << n) - 1]);     for (int mask = (1 << n) - 1; __builtin_popcount(mask) > 1;) {       int u = pre[mask].first.first, v = pre[mask].first.second,           rem = pre[mask].second;       for (int sub = rem; sub;) {         int nxt = ver[u][v][sub];         printf( %d %d n , u + 1, nxt + 1);         sub ^= 1 << nxt;         u = nxt;       }       printf( %d %d n , u + 1, v + 1);       mask = mask ^ rem;     }   }
#include <bits/stdc++.h>   using namespace std;   const int N = 2010;   const int mod = 998244353;   inline int Pow(int x, int y) {     int res = 1;     for (; y; y >>= 1, x = (long long)x * x % mod)       if (y & 1) res = (long long)res * x % mod;     return res;   }   int f0[N], f1[N], f2[N], g[N];   inline int calc(int len, int tot) {     if (len < 0 || len & 1) return 0;     return (long long)tot * tot % mod * g[len] % mod;   }   inline vector<int> BM(vector<int> y) {     vector<int> coef, diff;     static int delta[N];     int fail = -1;     for (int i = 0, n = y.size(); i < n; i++) {       delta[i] = y[i];       for (int j = 0; j < coef.size(); j++)         delta[i] =             (delta[i] - (long long)coef[j] * y[i - j - 1] % mod + mod) % mod;       if (!delta[i]) continue;       if (fail == -1) {         fail = i, coef.resize(i + 1);         continue;       }       int scale = (long long)delta[i] * Pow(delta[fail], mod - 2) % mod;       vector<int> tmp = coef;       coef.clear(), coef.resize(i - fail - 1), coef.push_back(scale);       for (auto t : diff) coef.push_back((long long)t * (mod - scale) % mod);       fail = i, diff = tmp;       if (coef.size() < tmp.size()) coef.resize(tmp.size());       for (int i = 0; i < tmp.size(); i++) coef[i] = (coef[i] + tmp[i]) % mod;     }     return coef;   }   inline void pre(int n) {     g[0] = g[2] = 1;     for (int i = 4; i <= n; i += 2) g[i] = (g[i - 2] + g[i - 4]) % mod;     for (int i = 2; i <= n; i++) {       f0[i] = calc(i - 1, i - 1), f1[i] = calc(i - 2, i - 1),       f2[i] = calc(i - 3, i - 1);       for (int j = 2; j < i; j++) {         f0[i] = (f0[i] + (long long)calc(j - 1, j - 1) * f0[i - j] +                  (long long)calc(j - 2, j - 1) * f1[i - j]) %                 mod;         f1[i] = (f1[i] + (long long)calc(j - 2, j - 1) * f0[i - j] +                  (long long)calc(j - 3, j - 1) * f1[i - j]) %                 mod;         f2[i] = (f2[i] + (long long)calc(j - 2, j - 1) * f1[i - j] +                  (long long)calc(j - 3, j - 1) * f2[i - j]) %                 mod;       }     }   }   inline int solve(int n) {     int res = (long long)n * (calc(n - 1, n - 1) + calc(n - 3, n - 1)) % mod;     for (int i = 2; i <= n; i++) {       res = (res + (long long)calc(i - 1, i - 1) * f0[n - i] % mod * i) % mod;       res = (res + (long long)calc(i - 2, i - 1) * f1[n - i] % mod * i * 2) % mod;       res = (res + (long long)calc(i - 3, i - 1) * f2[n - i] % mod * i) % mod;     }     return res;   }   int dp[2000010];   int main() {     pre(1000);     vector<int> tmp;     for (int i = 3; i <= 1000; i++) tmp.push_back(dp[i] = solve(i));     auto now = BM(tmp);     int n;     scanf( %d , &n);     for (int i = 1001; i <= n; i++)       for (int j = 0; j < now.size(); j++)         dp[i] = (dp[i] + (long long)now[j] * dp[i - j - 1]) % mod;     printf( %d n , dp[n]);   }
#include <bits/stdc++.h>   #pragma GCC optimize( -O2 )   using namespace std;   string doSum(string a, string b) {     if (a.size() < b.size()) swap(a, b);     int j = a.size() - 1;     for (int i = b.size() - 1; i >= 0; i--, j--) a[j] += (b[i] -  0 );     for (int i = a.size() - 1; i > 0; i--) {       if (a[i] >  9 ) {         int d = a[i] -  0 ;         a[i - 1] = ((a[i - 1] -  0 ) + d / 10) +  0 ;         a[i] = (d % 10) +  0 ;       }     }     if (a[0] >  9 ) {       string k;       k += a[0];       a[0] = ((a[0] -  0 ) % 10) +  0 ;       k[0] = ((k[0] -  0 ) / 10) +  0 ;       a = k + a;     }     return a;   }   const int LIM = 1e5 + 5, MOD = 1e9 + 7;   const long double EPS = 1e-9;   string minofstrings(string a, string b) {     if (a.size() == 0) return b;     if (b.size() == 0) return a;     if (a.size() > b.size()) return b;     if (a.size() < b.size()) return a;     if (a >= b) return b;     return a;   }   signed main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     long long l;     cin >> l;     string s;     cin >> s;     vector<int> v;     string ans1, ans2, ans3;     int n = s.length();     if (s[n / 2] !=  0 ) {       ans1 = doSum(s.substr(0, n / 2), s.substr(n / 2, n - n / 2));     } else {       int g = n / 2;       int f = -1;       for (int i = n / 2; i >= 0; --i) {         if (s[i] !=  0 ) {           f = i;           break;         }       }       if (f != -1) ans1 = doSum(s.substr(0, f), s.substr(f, n - f));     }     if (s[(n - 1) / 2] !=  0 ) {       ans2 =           doSum(s.substr(0, (n - 1) / 2), s.substr((n - 1) / 2, n - (n - 1) / 2));     } else {       int g = (n - 1) / 2;       int f = -1;       for (int i = (n - 1) / 2; i < n; ++i) {         if (s[i] !=  0 ) {           f = i;           break;         }       }       if (f != -1) ans2 = doSum(s.substr(0, f), s.substr(f, n - f));     }     if (s[(n + 1) / 2] !=  0 ) {       ans3 =           doSum(s.substr(0, (n + 1) / 2), s.substr((n + 1) / 2, n - (n + 1) / 2));     } else {       int g = (n + 1) / 2;       int f = -1;       for (int i = (n + 1) / 2; i < n; ++i) {         if (s[i] !=  0 ) {           f = i;           break;         }       }       if (f != -1) ans3 = doSum(s.substr(0, f), s.substr(f, n - f));     }     ans1 = minofstrings(ans1, ans2);     ans1 = minofstrings(ans1, ans3);     cout << ans1 <<   n ;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long n, k, a[100010], w[100010];   int main() {     while (~scanf( %lld%lld , &n, &k)) {       for (long long i = 1; i <= n; i++) scanf( %lld , &a[i]);       memset(w, -1, sizeof(w));       for (long long i = 1; i <= n; i++)         if (w[a[i]] == -1) {           long long tmp = 256;           for (long long j = a[i] - k + 1; j <= a[i]; j++) {             if (j < 0) continue;             if (w[j] == -1 || w[j] == j) {               tmp = j;               break;             }           }           for (long long k = tmp; k <= a[i]; k++) w[k] = tmp;         }       for (long long i = 1; i <= n; i++) printf( %lld  , w[a[i]]);       printf(  n );     }     return 0;   }
#include <bits/stdc++.h>   const int SIZE = 200000;   int p[SIZE];   int ans[SIZE][2];   int ans_cnt;   bool judge(int a[], int n) {     static int used[SIZE + 1];     for (int i = 1; i <= n; i++) used[i] = 0;     for (int i = 0; i < n; i++) used[a[i]] = 1;     for (int i = 1; i <= n; i++) {       if (!used[i]) return 0;     }     return 1;   }   bool judge(int len1, int n) {     return judge(p, len1) && judge(p + len1, n - len1);   }   int main() {     int t = 0;     scanf( %d , &t);     while (t--) {       ans_cnt = 0;       int n;       scanf( %d , &n);       int ma = 0;       for (int i = 0; i < n; i++) {         scanf( %d , &p[i]);         if (ma < p[i]) ma = p[i];       }       if (judge(n - ma, n)) {         ans[ans_cnt][0] = n - ma;         ans[ans_cnt++][1] = ma;       }       if (ma * 2 != n && judge(ma, n)) {         ans[ans_cnt][0] = ma;         ans[ans_cnt++][1] = n - ma;       }       printf( %d n , ans_cnt);       for (int i = 0; i < ans_cnt; i++) {         printf( %d %d n , ans[i][0], ans[i][1]);       }     }     return 0;   }
#include <bits/stdc++.h>   const int p10[7] = {1, 10, 100, 1000, 10000, 100000, 1000000};   int N, S[10], can_be_zero[10], L, p[10], fill[10], O;   char a[7];   int main() {     for (int i = 0; i < 10; i++) can_be_zero[i] = 1;     scanf( %d , &N);     for (int i = 0; i < N; i++) {       scanf( %s , a);       L = 0;       while (a[L]) L++;       can_be_zero[a[0] -  a ] = 0;       for (int i = 0; i < L; i++) S[a[i] -  a ] += p10[L - 1 - i];     }     for (int i = 0; i < 10; i++) p[i] = i;     std::sort(p, p + 10, [](int x, int y) { return S[x] > S[y]; });     for (int i = 0; i < 10; i++) fill[i] = -1;     for (int i = 0; i < 10; i++)       if (can_be_zero[p[i]]) {         fill[p[i]] = 0;         break;       }     for (int i = 0, u = 1; i < 10; i++)       if (fill[p[i]] == -1) fill[p[i]] = u++;     for (int i = 0; i < 10; i++) O += fill[i] * S[i];     printf( %d n , O);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int maxn = 10000001;   int a, n, x[maxn];   int main() {     scanf( %d%d , &a, &n);     for (int i = a; i <= a + n - 1; i++) x[i] = i;     for (int i = 2; i * i <= a + n - 1; i++) {       int p = i * i;       int t = ((a + p - 1) / p) * p;       for (int j = t; j <= a + n - 1; j += p)         while (x[j] % p == 0) x[j] /= p;     }     long long ans = 0;     for (int i = a; i <= a + n - 1; i++) ans += x[i];     printf( %I64d n , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const long long N = 400010;   inline long long read() {     long long s = 0, w = 1;     register char ch = getchar();     while (ch <  0  || ch >  9 ) {       if (ch ==  - ) w = -1;       ch = getchar();     }     while (ch >=  0  && ch <=  9 )       s = (s << 3) + (s << 1) + (ch ^ 48), ch = getchar();     return s * w;   }   long long n, m, head[N], maxE, tot, deg[N], ot[N], cnt;   struct Edge {     long long nxt, to;   } e[N];   struct Node {     long long w, id;   } p[N];   inline void Add(long long u, long long v) {     e[++maxE].nxt = head[u];     head[u] = maxE;     e[maxE].to = v;   }   inline bool cp(Node x, Node y) { return x.w < y.w; }   inline void Topo() {     queue<long long> Q;     for (register long long i = 1; i <= tot; i++)       if (!deg[i]) Q.push(i);     while (!Q.empty()) {       long long x = Q.front();       Q.pop();       if (x <= m) ot[++cnt] = x;       for (register long long i = head[x]; i; i = e[i].nxt) {         deg[e[i].to]--;         if (!deg[e[i].to]) Q.push(e[i].to);       }     }     if (m > cnt) {       puts( -1 );       exit(0);     }     return;   }   signed main() {     n = read(), m = read();     tot = m;     for (register long long i = 1; i <= n; tot++, i++) {       for (register long long j = 1; j <= m; j++) p[j].w = read(), p[j].id = j;       sort(p + 1, p + 1 + m, cp);       for (register long long j = 1; j <= m; j++) {         if (p[j].w == -1) continue;         if (j == 1 || p[j].w ^ p[j - 1].w) tot++;         Add(tot, p[j].id), Add(p[j].id, tot + 1);         deg[p[j].id]++, deg[tot + 1]++;       }     }     Topo();     for (register long long i = 1; i <= m; i++) printf( %lld  , ot[i]);     puts(  );     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int solve() {     long long n;     cin >> n;     vector<vector<long long> > mat(n, vector<long long int>(n, 0));     for (long long int i = 0; i < n - 1; i++) {       long long x, y;       cin >> x >> y;       x--, y--;       mat[x][y] = 1;     }     vector<pair<long long, pair<long long int, long long int> > > ans;     vector<long long int> row(n, 0);     for (long long int i = 0; i < n; i++)       for (long long int j = 0; j < n; j++) row[i] += mat[i][j];     long long tot = 0;     for (long long int i = 0; i < n; i++)       for (long long int j = i; j < n; j++)         if (row[i] > row[j] && i != j) {           swap(mat[i], mat[j]);           swap(row[i], row[j]);           ans.push_back(make_pair(1, make_pair(i, j)));         }     for (long long int i = 0; i < n; i++) {       for (long long int j = i; j < n; j++) {         if (row[j] + tot == i) {           long long x = row[j];           tot += x;           if (j != i) {             swap(mat[i], mat[j]);             swap(row[i], row[j]);             ans.push_back(make_pair(1, make_pair(i, j)));           }           for (long long int k = i - x; k < i; k++) {             if (mat[i][k] != 1) {               for (long long int k1 = i; k1 < n; k1++)                 if (mat[i][k1] == 1) {                   ans.push_back(make_pair(2, make_pair(k, k1)));                   for (long long int s = 0; s < n; s++)                     swap(mat[s][k], mat[s][k1]);                 }             }           }           break;         }         long long x = row[i];         for (long long int k = i; k < n; k++) {           if (mat[i][k] == 1) {             for (long long int k1 = i - x; k1 < i; k1++)               if (mat[i][k1] == 0) {                 ans.push_back(make_pair(2, make_pair(k, k1)));                 for (long long int s = 0; s < n; s++) swap(mat[s][k], mat[s][k1]);               }           }         }       }     }     cout << (long long int)ans.size() <<   n ;     for (long long int i = 0; i < (long long int)ans.size(); i++) {       cout << ans[i].first <<     << ans[i].second.first + 1 <<                << ans[i].second.second + 1 <<   n ;     }     return 0;   }   int main() {     auto start = chrono::high_resolution_clock::now();     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     long long test_cases = 1;     while (test_cases--) solve();     auto stop = chrono::high_resolution_clock::now();     auto duration = chrono::duration_cast<chrono::milliseconds>(stop - start);   }
#include <bits/stdc++.h>   using namespace std;   int a, b, c, d;   int gcd(int first, int second) {     if (!second) return first;     return gcd(second, first % second);   }   pair<int, int> sol, curr;   int main() {     cin >> a >> b >> c >> d;     int dd = gcd(a, b);     a /= dd;     b /= dd;     dd = gcd(c, d);     c /= dd;     d /= dd;     sol.first = 1;     sol.second = 1;     if (a * d < b * c) {       curr.first = (b * c - a * d) * a;       curr.second = c * a * b;       dd = gcd(curr.first, curr.second);       curr.first /= dd;       curr.second /= dd;       if (curr.first * sol.second < sol.first * curr.second) sol = curr;     } else {       curr.first = (a * d - b * c) * b;       curr.second = d * a * b;       dd = gcd(curr.first, curr.second);       curr.first /= dd;       curr.second /= dd;       if (curr.first * sol.second < sol.first * curr.second) sol = curr;     }     cout << sol.first <<  /  << sol.second <<   n ;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   pair<pair<int, int>, pair<int, int> > find_pramougolnik(int x1, int y1, int x2,                                                           int y2) {     int lef = x1 - 1, rig = x2;     while (lef + 1 < rig) {       int mid = (lef + rig) / 2;       cout <<  ?   << x1 <<     << y1 <<     << mid <<     << y2 << endl;       int kol;       cin >> kol;       if (kol == 1)         rig = mid;       else         lef = mid;     }     int up = rig;     lef = x1 - 1, rig = x2;     while (lef + 1 < rig) {       int mid = (lef + rig) / 2;       cout <<  ?   << mid + 1 <<     << y1 <<     << x2 <<     << y2 << endl;       int kol;       cin >> kol;       if (kol == 1)         lef = mid;       else         rig = mid;     }     int down = lef + 1;     lef = y1 - 1, rig = y2;     while (lef + 1 < rig) {       int mid = (lef + rig) / 2;       cout <<  ?   << x1 <<     << y1 <<     << x2 <<     << mid << endl;       int kol;       cin >> kol;       if (kol == 1)         rig = mid;       else         lef = mid;     }     int rights = rig;     lef = y1 - 1, rig = y2;     while (lef + 1 < rig) {       int mid = (lef + rig) / 2;       cout <<  ?   << x1 <<     << mid + 1 <<     << x2 <<     << y2 << endl;       int kol;       cin >> kol;       if (kol == 1)         lef = mid;       else         rig = mid;     }     int lefts = lef + 1;     return make_pair(make_pair(down, lefts), make_pair(up, rights));   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     int n;     cin >> n;     int lef = 0, rig = n;     while (lef + 1 < rig) {       int mid = (lef + rig) / 2;       cout <<  ? 1 1   << n <<     << mid << endl;       int kol;       cin >> kol;       if (kol > 0)         rig = mid;       else         lef = mid;     }     if (rig != n) {       cout <<  ? 1   << rig + 1 <<     << n <<     << n << endl;       int kol;       cin >> kol;       if (kol == 1) {         pair<pair<int, int>, pair<int, int> > A = find_pramougolnik(1, 1, n, rig);         pair<pair<int, int>, pair<int, int> > B =             find_pramougolnik(1, rig + 1, n, n);         cout <<  !   << A.first.first <<     << A.first.second <<                  << A.second.first <<     << A.second.second <<     << B.first.first              <<     << B.first.second <<     << B.second.first <<                  << B.second.second << endl;         exit(0);       }     }     lef = 0, rig = n;     while (lef + 1 < rig) {       int mid = (lef + rig) / 2;       cout <<  ? 1 1   << mid <<     << n << endl;       int kol;       cin >> kol;       if (kol > 0)         rig = mid;       else         lef = mid;     }     pair<pair<int, int>, pair<int, int> > A = find_pramougolnik(1, 1, rig, n);     pair<pair<int, int>, pair<int, int> > B = find_pramougolnik(rig + 1, 1, n, n);     cout <<  !   << A.first.first <<     << A.first.second <<              << A.second.first <<     << A.second.second <<     << B.first.first          <<     << B.first.second <<     << B.second.first <<              << B.second.second << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     ios::sync_with_stdio(false);     cin.tie(nullptr);     int Q;     cin >> Q;     while (Q-- > 0) {       int N;       string S;       cin >> N >> S;       if (N == 2 && S[0] >= S[1]) {         cout <<  NO  <<   n ;       } else {         cout <<  YES  <<   n ;         cout << 2 <<   n ;         cout << S[0] <<     << S.substr(1) <<   n ;       }     }   }
#include <bits/stdc++.h>   using namespace std;   int ques[50005];   int ma[26];   int main() {     string s;     cin >> s;     int i, j;     memset(ques, 0, sizeof(ques));     int br = 1;     for (i = 0; i < (s.size()); i++) {       if (i != 0) ques[i] = ques[i] + ques[i - 1];       if (s[i] ==  ? ) ques[i] += 1;     }     for (i = 0; i < 26; i++) ma[i] = -100;     vector<char> second_bag;     int first_ind = 0;     for (i = 0; i < s.size(); i++) {       ma[s[i] -  A ] = i;       if (i >= 25) {         int t;         int char_count = 0;         vector<char> bag;         for (t = 0; t < 26; t++) {           if (!(ma[t] >= (i - 25) && (ma[t] <= i))) {             char_count++;             char ss =  A  + t;             bag.push_back(ss);           }         }         int ques_count = ques[i];         if ((i - 25) > 0) ques_count = ques_count - ques[i - 26];         if (char_count > ques_count)           bag.clear();         else {           int tt;           first_ind = i - 25;           int vc_count = 0;           for (tt = (i - 25); tt <= i; tt++) {             if (s[tt] ==  ? ) {               second_bag.push_back(bag[vc_count]);               vc_count++;             } else {               second_bag.push_back(s[tt]);             }           }           br = 0;           break;         }       }     }     if (br == 0) {       i = 0;       while (i < s.size()) {         if (i != first_ind) {           if (s[i] !=  ? )             cout << s[i];           else             cout <<  A ;         } else {           int temp1 = i - i;           for (temp1 = 0; temp1 < 26; temp1++) {             cout << second_bag[temp1];             i = i + 1;           }           i = i - 1;         }         i = i + 1;       }     }     if (br == 1) cout << -1 << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long double area(long double a, long double b, long double c) {     long double s = (a + b + c) / 2.0;     return sqrt(s * (s - a) * (s - b) * (s - c));   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     int i, j;     long double l[9], a = 0;     for (i = 0; i < 6; i++) cin >> l[i];     for (i = 0, j = 6; i < 6; i += 2, j++) {       l[j] =           sqrt(((l[i]) * (l[i])) + ((l[i + 1]) * (l[i + 1])) + l[i] * l[i + 1]);       a += area(l[i], l[i + 1], l[j]);     }     a += area(l[6], l[7], l[8]);     int temp = (4.0 * a) / (long double)sqrt(3);     cout << temp <<   n ;     return 0;   }