mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-27 21:16:27 +00:00
41 lines
723 B (Stored with Git LFS)
C++
41 lines
723 B (Stored with Git LFS)
C++
#include <bits/stdc++.h>
|
|
|
|
#include "testlib.h"
|
|
using namespace std;
|
|
|
|
const int LIM = 1e4;
|
|
int n, m;
|
|
|
|
int main(int argc, char *argv[]) {
|
|
registerValidation();
|
|
|
|
n = inf.readInt(1, 1e5);
|
|
inf.readSpace();
|
|
m = inf.readInt(1, 1e5);
|
|
inf.readEoln();
|
|
|
|
for (int i = 1; i <= n; ++i) {
|
|
inf.readInt(-LIM, LIM);
|
|
if (i != n) inf.readSpace();
|
|
}
|
|
|
|
inf.readEoln();
|
|
|
|
for (int i = 1, opt, l; i <= m; ++i) {
|
|
opt = inf.readInt(1, 2);
|
|
inf.readSpace();
|
|
l = inf.readInt(1, n);
|
|
inf.readSpace();
|
|
inf.readInt(l, n);
|
|
|
|
if (opt == 1)
|
|
inf.readSpace(), inf.readInt(-LIM, LIM);
|
|
|
|
inf.readEoln();
|
|
}
|
|
|
|
inf.readEof();
|
|
|
|
return 0;
|
|
}
|