malteklaes/cpp-code-code_search_net-style huggingface dataset:
#include <bits/stdc++.h>   using namespace std;   int main() {     long long t;     cin >> t;     while (t--) {       long long n;       cin >> n;       long long sum = 0;       long long x = 0;       while (n--) {         long long s;         cin >> s;         sum += s;         x ^= s;       }       cout << 2 <<   n ;       cout << x <<     << sum + x << endl;     }   }
#include <bits/stdc++.h>   using namespace std;   const double PI = acos(-1);   pair<double, double> R[100001], P;   double dist(pair<double, double> a, pair<double, double> b) {     return (a.first - b.first) * (a.first - b.first) +            (a.second - b.second) * (a.second - b.second);   }   double dist(pair<double, double> a, pair<double, double> b,               pair<double, double> P) {     double A = sqrt(dist(a, b));     double B = sqrt(dist(a, P));     double C = sqrt(dist(b, P));     double p = (A + B + C) / 2;     double Area = sqrt(p * (p - A) * (p - B) * (p - C));     double ans = (Area * 2.0 / A);     if (B > C && B > A) return B * B;     if (C > B && C > A) return C * C;     return ans * ans;   }   int main() {     if (fopen( input.txt ,  r )) {       freopen( input.txt ,  r , stdin);       freopen( output.txt ,  w , stdout);     }     int N;     double Min = 1e50, Max = 0;     scanf( %d , &N);     scanf( %lf%lf , &P.first, &P.second);     for (int i = 0; i < N; ++i) {       scanf( %lf%lf , &R[i].first, &R[i].second);       Min = min(Min, dist(R[i], P));       Max = max(Max, dist(R[i], P));       if (!i) continue;       Min = min(Min, dist(R[i], R[i - 1], P));       Max = max(Max, dist(R[i], R[i - 1], P));     }     Min = min(Min, dist(R[0], R[N - 1], P));     Max = max(Max, dist(R[0], R[N - 1], P));     printf( %lf , Max * PI - Min * PI);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   using ll = long long;   using pii = pair<int, int>;   using pll = pair<ll, ll>;   using pdd = pair<double, double>;   using vi = vector<int>;   using vii = vector<pii>;   using vs = vector<string>;   const double PI = acos(-1.0);   const double EPS = 1e-14;   const int MOD = 1e9 + 7;   const int INF = 1e9;   const ll INFLL = 4e18;   const int MAX = 1e5;   int n, m;   set<int> hv, ans;   void read() {     cin >> n >> m;     for (int i = 0; i < (int)n; i++) {       int t;       cin >> t;       hv.insert(t);     }   }   void solve() {     for (int i = (int)1; i <= (int)1e9; i++) {       if (i > m) break;       if (!(hv.find(i) != hv.end())) {         ans.insert(i);         m -= i;       }     }     cout << (int)ans.size() <<   n ;     for (int t : ans) {       cout << t <<    ;     }   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     int TC = 1;     while (TC--) {       read();       solve();     }   }
#include <bits/stdc++.h>   using namespace std;   int n, m, ans[1009], t, l, r, low = 1e8, vis[1009];   vector<pair<int, int> > v0, v1;   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     cin >> n >> m;     for (int i = 0; i < m; i++) {       cin >> t >> l >> r;       if (t == 0)         v0.push_back({l, r});       else         v1.push_back({l, r});     }     sort(v0.begin(), v0.end());     sort(v1.begin(), v1.end());     for (auto i : v1) {       l = i.first, r = i.second;       int b = low;       if (ans[l] != 0)         b = ans[l];       else         low -= 4000;       while (l <= r) {         vis[l]++;         if (!ans[l]) ans[l] = b;         l++;       }     }     for (auto i : v0) {       l = i.first, r = i.second;       for (int j = l; j < r; j++) {         if (!ans[j] && !ans[j + 1]) {           ans[j] = 1000000000, ans[j + 1] = 1000000000 - 1;           break;         } else if (!ans[j]) {           ans[j] = 1 + ans[j + 1];           break;         } else if (!ans[j + 1]) {           ans[j + 1] = ans[j] - 1;           break;         }       }     }     for (int i = 1; i <= n; i++)       if (!ans[i]) ans[i] = 1;     for (auto i : v0) {       int yes = 1;       l = i.first, r = i.second;       for (int j = l; j < r; j++) {         if (ans[j] > ans[j + 1]) {           yes = 0;           break;         }       }       if (yes) return cout <<  NO , 0;     }     cout <<  YES n ;     for (int i = 1; i <= n; i++) cout << ans[i] <<    ;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   typedef pair<int, int> ll;   typedef vector<int> vl;   typedef vector<ll> vll;   typedef vector<vl> vvl;   template <typename T>   ostream &operator<<(ostream &o, vector<T> v) {     if (v.size() > 0) o << v[0];     for (unsigned i = 1; i < v.size(); i++) o <<     << v[i];     return o <<   n ;   }   template <typename U, typename V>   ostream &operator<<(ostream &o, pair<U, V> p) {     return o <<  (  << p.first <<  ,   << p.second <<  )  ;   }   template <typename T>   istream &operator>>(istream &in, vector<T> &v) {     for (unsigned i = 0; i < v.size(); i++) in >> v[i];     return in;   }   template <typename T>   istream &operator>>(istream &in, pair<T, T> &p) {     in >> p.first;     in >> p.second;     return in;   }   vl G(5003, 0);   string a;   bool check() {     int ans = 0;     int add = 0;     for (int i = (1); i < (int)a.length() - 1; i++) {       if (a[i - 1] == a[i + 1] and a[i] !=  $ )         add++;       else {         ans ^= G[add];         add = 0;       }     }     return ans == 0;   }   int main() {     std::ios::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     cout.precision(20);     G[0] = 0;     G[1] = 1;     for (int i = (2); i < (int)5003; i++) {       set<int> temp;       for (int(j) = 0; (j) < (i); (j)++) {         if (j == 0 or j == i - 1)           temp.insert(G[i - 2]);         else           temp.insert(G[j - 1] ^ G[i - j - 2]);       }       while (temp.find(G[i]) != temp.end()) G[i]++;     }     cin >> a;     a +=  # ;     for (int i = (1); i < (int)a.length() - 1; i++)       if (a[i - 1] == a[i + 1]) {         char c = a[i];         a[i] =  $ ;         if (check()) {           cout <<  First                 <<   n ;           cout << i + 1 <<   n ;           return 0;         }         a[i] = c;       }     cout <<  Second ;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int MAX = 1000009;   void solve() {     unsigned long long n, x;     cin >> n >> x;     int count = 0;     for (int i = 1; i <= floor(sqrt(x)); i++) {       if ((x % i == 0) && (i <= n) && (x / i <= n)) {         if ((x / i != i)) {           count += 2;         } else {           count++;         }       }     }     cout << count;   }   int main() {     ios::sync_with_stdio(false);     cin.tie(nullptr);     solve();   }
#include <bits/stdc++.h>   using namespace std;   const int MAXN = 200005;   const int MAXM = 1000005;   const int MOD = 1000000007;   const int MAMOD = 998244353;   const int INF = 0x3f3f3f3f;   const long long LLINF = 0x3f3f3f3f3f3f3f3f;   const double PI = acos(-1.0);   const double EPS = 1e-8;   int a[1005], color[1005];   int pri[12] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31};   vector<int> v[12];   int main() {     ios::sync_with_stdio(0);     int t;     cin >> t;     while (t--) {       int n;       cin >> n;       for (int j = 0; j < 11; ++j) v[j].clear();       for (int i = 1; i <= n; ++i) {         cin >> a[i];         for (int j = 0; j < 11; ++j) {           if (a[i] % pri[j] == 0) {             color[i] = j;             v[j].push_back(i);             break;           }         }       }       int num[12], tot = 0;       for (int i = 0; i < 11; ++i) {         if (v[i].size()) num[i] = ++tot;       }       cout << tot <<   n ;       for (int i = 1; i <= n; ++i) cout << num[color[i]] <<    ;       cout <<   n ;     }     return 0;   }
#include <bits/stdc++.h>   const long long MOD = 1e9 + 7;   const long long INF = 1e18;   using namespace std;   long long powmod(long long a, long long b) {     long long res = 1ll;     while (b) {       if (b & 1) res = (res * a) % MOD;     }   }   int main() {     ios::sync_with_stdio(false);     cin.tie(NULL);     int t;     cin >> t;     while (t--) {       int n, k1, k2;       cin >> n >> k1 >> k2;       int tmp;       bool state = false;       for (int i = 0; i < k1; i++) cin >> tmp, state |= tmp == n;       for (int i = 0; i < k2; i++) cin >> tmp;       if (state)         cout <<  YES n ;       else         cout <<  NO n ;     }   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int n, m;     cin >> n >> m;     int cand_sums[n];     memset(cand_sums, 0, sizeof cand_sums);     vector<vector<int>> votes = vector<vector<int>>(m, vector<int>(n, 0));     vector<priority_queue<pair<int, int>>> bad_stations =         vector<priority_queue<pair<int, int>>>(n,                                                priority_queue<pair<int, int>>());     int in;     for (int i = 0; i < m; i++) {       for (int j = 0; j < n; j++) {         cin >> in;         cand_sums[j] += in;         votes[i][j] = in;         if (j == n - 1) {           for (int k = 0; k < j; k++) {             bad_stations[k].push(pair<int, int>(in - votes[i][k], i));           }         }       }     }     vector<vector<int>> killed_stations =         vector<vector<int>>(n - 1, vector<int>());     for (int i = 0; i < n - 1; i++) {       while (!bad_stations[i].empty() && cand_sums[i] < cand_sums[n - 1]) {         pair<int, int> curr = bad_stations[i].top();         bad_stations[i].pop();         cand_sums[i] += curr.first;         killed_stations[i].push_back(curr.second);       }     }     int best = 0;     int best_size = m + 1;     for (int i = 1; i < n - 1; i++) {       if (killed_stations[i].size() < best_size) {         best = i;         best_size = killed_stations[i].size();       }     }     cout << killed_stations[best].size() << endl;     for (int i = 0; i < killed_stations[best].size(); i++) {       if (i > 0) cout <<    ;       cout << killed_stations[best][i] + 1;     }     if (!killed_stations[best].empty()) cout << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     long long t, a, b;     string s;     scanf( %lld , &t);     vector<int> v;     while (t--) {       v.clear();       scanf( %lld%lld , &a, &b);       cin >> s;       for (int i = 0; i < s.length(); i++) {         if (s[i] ==  0 ) v.push_back(i);       }       int w = -1;       for (int i = 0; i < v.size(); i++) {         if (b > v[i] - w - 1) {           b = b - (v[i] - w - 1);           v[i] = w + 1;           w = v[i];         } else {           v[i] = v[i] - b;           break;         }       }       v.push_back(1000025);       int k = 0;       for (int i = 0; i < a; i++) {         if (i == v[k]) {           cout <<  0 ;           k++;         } else {           cout <<  1 ;         }       }       cout << endl;     }   }
#include <bits/stdc++.h>   using namespace std;   int gcd(int f, int s) {     if (s == 0)       return f;     else       return gcd(s, f % s);   }   int const N = 200005;   long long const mod = 1000 * 1000 * 1000 + 7;   map<string, long long> m;   string s[N];   int main() {     int a;     cin >> a;     if (a < 6)       printf( -1 n );     else {       printf( 1 2 n1 3 n1 4 n );       for (int i = 5; i <= a; i++) printf( 2 %d n , i);     }     for (int i = 1; i < a; i++) printf( %d %d n , i, i + 1);     return 0;   }
#include <bits/stdc++.h>   int main() {     int x, y, z;     while (scanf( %d%d , &x, &y) == 2) {       z = abs(x) + abs(y);       if (x > 0) {         if (y > 0)           printf( 0 %d %d 0 n , z, z);         else           printf( 0 -%d %d 0 n , z, z);       } else {         if (y > 0)           printf( -%d 0 0 %d n , z, z);         else           printf( -%d 0 0 -%d n , z, z);       }     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int a1, a2, a3, a4;   int main() {     scanf( %d%d%d%d , &a1, &a2, &a3, &a4);     if (min(a1, a2) < max(a3, a4)) {       puts( -1 );       return 0;     }     if (a1 + a2 == a3 + a4) {       puts( -1 );       return 0;     }     if (a3 - a4 == 1) {       int n = a3;       for (int i = 1; i <= a1 - n + 1; ++i) {         putchar( 4 );       }       for (int i = 1; i < n; ++i) {         putchar( 7 );         putchar( 4 );       }       for (int i = 1; i <= a2 - n + 1; ++i) {         putchar( 7 );       }       return 0;     }     if (a3 == a4) {       int n = a3 + 1;       if (a1 >= n) {         for (int i = 1; i <= a1 - n + 1; ++i) {           putchar( 4 );         }         for (int i = 1; i < n - 1; ++i) {           putchar( 7 );           putchar( 4 );         }         for (int i = 1; i <= a2 - n + 2; ++i) {           putchar( 7 );         }         putchar( 4 );         return 0;       } else {         for (int i = 1; i < n; ++i) {           putchar( 7 );           putchar( 4 );         }         for (int i = 1; i <= a2 - n + 1; ++i) {           putchar( 7 );         }         return 0;       }     }     if (a4 - a3 == 1) {       int n = a4;       putchar( 7 );       for (int i = 1; i <= a1 - n + 1; ++i) {         putchar( 4 );       }       for (int i = 1; i < n - 1; ++i) {         putchar( 7 );         putchar( 4 );       }       for (int i = 1; i <= a2 - n + 1; ++i) {         putchar( 7 );       }       putchar( 4 );       return 0;     }     puts( -1 );     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int p[5007][5007];   int pre[5007];   int a, b, c, ans, res, del;   int solve(int x, int y) {     res = 0;     for (int i = 0; i <= x && i <= y; i++) {       del = pre[i];       del = (1LL * del * p[x][i]) % 998244353;       del = (1LL * del * p[y][i]) % 998244353;       res = (res + del) % 998244353;     }     return res;   }   int main() {     cin >> a >> b >> c;     memset(p, 0, sizeof(p));     p[0][0] = 1;     for (int i = 1; i <= 5000; i++) {       p[i][0] = 1;       for (int j = 1; j <= i; j++)         p[i][j] = (p[i - 1][j - 1] + p[i - 1][j]) % 998244353;     }     memset(pre, 0, sizeof(pre));     pre[0] = 1;     for (int i = 1; i <= 5000; i++) pre[i] = (1LL * pre[i - 1] * i) % 998244353;     ans = 1;     ans = (1LL * ans * solve(a, b)) % 998244353;     ans = (1LL * ans * solve(b, c)) % 998244353;     ans = (1LL * ans * solve(a, c)) % 998244353;     cout << ans;   }
#include <bits/stdc++.h>   #pragma GCC optimize(2)   #pragma GCC optimize(3)   using namespace std;   inline int read() {     int x = 0, neg = 1;     char op = getchar();     while (!isdigit(op)) {       if (op ==  - ) neg = -1;       op = getchar();     }     while (isdigit(op)) {       x = 10 * x + op -  0 ;       op = getchar();     }     return neg * x;   }   inline void print(int x) {     if (x < 0) {       putchar( - );       x = -x;     }     if (x >= 10) print(x / 10);     putchar(x % 10 +  0 );   }   const int N = 1000005;   vector<int> adj[N];   void add(int u, int v) { adj[u].push_back(v); }   int n;   int heavy[N], len[N];   void dfs1(int u, int fa) {     for (auto v : adj[u]) {       if (v == fa) continue;       dfs1(v, u);       if (len[v] > len[heavy[u]]) heavy[u] = v;     }     len[u] = len[heavy[u]] + 1;   }   int *f[N], tmp[N], *id = tmp, ans[N];   void dfs2(int u, int fa) {     f[u][0] = 1;     if (heavy[u]) {       f[heavy[u]] = f[u] + 1;       dfs2(heavy[u], u);       ans[u] = ans[heavy[u]] + 1;     }     for (auto v : adj[u]) {       if (v == fa || v == heavy[u]) continue;       f[v] = id, id += len[v];       dfs2(v, u);       for (register int j = 1; j <= len[v]; j++) {         f[u][j] += f[v][j - 1];         if ((j < ans[u] && f[u][j] >= f[u][ans[u]]) ||             (j > ans[u] && f[u][j] > f[u][ans[u]])) {           ans[u] = j;         }       }     }     if (f[u][ans[u]] == 1) {       ans[u] = 0;     }   }   int main() {     n = read();     for (register int i = 1; i < n; i++) {       int u = read(), v = read();       add(u, v), add(v, u);     }     int root = 1;     dfs1(root, 0);     f[1] = id, id += len[1];     dfs2(root, 0);     for (register int i = 1; i <= n; i++) {       printf( %d n , ans[i]);     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int n, k, a[303], flipped[303];   int query(int l, int r) {     cout <<  ?   << l <<     << r << endl;     cin >> l;     fflush(stdin);     return l;   }   void flip(int l, int r) {     for (int i = l; i < r + 1; i++) {       flipped[i] ^= 1;     }   }   void sol(int l, int r, int segk, bool f) {     if (l > r) return;     int lc = 0, rc = 0;     for (int i = 1; i < l; i++) lc += a[i] ^ flipped[i];     for (int i = r + 1; i < n + 1; i++) rc += a[i] ^ flipped[i];     if (l == r)       a[l] = flipped[l] ^ segk;     else if (f) {       while (1) {         int q = query(l, r - 1);         if (lc + n - r - rc + r - l + 1 - segk == q) {           segk = r - l + 1 - segk;           rc = n - r - rc;           flip(l, n);         } else {           int g = (q + 1 + lc + segk - r - rc) / 2;           a[r] = flipped[r] ^ g;           lc = l - 1 - lc;           segk = r - l - segk + 2 * g;           flip(1, r - 1);           sol(l, r, segk, !f);           return;         }       }     } else {       while (1) {         int q = query(l + 1, r);         if (l - 1 - lc + rc + r - l + 1 - segk == q) {           segk = r - l + 1 - segk;           lc = l - 1 - lc;           flip(1, r);         } else {           int g = (q + rc + l + segk - n - lc) / 2;           a[l] = flipped[l] ^ g;           rc = n - r - rc;           segk = r - l - segk + g;           flip(l + 1, n);           sol(l + 1, r - 1, segk - (a[r] ^ flipped[r]), !f);           return;         }       }     }   }   void disp() {     cout <<  !  ;     for (int i = 1; i < n + 1; i++) cout << a[i];     cout << endl;   }   void solve() {     cin >> n >> k;     sol(1, n, k, 1);     disp();   }   signed main() {     int t = 1;     while (t--) {       solve();     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int a[310], g[310][310], use[310];   int tm;   void add(int x, int y) {     g[x][y] = g[y][x] = 1;     tm++;   }   int main() {     int n, m, K;     scanf( %d%d%d , &n, &m, &K);     for (int i = 0; i < K; i++) {       scanf( %d , &a[i]);       use[a[i]] = 1;     }     sort(a, a + K);     memset(g, 0, sizeof(g));     int ck = -1;     for (int i = 1; i <= n; i++)       if (!use[i]) ck = i;     if (ck == -1) {       puts( -1 );       return 0;     }     tm = 0;     add(a[0], ck);     add(ck, a[1]);     for (int i = 1; i < K - 1; i++) add(a[i], a[i + 1]);     int pre = a[K - 1];     for (int i = 1; i <= n; i++) {       if (use[i]) continue;       if (i == ck) continue;       add(pre, i);       pre = i;     }     for (int i = 1; i <= n; i++)       for (int j = i + 1; j <= n; j++) {         if (g[i][j] == 1) continue;         if (tm == m) continue;         if (i == a[0] && j == a[1]) continue;         if (i == a[0] || j == a[0]) {           int ti;           if (i == a[0])             ti = j;           else             ti = i;           if (use[ti] && g[ti][a[1]]) continue;         }         if (i == a[1] || j == a[1]) {           int ti;           if (i == a[1])             ti = j;           else             ti = i;           if (use[ti] && g[ti][a[0]]) continue;         }         add(i, j);       }     if (tm != m) {       puts( -1 );       return 0;     }     for (int i = 1; i <= n; i++)       for (int j = i + 1; j <= n; j++)         if (g[i][j]) printf( %d %d n , i, j);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   vector<vector<long long> > mul(const vector<vector<long long> > &a,                                  const vector<vector<long long> > &b,                                  const long long &mod) {     int R1 = a.size(), C1 = a.front().size();     int R2 = b.size(), C2 = b.front().size();     if (C1 != R2) return vector<vector<long long> >();     vector<vector<long long> > result(R1, vector<long long>(C2, 0));     for (int i = 0; i < R1; ++i) {       for (int j = 0; j < C2; ++j) {         for (int k = 0; k < C1; ++k) {           result[i][j] += a[i][k] * b[k][j] % mod;           result[i][j] %= mod;         }       }     }     return result;   }   int main() {     vector<vector<long long> > transformer = {         {2, 1, 1, 0, 1, 1}, {1, 2, 0, 1, 1, 1}, {1, 1, 1, 0, 1, 1},         {1, 1, 0, 1, 1, 1}, {0, 0, 0, 0, 1, 1}, {0, 0, 0, 0, 0, 1}};     vector<vector<long long> > base(6, vector<long long>(1));     long long n, t;     cin >> n;     for (int i = 0; i < 4; ++i) {       cin >> base[i][0];       base[i][0] = (base[i][0] % n + n) % n;     }     cin >> t;     base[0][0]--;     base[1][0]--;     base[4][0] = base[5][0] = 1;     vector<vector<long long> > result(6, vector<long long>(6, 0));     for (int i = 0; i < 6; ++i) result[i][i] = 1;     while (t) {       if (t & 1) result = mul(result, transformer, n);       transformer = mul(transformer, transformer, n);       t >>= 1;     }     result = mul(result, base, n);     cout << result[0][0] + 1 <<     << result[1][0] + 1 << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   bool prime(long long n) {     for (int i = 2; i <= sqrt(n); i++)       if (n % i == 0) return false;     return true;   }   int main() {     string s, s1;     long long a, b, c, m, n, k, t, l, d, p, nl, np;     t = 1;     while (t--) {       cin >> n >> d;       vector<long long> arr(n);       long long sum = 0;       for (int i = 0; i < n; i++) {         cin >> arr[i];         sum += arr[i];       }       if (sum + (n - 1) * 10 > d)         cout << -1 << endl;       else {         cout << (n - 1) * 2 + (d - (sum + (n - 1) * 10)) / 5 << endl;       }     }   }
#include <bits/stdc++.h>   int main() {     int n;     std::cin >> n;     std::vector<int> a(n);     std::vector<int> mn(n);     for (int i = 0; i < n; ++i) {       std::cin >> a[i];     }     mn[n - 1] = a[n - 1];     for (int i = n - 2; i >= 0; --i) {       if (a[i] < mn[i + 1]) {         mn[i] = a[i];       } else {         mn[i] = mn[i + 1];       }     }     for (int i = 0; i < n; ++i) {       int left = i;       int right = n - 1;       int val = a[i];       while (left != right) {         int mid = (left + right + 1) / 2;         if (mn[mid] < val) {           left = mid;         } else {           right = mid - 1;         }       }       std::cout << right - i - 1 <<    ;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int n, dp[500005];   pair<int, int> p[500005];   int main() {     scanf( %d , &n);     for (int i = 0; i < n; ++i) scanf( %d%d , &p[i].first, &p[i].second);     sort(p, p + n);     for (int i = 0; i < n; ++i) {       if (i) dp[i] = max(dp[i], dp[i - 1]);       int ub = upper_bound(p + i + 1, p + n, make_pair(p[i].second + 1, 0)) - p;       dp[ub] = max(dp[ub], dp[i] + 1);     }     printf( %d n , max(dp[n], dp[n - 1]));   }