提交时间:2023-09-12 13:10:04

运行 ID: 102010

#include<bits/stdc++.h> #define int long long using namespace std; namespace Fast{ //注:快读快写与CCF函数不能一起用,不然可能会趋势 inline int fr(){ register int x = 0,f = 1; static char c = getchar(); while (c < '0' || c > '9'){ if (c == '-'){ f = -1; } c = getchar(); } while (c >= '0' && c <= '9'){ x = (x << 1) + (x << 3) + (c ^ 48); c = getchar(); } return x * f; } inline void fw(int x){ if (x < 0){ putchar('-'); x = -x; } if (x > 9){ fw(x / 10); } putchar(x % 10 + 48); } inline void DEBUG(){ puts("awa"); } inline void CCF(){ //原来想叫CINCOUTFASTER的结果发现缩写竟然是CCF(doge) ios::sync_with_stdio(false); cin.tie(0),cout.tie(0); } } using namespace Fast; int dp[1000005],o[4] = {1,5,10}; signed main(){ CCF(); int n = fr(),v = 3; dp[16] = 1; for (int i = 0;i < v;i++){ for (int j = o[i];j <= n;j++){ dp[j] += dp[j - o[i]]; } } cout<<dp[n]; return 0; }