forked from bucketzxm/Acm-icpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path111.cpp
64 lines (58 loc) · 1.18 KB
/
111.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include <iostream>
#include <sstream>
#include <ios>
#include <iomanip>
#include <functional>
#include <algorithm>
#include <vector>
#include <string>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <climits>
#include <cctype>
using namespace std;
#define XINF INT_MAX
#define INF 0x3FFFFFFF
#define MP(X,Y) make_pair(X,Y)
#define PB(X) push_back(X)
#define REP(X,N) for(int X=0;X<N;X++)
#define REP2(X,L,R) for(int X=L;X<=R;X++)
#define DEP(X,R,L) for(int X=R;X>=L;X--)
#define CLR(A,X) memset(A,X,sizeof(A))
#define IT iterator
typedef long long ll;
typedef pair<int,int> PII;
typedef vector<PII> VII;
typedef vector<int> VI;
int dp[10000+100];
int main()
{
ios::sync_with_stdio(false);
int n;
int cse = 0;
int money[3] = {1,2,5};
CLR(dp,0);
dp[0]=1;
REP(i,3)
{
REP(j,10000)
{
dp[j+money[i]]+=dp[j];
}
}
while(cin>>n)
{
cout<<"Case "<<++cse<<": "<<n<<", ";
cout<<dp[n]<<endl;
//solve(n);
}
return 0;
}