xibaby @ 2024-02-03 18:27:04
#include<bits/stdc++.h>
using namespace std;
int n,q,t,i,j,k;
int main(){
scanf("%d%d",&n,&q);
vector<vector<int>>a(n+1);
while(q--){
scanf("%d%d%d",&t,&i,&j);
if(t==1){
scanf("%d",&k);
if(a[i].size()<j+1)
a[i].resize(j+1);
a[i][j]=k;
}
else printf("%d",a[i][j]);
}
return 0;
}
by Li_Feiy @ 2024-02-03 18:29:24
@xibaby 没输出换行
by xibaby @ 2024-02-03 18:31:18
@Li_Feiy Thanks!非常感谢!(已AC)