Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* d119 */
- /* AC (4ms, 136KB) */
- #include <cstdio>
- using namespace std;
- int cent[] = {1, 13, 33, 43, 139, 169, 1309, 2597};
- int taget[8001]{}, I;
- int main()
- {
- taget[0] = 1;
- for(int i = 0; i < 8; i++)
- for(int j = cent[i]; j <= 8000; j++)
- taget[j] += taget[j - cent[i]];
- while(~scanf("%d", &I)) printf("%d\n", taget[I]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement