rt,题目给的样例太傻逼了。
input
10 10 3
9 -3 1 -5 -5 1 10 -2 -4 -1
1 1 6
1 3 -7
2 8 10
2 1 7
1 6 -6
2 5 9
2 1 9
1 8 7
2 4 5
2 1 4
output
0
11
10
10
0
6
maker
#include <bits/stdc++.h>
#define int long long
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define pii pair<int, int>
#define mp make_pair
#define pb push_back
#define ld lower_bound
#define rep(i, a, b) for (int i = a; i <= b; i++)
#define drep(i, a, b) for (int i = a; i >= b; i--)
#define ud upper_bound
#define N 100005
#define mem(s) memset(s, 0, sizeof(s))
#define fi first
#define se second
#define ull unsigned long long
using namespace std;
int n = 10, m = 10, C = 3;
mt19937 rd(time(0));
inline int rnd(int V) {
return rd() % (2 * V + 1) - V;
}
signed main() {
IOS;
cout << n << " " << m << " " << C << "\n";
rep (i, 1, n) cout << rnd(10) << " ";
cout << "\n";
rep (i, 1, m) {
int op = rd() % 2 + 1;
cout << op << " ";
if (op == 1) cout << rd() % n + 1 << " " << rnd(10) << "\n";
else {
int l = rd() % n + 1, r = rd() % n + 1;
if (l > r) swap(l, r);
cout << l << " " << r << "\n";
}
}
}