-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path101_B.cpp
More file actions
45 lines (40 loc) · 674 Bytes
/
101_B.cpp
File metadata and controls
45 lines (40 loc) · 674 Bytes
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
#include<iostream>
#include<climits>
#include<vector>
#include<map>
#include<cstring>
using namespace std;
int main()
{
vector< vector<int> > a(13);
a[0].push_back(1);
a[0].push_back(11);
a[1].push_back(2);
a[2].push_back(3);
a[3].push_back(4);
a[4].push_back(5);
a[5].push_back(6);
a[6].push_back(7);
a[7].push_back(8);
a[8].push_back(9);
a[9].push_back(10);
a[10].push_back(10);
a[11].push_back(10);
a[12].push_back(10);
int n;
cin>>n;
int sum = 10;
vector<int>b(13,4);
b[11]--;
int c = 0;
for(int i=0;i<(int)a.size();i++)
{
for(int j=0;j<(int)a[i].size();j++)
{
if(sum + a[i][j] == n)
c += b[i];
}
}
cout<<c<<endl;
return 0;
}