malteklaes/cpp-code-code_search_net-style huggingface dataset:
#include <bits/stdc++.h>   using namespace std;   const double eps = 1e-9;   const int N = (int)2e6 + 5;   int n, q, a[N], l[N], r[N];   int main() {     for (scanf( %d , &q); q--;) {       scanf( %d , &n);       for (int i = 1; i <= n; ++i) scanf( %d , a + i);       for (int i = 1; i <= n; ++i) l[i] = n + 1, r[i] = -1;       for (int i = 1; i <= n; ++i)         l[a[i]] = min(l[a[i]], i), r[a[i]] = max(r[a[i]], i);       int mx = 0, now = 0, pos = -1, typ = 0;       for (int i = 1; i <= n; ++i)         if (r[i] != -1) {           ++typ;           if (now == 0) {             now = 1;             pos = r[i];           } else {             if (pos < l[i]) {               pos = r[i];               ++now;             } else               pos = r[i], now = 1;           }           mx = max(mx, now);         }       printf( %d n , typ - mx);     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   inline int rit() {     int f = 0, key = 1;     char ch;     do {       ch = getchar();       if (ch ==  - ) key = -1;     } while (ch <  0  || ch >  9 );     do {       f = f * 10 + ch -  0 ;       ch = getchar();     } while (ch >=  0  && ch <=  9 );     return f * key;   }   int n;   int arr[2000 + 5], suf[2000 + 5], pre[2000 + 5], ans, dp[2000 + 5][2000 + 5][3];   int32_t main(void) {     n = rit();     for (int i = 1; i <= (n); i++) {       arr[i] = rit();     }     for (int i = 1; i <= (n); i++) {       pre[i] = pre[i - 1] + (arr[i] == 1);       suf[n - i + 1] = suf[n - i + 2] + (arr[n - i + 1] == 2);     }     for (int i = 1; i <= (n); i++)       for (int j = i; j <= n; ++j) {         dp[i][j][1] = max(dp[i][j - 1][1], dp[i][j - 1][2]) + (arr[j] == 1);         dp[i][j][2] = dp[i][j - 1][2] + (arr[j] == 2);         ans = max(ans, max(dp[i][j][1], dp[i][j][2]) + pre[i - 1] + suf[j + 1]);       }     printf( %d n , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long modPower(long long num, long long r) {     if (r == 0) return 1;     if (r == 1) return num % 1000000007;     long long ans = modPower(num, r / 2) % 1000000007;     if (r % 2 == 0) {       return (ans * ans) % 1000000007;     }     return (((ans * ans) % 1000000007) * num) % 1000000007;   }   long long nCr(long long n, long long r) {     long long res = 1;     if (r > n - r) {       r = n - r;     }     for (long long i = 0; i < r; i++) {       res *= (n - i);       res /= (i + 1);     }     return res;   }   bool isPrime(long long n) {     if (n <= 1) return false;     if (n <= 3) return true;     if (n % 2 == 0 || n % 3 == 0) return false;     for (int i = 5; i * i <= n; i = i + 6)       if (n % i == 0 || n % (i + 2) == 0) return false;     return true;   }   int pos(int a) {     if (a < 0)       return (-1) * a;     else       return a;   }   unsigned long long highestPowerof2(unsigned long long n) {     unsigned long long p = (unsigned long long)log2(n);     return (unsigned long long)pow(2, p);   }   long long gcd(long long a, long long b) {     if (b == 0) return a;     return gcd(b, a % b);   }   vector<int> fprint(vector<int> A, int n) {     vector<int> fprint;     for (int i = 0; i < n - 1; i++) {       fprint.push_back(A[i] + A[i + 1]);     }     sort(fprint.begin(), fprint.end());     return fprint;   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     long long grr;     cin >> grr;     while (grr--) {       long long count = 0;       long long n, s;       cin >> n >> s;       long long c = n, rev = 0;       long long x = 10;       long long sum = 0, sum2 = 0, len = 0;       while (c > 0) {         sum += c % 10;         rev = rev * 10 + c % 10;         len++;         c = c / 10;       }       if (sum <= s)         cout << 0 <<   n ;       else {         sum2 = 0;         while (sum2 + rev % 10 < s && rev > 0) {           count++;           sum2 += rev % 10;           rev /= 10;         }         long long x = len - count, y = 1;         while (x--) {           y *= 10;         }         n = n % y;         x = 10;         while (n / x != 0) {           x *= 10;         }         cout << x - n <<   n ;       }     }   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int n;     string s;     cin >> n;     cin >> s;     int count = 0;     for (int i = 0; i < n; i++) {       if (s[i] ==  8 ) {         count++;       }     }     int a = n / 11;     if (count >= a) {       cout << a;     } else {       cout << count;     }     return 0;   }
#include <bits/stdc++.h>   int n, m, sol;   int D[100005];   int main() {     scanf( %d %d , &n, &m);     int p = 1;     for (int i = 1; i <= m; ++i) {       p = p + p;       if (p >= 1000000009) p -= 1000000009;     }     D[1] = p - 1;     for (int i = 2; i <= n; ++i) {       int now = p - i;       if (now < 0) now += 1000000009;       D[i] = (1LL * D[i - 1] * now) % 1000000009;     }     printf( %d n , D[n]);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const long long p = 1e9 + 7;   const long double pi = 3.1415926535898;   int main() {     int s, n;     cin >> s >> n;     vector<pair<int, int> > a(n);     for (int i = 0; i < n; i++) cin >> a[i].first >> a[i].second;     sort(a.begin(), a.end());     for (int i = 0; i < n; i++) {       if (a[i].first >= s) {         cout <<  NO ;         return 0;       }       s += a[i].second;     }     cout <<  YES ;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   template <class T>   T abs(T x) {     return x > 0 ? x : (-x);   }   template <class T>   T sqr(T x) {     return x * x;   }   int a[100000][2];   void save() {     printf( -1 n );     exit(0);   }   const int n = 65536;   int tree[57000 * 4 + 10];   int delta[57000 * 4 + 10];   void Set(int pos, int newval, int i = 1, int l = 0, int r = n - 1) {     if (l == r) {       tree[i] = newval;       return;     }     int m = (l + r) / 2;     if (pos <= m)       Set(pos, newval, i * 2, l, m);     else       Set(pos, newval, i * 2 + 1, m + 1, r);     tree[i] = min(tree[2 * i], tree[2 * i + 1]);   }   void multiinc(int l0, int r0, int val, int i = 1, int l = 0, int r = n - 1) {     if (l >= l0 && r <= r0) {       delta[i] += val;       return;     }     if (min(r, r0) < max(l, l0)) return;     int m = (l + r) / 2;     multiinc(l0, r0, val, 2 * i, l, m);     multiinc(l0, r0, val, 2 * i + 1, m + 1, r);     tree[i] = min(tree[2 * i] + delta[2 * i], tree[2 * i + 1] + delta[2 * i + 1]);   }   int get(int l0, int r0, int i = 1, int l = 0, int r = n - 1) {     if (min(r, r0) < max(l, l0)) return 100000000;     if (l >= l0 && r <= r0) return tree[i] + delta[i];     int m = (l + r) / 2;     return delta[i] +            min(get(l0, r0, 2 * i, l, m), get(l0, r0, 2 * i + 1, m + 1, r));   }   int main() {     memset(tree, 0, sizeof(tree));     string s;     cin >> s;     for (int i = 0; i < ((int)((s).size())); i++) {       if (s[i] !=  ? ) continue;       scanf( %d%d , &a[i][0], &a[i][1]);     }     set<pair<int, int> > up, down;     int cur = 0;     long long cost = 0;     for (int i = 0; i < ((int)((s).size())); i++) {       if (s[i] ==  ? ) {         if (a[i][0] < a[i][1]) {           s[i] =  ( ;           cost += a[i][0];           down.insert(pair<int, int>(a[i][1] - a[i][0], i));           cur++;         } else {           s[i] =  ) ;           cost += a[i][1];           up.insert(pair<int, int>(a[i][0] - a[i][1], i));           cur--;         }       } else {         cur += s[i] ==  (  ? 1 : -1;       }       if (cur < 0) {         if (up.empty()) save();         set<pair<int, int> >::iterator it = up.begin();         cost += it->first;         s[it->second] =  ( ;         cur += 2;         up.erase(it);         down.clear();       }     }     int ss = 0;     for (int i = 0; i < ((int)((s).size())); i++) {       ss += s[i] ==  (  ? 1 : -1;       Set(i + 1, ss);     }     while (cur > 0) {       if (down.empty()) save();       set<pair<int, int> >::iterator it = down.begin();       int delt = it->first;       int ind = it->second;       down.erase(it);       multiinc(ind + 1, ((int)((s).size())), -2);       int opt = get(1, ((int)((s).size())));       if (opt < 0) {         multiinc(ind + 1, ((int)((s).size())), 2);         continue;       }       cur -= 2;       s[ind] =  ) ;       cost += delt;     }     cout << cost <<   n  << s <<   n ;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   using ull = unsigned long long;   using ll = long long;   const int mod = 1e9 + 7;   const int inf = 2e9 + 5;   const int N = 501;   int n, m, a[N][N], b[N];   int main() {     ios::sync_with_stdio(false);     cin.tie(nullptr);     cout.tie(nullptr);     cin >> n >> m;     int q;     cin >> q;     for (int i = 0; i < n; i++)       for (int j = 0; j < m; j++) cin >> a[i][j];     for (int i = 0; i < n; i++) {       int cur = 0, best = 0;       for (int j = 0; j < m; j++) {         if (a[i][j] == 1)           cur += 1;         else           cur = 0;         best = max(best, cur);       }       b[i] = best;     }     while (q--) {       int i, j;       cin >> i >> j;       --i;       --j;       a[i][j] = 1 - a[i][j];       int cur = 0, best = 0;       for (int k = 0; k < m; k++) {         if (a[i][k] == 1)           cur += 1;         else           cur = 0;         best = max(best, cur);       }       b[i] = best;       cout << *max_element(b, b + n) <<   n ;     }     return 0;   }
#include <bits/stdc++.h>   struct node {     node() { zuo = you = he = 0; }     int zuo, you, he;   } a[1000002];   char s[1000002];   int sum(int l, int r) {     int ans = 0, you = 0;     while (r >= l) {       while (r && r - l + 1 >= (r & -r)) {         ans += a[r].he;         if (a[r].zuo >= you) {           ans += you;           you = 0;         } else {           ans += a[r].zuo;           you -= a[r].zuo;         }         you += a[r].you;         r -= r & -r;       }       if (r >= l) {         if (s[r] ==  ( ) {           if (you) {             ++ans;             --you;           }         } else           ++you;         --r;       }     }     return ans;   }   int main() {     scanf( %s , s + 1);     int n = strlen(s + 1), x;     for (int i = 1; i <= n; ++i) {       x = i;       if (s[x] ==  ( ) {         while (x <= n) {           ++a[x].zuo;           x += x & -x;         }       } else {         while (x <= n) {           if (a[x].zuo) {             --a[x].zuo;             ++a[x].he;           } else             ++a[x].you;           x += x & -x;         }       }     }     int m, l, r;     scanf( %d , &m);     while (m--) {       scanf( %d%d , &l, &r);       printf( %d n , sum(l, r) << 1);     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   struct node {     long long s, mn, mx;   };   node T[303030];   node operator+(node l, node r) {     node x;     x.s = l.s + r.s;     x.mn = min(l.mn, l.s + r.mn);     x.mx = max(l.mx, l.s + r.mx);     return x;   }   int A[100009];   void init(int idx, int s, int e) {     if (s == e) {       T[idx] = {A[s], min(A[s], 0), max(A[s], 0)};       return;     }     int m = s + e >> 1;     init(idx * 2, s, m);     init(idx * 2 + 1, m + 1, e);     T[idx] = T[idx * 2] + T[idx * 2 + 1];   }   node get(int idx, int s, int e, int l, int r) {     if (r < s || e < l) return (node){0, 0, 0};     if (l <= s && e <= r) return T[idx];     int m = s + e >> 1;     return get(idx * 2, s, m, l, r) + get(idx * 2 + 1, m + 1, e, l, r);   }   int main() {     int N, Q;     scanf( %d%d , &N, &Q);     for (int i = 1; i <= N; i++) scanf( %d , &A[i]);     for (int i = 1; i <= N; i++) {       int x;       scanf( %d , &x);       A[i] = x - A[i];     }     init(1, 1, N);     while (Q--) {       int l, r;       scanf( %d%d , &l, &r);       node x = get(1, 1, N, l, r);       if (x.mn < 0 || x.s != 0)         puts( -1 );       else         printf( %lld n , x.mx);     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int w, h, k, sum = 0;     cin >> w >> h >> k;     while (k != 0) {       sum = sum + ((2 * w) + (2 * h) - 4);       w = w - 4;       h = h - 4;       k = k - 1;     }     cout << sum;   }
#include <bits/stdc++.h>   using namespace std;   template <typename T>   T gcd(T a, T b) {     if (a == 0) return b;     return gcd(b % a, a);   }   template <typename T>   T pow(T a, T b, long long m) {     T ans = 1;     while (b > 0) {       if (b % 2 == 1) ans = (ans * a) % m;       b /= 2;       a = (a * a) % m;     }     return ans % m;   }   const long long N = 1e6 + 5;   const long long MOD = 1e9 + 7;   int32_t main() {     ios::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     ;     long long q;     cin >> q;     while (q--) {       long long n;       cin >> n;       if (n == 1 || n == 2 || n == 3 || n == 5 || n == 7 || n == 11) {         cout <<  -1               <<   n ;         continue;       }       long long ans = n / 4;       long long rem = n % 4;       if (rem % 2) ans--;       cout << ans <<   n ;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int nn, mm;   struct Dinic {     struct edge {       int to, flow, cap;     };     const static int N = 20007;     vector<edge> e;     vector<int> g[N + 7];     int dp[N + 7];     int ptr[N + 7];     void clear() {       for (int i = 0; i < N + 7; i++) g[i].clear();       e.clear();     }     void addEdge(int a, int b, int cap) {       g[a].push_back(e.size());       e.push_back({b, 0, cap});       g[b].push_back(e.size());       e.push_back({a, 0, 0});     }     int minFlow, start, finish;     bool bfs() {       for (int i = 0; i < N; i++) dp[i] = -1;       dp[start] = 0;       vector<int> st;       int uk = 0;       st.push_back(start);       while (uk < st.size()) {         int v = st[uk++];         for (int to : g[v]) {           auto ed = e[to];           if (ed.cap - ed.flow >= minFlow && dp[ed.to] == -1) {             dp[ed.to] = dp[v] + 1;             st.push_back(ed.to);           }         }       }       return dp[finish] != -1;     }     int dfs(int v, int flow) {       if (v == finish) return flow;       for (; ptr[v] < g[v].size(); ptr[v]++) {         int to = g[v][ptr[v]];         edge ed = e[to];         if (ed.cap - ed.flow >= minFlow && dp[ed.to] == dp[v] + 1) {           int add = dfs(ed.to, min(flow, ed.cap - ed.flow));           if (add) {             e[to].flow += add;             e[to ^ 1].flow -= add;             return add;           }         }       }       return 0;     }     int dinic(int start, int finish) {       Dinic::start = start;       Dinic::finish = finish;       int flow = 0;       for (minFlow = (1 << 30); minFlow; minFlow >>= 1) {         while (bfs()) {           for (int i = 0; i < N; i++) ptr[i] = 0;           while (int now = dfs(start, (int)2e9 + 7)) flow += now;         }       }       return flow;     }   } dinic;   pair<int, int> aa[5555];   bool can(int val) {     dinic.clear();     for (int i = 0; i < nn; i++) {       dinic.addEdge(nn + mm, i, val);     }     for (int i = 0; i < mm; i++) {       dinic.addEdge(nn + i, nn + mm + 1, 1);     }     for (int i = 0; i < mm; i++) {       dinic.addEdge(aa[i].first, nn + i, 1);       dinic.addEdge(aa[i].second, nn + i, 1);     }     int ans = dinic.dinic(nn + mm, nn + mm + 1);     return ans == mm;   }   int main() {     cin >> nn >> mm;     for (int i = 0; i < mm; i++) cin >> aa[i].first >> aa[i].second;     for (int i = 0; i < mm; i++) aa[i].first--, aa[i].second--;     int vl = 0, vr = mm;     while (vl + 1 < vr) {       int vm = (vl + vr) >> 1;       if (can(vm))         vr = vm;       else         vl = vm;     }     cout << vr <<   n ;     can(vr);     for (int i = 0; i < nn; i++) {       for (int to : dinic.g[i]) {         if (dinic.e[to].flow == 1) {           cout << i + 1 <<                    << aa[dinic.e[to].to - nn].first + aa[dinic.e[to].to - nn].second -                       i + 1                <<   n ;         }       }     }   }
#include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     ;     int n;     long long m;     cin >> n >> m;     long long arr[n], sum = 0;     for (int i = 0; i < n; i++) {       cin >> arr[i];       sum += arr[i];     }     sort(arr, arr + n);     long long hneed = arr[n - 1], extra = 0;     for (int i = n - 1; i >= 0; i--) {       if (arr[i] >= hneed) {         hneed--;         continue;       } else {         extra += (hneed - arr[i]);         hneed = arr[i] - 1;       }     }     hneed = max(hneed, 0LL);     cout << sum - n - extra - hneed;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int cnt[100500];   int bestAns, start, len;   int longest[100500];   inline void updAns(int L, int R) {     int val = cnt[R + 1] - cnt[L];     if (val > bestAns) {       bestAns = val;       start = L;       len = R - L + 1;     }   }   int main() {     stack<pair<char, int> > seq;     string s;     cin >> s;     int n = s.size();     for (int i = 1; i <= n; i++) {       cnt[i] = s[i - 1] ==  [ ;       cnt[i] += cnt[i - 1];       longest[i - 1] = n + 234;     }     for (int i = 0; i < n; i++) {       pair<char, int> cur(s[i], i);       if (seq.empty())         seq.push(cur);       else {         char pr = seq.top().first;         if (s[i] ==  ]  and pr ==  [  or s[i] ==  )  and pr ==  ( ) {           pair<char, int> ws = seq.top();           seq.pop();           int low = ws.second, high = i;           longest[i] = min(longest[i], low);           if (low > 0 and longest[low - 1] < low - 1) {             longest[i] = min(longest[i], longest[low - 1]);           }           updAns(longest[i], i);         } else           seq.push(cur);       }     }     cout << bestAns << endl;     cout << s.substr(start, len) << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     long long n;     cin >> n;     long long a[n + 1];     memset(a, 0, sizeof(a));     for (long long i = 1; i <= n; i++) cin >> a[i];     sort(a, a + n + 1);     long long sum[n + 1];     memset(sum, 0, sizeof(sum));     sum[1] = a[1];     for (int i = 2; i <= n; i++) {       sum[i] = sum[i - 1] + a[i];     }     long long ans = 0;     for (int i = 0; i <= n; i++) {       ans = ans + a[i] + (sum[n] - sum[i]);     }     cout << ans - a[n] << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   template <class T1, class T2>   ostream& operator<<(ostream& out, const pair<T1, T2> p) {     out <<  (  << p.first <<  ,  << p.second <<  ) ;     return out;   }   template <class T1, class T2>   istream& operator>>(istream& in, pair<T1, T2>& p) {     in >> p.first >> p.second;     return in;   }   template <class T>   istream& operator>>(istream& in, vector<T>& v) {     for (T& x : v) in >> x;     return in;   }   template <class T>   ostream& operator<<(ostream& out, const vector<vector<T> >& v) {     for (const vector<T>& x : v) out << x <<   n ;     return out;   }   template <class T>   ostream& operator<<(ostream& out, const vector<T>& v) {     for (const T& x : v) out << x <<    ;     return out;   }   long long power(long long a, long long b) {     return b ? power(a * a % 1000000007ll, b / 2) * (b % 2 ? a : 1) % 1000000007ll              : 1;   }   bool possible(vector<string>& s, string a) {     for (long long i = 1; i < (long long)(s).size(); i++) {       long long diff = 0;       for (long long j = 0; j < (long long)(a).size(); j++) {         if (a[j] != s[i][j]) diff++;       }       if (diff > 1) return false;     }     return true;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     long long T;     cin >> T;     while (T--) {       long long n, m;       cin >> n >> m;       vector<string> s(n);       cin >> s;       string a = s[0];       if (possible(s, a)) {         cout << a << endl;       } else {         string ans =   ;         for (long long i = 0; i < (long long)(s[0]).size() && ans ==   ; i++) {           char temp = s[0][i];           for (long long c =  a ; c <=  z  && ans ==   ; c++) {             s[0][i] = c;             if (possible(s, s[0])) {               ans = s[0];               break;             }           }           s[0][i] = temp;         }         if (ans ==   ) {           cout << -1 << endl;         } else           cout << ans << endl;       }     }   }
#include <bits/stdc++.h>   int a[100][100];   int d[2][100];   long long c[2][100];   int main() {     int n, m, i, j, k;     double max = 1;     scanf( %d %d , &n, &m);     for (i = 0; i < m; i++) {       int x, y;       scanf( %d %d , &x, &y);       x--;       y--;       a[x][y] = a[y][x] = 1;     }     for (i = 0; i < n; i++) d[0][i] = d[1][i] = 1e9;     d[0][0] = d[1][n - 1] = 0;     c[0][0] = c[1][n - 1] = 1;     for (i = 0; i < n; i++) {       for (j = 0; j < n; j++) {         if (d[0][j] == i) {           for (k = 0; k < n; k++) {             if (a[j][k] == 1 && d[0][k] >= i + 1) {               d[0][k] = i + 1;               c[0][k] += c[0][j];             }           }         }         if (d[1][j] == i) {           for (k = 0; k < n; k++) {             if (a[j][k] == 1 && d[1][k] >= i + 1) {               d[1][k] = i + 1;               c[1][k] += c[1][j];             }           }         }       }     }     for (i = 1; i < n - 1; i++) {       double tmp;       if (d[0][i] + d[1][i] > d[0][n - 1]) continue;       tmp = 2.0 * c[0][i] * c[1][i] / c[0][n - 1];       if (tmp > max) max = tmp;     }     printf( %.12lf n , max);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   unsigned long long int MOD = 1000000007;   unsigned long long int B = 13331;   bool cmp(const int &a, const int &b) { return a < b; }   int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }   int lcm(int a, int b) { return a * (b / gcd(a, b)); }   double func(double mod, double x) {     int n = (int)(x / (2.0 * mod));     x -= n * 2.0 * mod;     while (x < 0.0) x += 2.0 * mod;     while (x > 2.0 * mod) x -= 2.0 * mod;     if (x > mod) x = 2.0 * mod - x;     return x;   }   int main(void) {     int i;     double a, b, m, vx, vy, vz;     cin >> a >> b >> m >> vx >> vy >> vz;     double x = func(a, a / 2.0 + vx * (m / (-vy)));     double z = func(b, vz * (m / (-vy)));     printf( %.9f %.9f n , x, z);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int maxn = 1e5 + 15;   const int mod = 1e9 + 7;   const int inf = 1e9 + 3;   int t, n;   string a[3], s;   int flag;   int conv(string q) {     int ans = 0;     for (int i = 0; i < q.size(); i++) {       ans *= 10;       ans += q[i] -  0 ;     }     return ans;   }   int main() {     cin >> s;     for (int i = 0; i < s.size(); i++) {       if (s[i] ==  .  || s[i] ==  e )         t++;       else         a[t] += s[i];     }     for (int i = a[1].size() - 1; i >= 0; i--) {       if (a[1][i] ==  0 )         flag++;       else         break;     }     cout << a[0];     n = conv(a[2]);     for (int i = 0; i < a[1].size() - flag; i++) {       if (n == 0) cout <<  . ;       n--;       cout << a[1][i];     }     while ((n--) > 0) cout << 0;     cout << endl;   }