Language: C++

#include<bits/stdc++.h>
using namespace std;
 
const int MAX_N = 1<<17;
typedef pair<int,int> P;
int n;
P dat[2*MAX_N-1];
 
//?????????
void init(int n_){
  //????´???°n???2???????????????
  n=1;
  while(n<n_)n*=2;
  for(int i=0;i<2*n-1;i++)dat[i]=P(INT_MAX,INT_MAX);
}
 
int update(int a,int b,int k,int l,int r,int x){
  if(r<=a||b<=l)return dat[k].second;
  if(a<=l&&r<=b){
    dat[k]=P(x,x);
    return x;
  }else{
    if(dat[k].first!=INT_MAX){
      dat[k*2+1].first=dat[k*2+1].second=dat[k].first;
      dat[k*2+2].first=dat[k*2+2].second=dat[k].first;
      dat[k].first=INT_MAX;
    }
    int m=(l+r)/2;
    int v1=update(a,b,k*2+1,l,m,x);
    int v2=update(a,b,k*2+2,m,r,x);
    return dat[k].second=min(v1,v2);
  }
}
 
int find(int a,int b,int k,int l,int r){
  if(r<=a||b<=l)return INT_MAX;
  if(a<=l&&r<=b)return dat[k].second;
  else{
    if(dat[k].first!=INT_MAX){
      dat[k*2+1].first=dat[k*2+1].second=dat[k].first;
      dat[k*2+2].first=dat[k*2+2].second=dat[k].first;
      dat[k].first=INT_MAX;
    }
    return min(find(a,b,k*2+1,l,(l+r)/2),find(a,b,k*2+2,(l+r)/2,r));
  }
}
 
int main(){
  int q;
  cin>>n>>q;
   
  init(n);
  int u,s,t,x;
  for(int i=0;i<q;i++){
    cin>>u;
    if(!u){
      cin>>s>>t>>x;
      update(s,t+1,0,0,n,x);
    }else{
      cin>>s>>t;
      cout<<find(s,t+1,0,0,n)<<endl;
    }
  }
   
  return 0;
}



Compiler output:
a.cc:3:1: error: extended character   is not valid in an identifier
    3 |  
      | ^
a.cc:8:1: error: extended character   is not valid in an identifier
    8 |  
      | ^
a.cc:11:1: error: extended character   is not valid in an identifier
   11 |   //????´???°n???2???????????????
      | ^
a.cc:11:1: error: extended character   is not valid in an identifier
a.cc:12:1: error: extended character   is not valid in an identifier
   12 |   n=1;
      | ^
a.cc:12:1: error: extended character   is not valid in an identifier
a.cc:13:1: error: extended character   is not valid in an identifier
   13 |   while(n<n_)n*=2;
      | ^
a.cc:13:1: error: extended character   is not valid in an identifier
a.cc:14:1: error: extended character   is not valid in an identifier
   14 |   for(int i=0;i<2*n-1;i++)dat[i]=P(INT_MAX,INT_MAX);
      | ^
a.cc:14:1: error: extended character   is not valid in an identifier
a.cc:16:1: error: extended character   is not valid in an identifier
   16 |  
      | ^
a.cc:18:1: error: extended character   is not valid in an identifier
   18 |   if(r<=a||b<=l)return dat[k].second;
      | ^
