#include<bits/stdc++.h>
using namespace std;
struct tmd{
int id;
int x;
}a[9999999];
int n,T;
bool cmp(tmd sx,tmd sy){
return sx.x<sy.x;
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(0),cout.tie(0);
cin>>n>>T;
for(int i=1;i<=n;i++){cin>>a[i].x;a[i].id=i;}
while(T--){
int s;
cin>>s;
if(s==1){
int ta,tb;
cin>>ta>>tb;
a[ta].x=tb;
}
else{
int t;
cin>>t;
tmd b[n+1];
memcpy(b,a,sizeof(struct tmd)*n);
sort(b+1,b+1+n,cmp);
for(int i=1;i<=n;i++)if(b[i].id==t)cout<<i<<'\n';
}
}
return 0;
}
暴力万睡!