Advertisement
Emiliatan

d119

Apr 5th, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. /* d119            */
  2. /* AC (4ms, 136KB) */
  3. #include <cstdio>
  4.  
  5. using namespace std;
  6.  
  7. int cent[] = {1, 13, 33, 43, 139, 169, 1309, 2597};
  8. int taget[8001]{}, I;
  9.  
  10. int main()
  11. {
  12.     taget[0] = 1;
  13.     for(int i = 0; i < 8; i++)
  14.         for(int j = cent[i]; j <= 8000; j++)
  15.             taget[j] += taget[j - cent[i]];
  16.  
  17.     while(~scanf("%d", &I)) printf("%d\n", taget[I]);
  18.  
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement