'commit'
This commit is contained in:
22
TangDou/LuoGuBook/P3613.cpp
Normal file
22
TangDou/LuoGuBook/P3613.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user