Repository navigation
Expand file tree
/
Copy pathtempForCF.cpp
More file actions
138 lines (129 loc) · 2.84 KB
/
Copy pathtempForCF.cpp
File metadata and controls
138 lines (129 loc) · 2.84 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#include <time.h>
#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <istream>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <ratio>
#include <set>
#include <stack>
#include <string>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <vector>
using namespace std;
#define mset(t, x) memset(t, x, sizeof(t))
#define m0s(t) memset(t, 0, sizeof(t))
#define tt(t) while (t--)
#define ll long long
#define ull unsigned long long
#define db double
#define rep(i, a, b) for (ll i = (a); i <= (b); ++i)
#define rrep(i, a, b) for (ll i = (a); i >= (b); --i)
#define ls (x << 1)
#define rs (x << 1 | 1)
#define up(a, k) upper_bound(a.begin(), a.end(), k)
#define low(a, k) lower_bound(a.begin(), a.end(), k)
#define psh(a) push_back(a)
//#define pop pop_back()
#define seed srand(time(NULL));
// #define endl '\n'
#define quick \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
const int infi = 0x3f'3f'3f'3f;
ll const infl = 0x3f'3f'3f'3f'3f'3f'3f'3f;
db const eps = 1e-9;
double const PI = acos(-1.0);
int read() {
int w = 1, q = 0;
char ch = ' ';
while (ch != '-' && (ch < '0' || ch > '9')) {
ch = getchar();
}
if (ch == '-') {
w = -1, ch = getchar();
}
while (ch >= '0' && ch <= '9') {
q = q * 10 + ch - '0', ch = getchar();
}
return w * q;
}
void reada(ll a[], ll n, ll st = 1) {
rep(i, 1, n) { cin >> a[i]; }
}
void printa(ll a[], ll n, ll st = 1) {
rep(i, st, n) { cout << a[i] << " "; }
cout << endl;
}
void printv(vector<ll> vec) {
std::for_each(vec.begin(), vec.end(),
[](int element) { std::cout << element << " "; });
std::cout << endl;
}
ll min_a(ll const a[], int n) {
ll ans = (ll)4e18;
for (int i = 1; i <= n; i++) {
ans = min(ans, a[i]);
}
return ans;
}
// 2) 数组最大值
ll max_a(ll const a[], int n) {
ll ans = (ll)-4e18;
for (int i = 1; i <= n; i++) {
ans = max(ans, a[i]);
}
return ans;
}
// 3) vector 最小值
ll min_v(vector<ll> const& v) {
ll ans = (ll)4e18;
for (auto x : v) {
ans = min(ans, x);
}
return ans;
}
// 4) vector 最大值
ll max_v(vector<ll> const& v) {
ll ans = (ll)-4e18;
for (auto x : v) {
ans = max(ans, x);
}
return ans;
}
ll T = 1;
// ll m, n, q, p, op, goal;
bool flag;
ll ans;
ll const N = 1e6 + 9;
ll const mo = 998244353; // 记得检查是不是这个数
// ll a,b,c,d;
// ll a[N], b[N];
// ll a,b,c,d;
// ll s[4 * N]; //为了奇妙数据结构
ll dp[N];
vector<ll> vec;
string st;
short sh[N];
// short sh2[N][N]; //需要再加,会爆
// ll aa[N][N];
// bool vi[N][N];
int main() {
quick; // 三问:开freopen,写N,定义的变量
// cin>>T;
tt(T) {}
}