You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
515 B
22 lines
515 B
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
typedef long long LL;
|
|
int n, q, cmd, i, j, K;
|
|
|
|
int main() {
|
|
cin >> n >> q;
|
|
vector<vector<int> > locker(n + 1);//动态声明大小
|
|
while (q--) {
|
|
cin >> cmd;
|
|
if (cmd == 1) {
|
|
cin >> i >> j >> k;
|
|
if (locker[i].size() < j + 1) locker[i].resize(j + 1);
|
|
locker[i][j] = k;
|
|
} else {
|
|
cin >> i >> j;
|
|
cout << locker[i][j] << endl;
|
|
}
|
|
}
|
|
return 0;
|
|
} |