fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define F first
  5. #define S second
  6. const int mod = 1e9+7;
  7. const int N = 2e5+10;
  8. int dp[2020][2020];
  9. int rec(int n , int k)
  10. {
  11. if (n <= 0)
  12. return 0;
  13. int &ret = dp[n][k];
  14. if (ret + 1)return ret;
  15. int maxx = 0;
  16. for (int i = 1 ; i <= k*2 ; ++i)
  17. maxx = max(maxx , 1 - rec(n - i , i));
  18. return ret = maxx;
  19. }
  20. int main ()
  21. {
  22. //cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);
  23. /*
  24.   memset(dp , -1 , sizeof dp);
  25.   for (int i = 2 ;i <= 2000 ; ++i)
  26.   {
  27.   int maxx = 0;
  28.   for (int j = 1 ; j < i ; ++j)
  29.   maxx = max(maxx , 1 - rec(i-j , j));
  30.   if (!maxx)
  31.   cout << i << '\n';
  32.   }*/
  33. cout << "2\n3\n5\n8\n13\n21\n34\n55\n89\n144\n233\n377\n610\n987\n1597";
  34.  
  35. return 0;
  36. }
  37.  
Success #stdin #stdout 0.01s 5396KB
stdin
Standard input is empty
stdout
2
3
5
8
13
21
34
55
89
144
233
377
610
987
1597