-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.cpp
57 lines (49 loc) · 1.04 KB
/
main.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
#include <bits/stdc++.h>
#include <ranges>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define debug(...) 42
#endif
namespace utils {
template <typename T>
void setMax(T& target, const T& value) {
if (value > target) {
target = value;
}
}
template <typename T>
void setMin(T& target, const T& value) {
if (value < target) {
target = value;
}
}
} // namespace utils
using namespace utils;
using ll = long long;
using ld = long double;
const char el = '\n';
void solve() {
vector dp(4, vector<int>(7, 0));
for (int i = 1; i <= 6; ++i) {
dp[0][i] = 1;
}
for (int i = 1; i < 4; ++i) {
for (int j = 1; j <= 6; ++j) {
for (int k = j; k <= 6; ++k) {
dp[i][j] += dp[i-1][k];
}
}
}
cout << accumulate(dp[3].begin(), dp[3].end(), 0) << el;
}
const bool is_multitest = false;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int t = 1;
if (is_multitest) cin >> t;
while (t--) solve();
return 0;
}