a.cc:18:1: error: extended character   is not valid in an identifier
a.cc:19:1: error: extended character   is not valid in an identifier
   19 |   if(a<=l&&r<=b){
      | ^
a.cc:19:1: error: extended character   is not valid in an identifier
a.cc:20:1: error: extended character   is not valid in an identifier
   20 |     dat[k]=P(x,x);
      | ^
a.cc:20:1: error: extended character   is not valid in an identifier
a.cc:20:1: error: extended character   is not valid in an identifier
a.cc:20:1: error: extended character   is not valid in an identifier
a.cc:21:1: error: extended character   is not valid in an identifier
   21 |     return x;
      | ^
a.cc:21:1: error: extended character   is not valid in an identifier
a.cc:21:1: error: extended character   is not valid in an identifier
a.cc:21:1: error: extended character   is not valid in an identifier
a.cc:22:1: error: extended character   is not valid in an identifier
   22 |   }else{
      | ^
a.cc:22:1: error: extended character   is not valid in an identifier
a.cc:23:1: error: extended character   is not valid in an identifier
   23 |     if(dat[k].first!=INT_MAX){
      | ^
a.cc:23:1: error: extended character   is not valid in an identifier
a.cc:23:1: error: extended character   is not valid in an identifier
a.cc:23:1: error: extended character   is not valid in an identifier
a.cc:24:1: error: extended character   is not valid in an identifier
   24 |       dat[k*2+1].first=dat[k*2+1].second=dat[k].first;
      | ^
a.cc:24:1: error: extended character   is not valid in an identifier
a.cc:24:1: error: extended character   is not valid in an identifier
a.cc:24:1: error: extended character   is not valid in an identifier
a.cc:24:1: error: extended character   is not valid in an identifier
a.cc:24:1: error: extended character   is not valid in an identifier
a.cc:25:1: error: extended character   is not valid in an identifier
   25 |       dat[k*2+2].first=dat[k*2+2].second=dat[k].first;
      | ^
a.cc:25:1: error: extended character   is not valid in an identifier
a.cc:25:1: error: extended character   is not valid in an identifier
a.cc:25:1: error: extended character   is not valid in an identifier
a.cc:25:1: error: extended character   is not valid in an identifier
a.cc:25:1: error: extended character   is not valid in an identifier
a.cc:26:1: error: extended character   is not valid in an identifier
   26 |       dat[k].first=INT_MAX;
      | ^
a.cc:26:1: error: extended character   is not valid in an identifier
a.cc:26:1: error: extended character   is not valid in an identifier
a.cc:26:1: error: extended character   is not valid in an identifier
a.cc:26:1: error: extended character   is not valid in an identifier
a.cc:26:1: error: extended character   is not valid in an identifier
a.cc:27:1: error: extended character   is not valid in an identifier
   27 |     }
      | ^
a.cc:27:1: error: extended character   is not valid in an identifier
a.cc:27:1: error: extended character   is not valid in an identifier
a.cc:27:1: error: extended character   is not valid in an identifier
a.cc:28:1: error: extended character   is not valid in an identifier
   28 |     int m=(l+r)/2;
      | ^
a.cc:28:1: error: extended character   is not valid in an identifier
a.cc:28:1: error: extended character   is not valid in an identifier
a.cc:28:1: error: extended character   is not valid in an identifier
a.cc:29:1: error: extended character   is not valid in an identifier
   29 |     int v1=update(a,b,k*2+1,l,m,x);
      | ^
a.cc:29:1: error: extended character   is not valid in an identifier
a.cc:29:1: error: extended character   is not valid in an identifier
a.cc:29:1: error: extended character   is not valid in an identifier
a.cc:30:1: error: extended character   is not valid in an identifier
   30 |     int v2=update(a,b,k*2+2,m,r,x);
      | ^
a.cc:30:1: error: extended character   is not valid in an identifier
a.cc:30:1: error: extended character   is not valid in an identifier
a.cc:30:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character   is not valid in an identifier
   31 |     return dat[k].second=min(v1,v2);
      | ^
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:32:1: error: extended character   is not valid in an identifier
   32 |   }
      | ^
a.cc:32:1: error: extended character   is not valid in an identifier
a.cc:34:1: error: extended character   is not valid in an identifier
   34 |  
      | ^
a.cc:36:1: error: extended character   is not valid in an identifier
   36 |   if(r<=a||b<=l)return INT_MAX;
      | ^
a.cc:36:1: error: extended character   is not valid in an identifier
a.cc:37:1: error: extended character   is not valid in an identifier
   37 |   if(a<=l&&r<=b)return dat[k].second;
      | ^
a.cc:37:1: error: extended character   is not valid in an identifier
a.cc:38:1: error: extended character   is not valid in an identifier
   38 |   else{
      | ^
a.cc:38:1: error: extended character   is not valid in an identifier
a.cc:39:1: error: extended character   is not valid in an identifier
   39 |     if(dat[k].first!=INT_MAX){
      | ^
a.cc:39:1: error: extended character   is not valid in an identifier
a.cc:39:1: error: extended character   is not valid in an identifier
a.cc:39:1: error: extended character   is not valid in an identifier
a.cc:40:1: error: extended character   is not valid in an identifier
   40 |       dat[k*2+1].first=dat[k*2+1].second=dat[k].first;
      | ^
a.cc:40:1: error: extended character   is not valid in an identifier
a.cc:40:1: error: extended character   is not valid in an identifier
a.cc:40:1: error: extended character   is not valid in an identifier
a.cc:40:1: error: extended character   is not valid in an identifier
a.cc:40:1: error: extended character   is not valid in an identifier
a.cc:41:1: error: extended character   is not valid in an identifier
   41 |       dat[k*2+2].first=dat[k*2+2].second=dat[k].first;
      | ^
a.cc:41:1: error: extended character   is not valid in an identifier
a.cc:41:1: error: extended character   is not valid in an identifier
a.cc:41:1: error: extended character   is not valid in an identifier
a.cc:41:1: error: extended character   is not valid in an identifier
a.cc:41:1: error: extended character   is not valid in an identifier
a.cc:42:1: error: extended character   is not valid in an identifier
   42 |       dat[k].first=INT_MAX;
      | ^
a.cc:42:1: error: extended character   is not valid in an identifier
a.cc:42:1: error: extended character   is not valid in an identifier
a.cc:42:1: error: extended character   is not valid in an identifier
a.cc:42:1: error: extended character   is not valid in an identifier
a.cc:42:1: error: extended character   is not valid in an identifier
a.cc:43:1: error: extended character   is not valid in an identifier
   43 |     }
      | ^
a.cc:43:1: error: extended character   is not valid in an identifier
a.cc:43:1: error: extended character   is not valid in an identifier
a.cc:43:1: error: extended character   is not valid in an identifier
a.cc:44:1: error: extended character   is not valid in an identifier
   44 |     return min(find(a,b,k*2+1,l,(l+r)/2),find(a,b,k*2+2,(l+r)/2,r));
      | ^
a.cc:44:1: error: extended character   is not valid in an identifier
a.cc:44:1: error: extended character   is not valid in an identifier
a.cc:44:1: error: extended character   is not valid in an identifier
a.cc:45:1: error: extended character   is not valid in an identifier
   45 |   }
      | ^
a.cc:45:1: error: extended character   is not valid in an identifier
a.cc:47:1: error: extended character   is not valid in an identifier
   47 |  
      | ^
a.cc:49:1: error: extended character   is not valid in an identifier
   49 |   int q;
      | ^
a.cc:49:1: error: extended character   is not valid in an identifier
a.cc:50:1: error: extended character   is not valid in an identifier
   50 |   cin>>n>>q;
      | ^
a.cc:50:1: error: extended character   is not valid in an identifier
a.cc:51:1: error: extended character   is not valid in an identifier
   51 |    
      | ^
a.cc:51:1: error: extended character   is not valid in an identifier
a.cc:51:1: error: extended character   is not valid in an identifier
a.cc:52:1: error: extended character   is not valid in an identifier
   52 |   init(n);
      | ^
a.cc:52:1: error: extended character   is not valid in an identifier
a.cc:53:1: error: extended character   is not valid in an identifier
   53 |   int u,s,t,x;
      | ^
a.cc:53:1: error: extended character   is not valid in an identifier
a.cc:54:1: error: extended character   is not valid in an identifier
   54 |   for(int i=0;i<q;i++){
      | ^