Language: C++

#include <bits/stdc++.h>
using namespace std;

/* #pragma */
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")


/*alias*/
#define F first
#define S second

#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define next asdnext
#define prev asdprev
#define itn int

/*template*/
template<class T>inline bool amax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>inline bool amin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }

/* func */
int32_t GCD(int32_t a, int32_t b){return b ? GCD(b, a%b) : a;}
int64_t GCD(int64_t a, int64_t b){return b ? GCD(b, a%b) : a;}
int32_t LCM(int32_t a, int32_t b){return a * b / GCD(a, b);}
int64_t LCM(int64_t a, int64_t b){return a * b / GCD(a, b);}

/*struct*/
struct aaa {
	aaa() {
		cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20);
	};
}aaaaaaa;

/* const */
constexpr int32_t INF = 1001001001;
constexpr int64_t LINF = 1001001001001001001ll;
constexpr int32_t MOD = 1e9 + 7; //10^9
constexpr int64_t EPS = 1e-9;
constexpr int32_t dx[] = { 1, 1, 0, -1, -1, -1, 0, 1 }, dy[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
//constexpr int32_t dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
//Counterclockwise from the 6o'clock direction
//Take the x-axis downward and the y-axis right


//g++ -std=c++14 -Wall --pedantic-errors -o template template.cpp
//g++ -std=c++14 -Wall --pedantic-errors template.cpp
//chcp 65001

/*global*/

template<class Monoid> 
struct SegTree{
	using ftm = function<Monoid(Monoid, Monoid)>;//Function Type Monoid
	size_t n;
	Monoid unity;
	ftm operation;
	ftm update;

	vector<Monoid> data;

	SegTree(size_t _n, Monoid _unity,        ftm _operation,    ftm _update)
	                 : unity(_unity), operation(_operation), update(_update)
	{
			   n = 1;
			   while(n < _n){
				   n *= 2;
			   }
			   data = vector<Monoid>(2*n-1, unity);
	}

	Monoid _query(int a, int b, int k, int l, int r){
		if(r <= a || b <= l) return unity;
		if(a <= l && r <= b) return data[k];
		else{
			Monoid c1 = _query(a, b, 2*k+1, l, (l+r)/2);
			Monoid c2 = _query(a, b, 2*k+2, (l+r)/2, r);
			return operation(c1, c2);
		}
	}

	void change(int i, Monoid x){
		data[i+=n-1] = update(data[i], x);
		while(i > 0){
			data[i = (i-1)/2] = operation(data[i*2+1], data[i*2+2]);
		}
	}

	Monoid query(int a, int b){
		return _query(a,b,0,0,n);
	}

	Monoid operator [](int i){
		return data[i+n-1];
	}

};

//#define int int64_t
signed main()
{
	int n, q;
	cin >> n >> q;
	SegTree<int64_t> seg(n, (1LL<<31)-1,
	                     [](int64_t a, int64_t b){return min(a,b); },
						 [](int64_t a, int64_t b){return b;});

    for(int i = 0, i < q, ++i){
        int c, x, y;
        cin >> c >> x >> y;
        if (c == 0) {
            // update(x, y)
            seg.change(x, y);
        } else {
            // find(s, t)
            cout << seg.query(x, y + 1) << endl;
        }
    }
 	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:111:21: error: expected ';' before '<' token
  111 |     for(int i = 0, i < q, ++i){
      |                     ^~
      |                     ;
a.cc:111:22: error: expected primary-expression before '<' token
  111 |     for(int i = 0, i < q, ++i){
      |                      ^
a.cc:111:30: error: expected ';' before ')' token
  111 |     for(int i = 0, i < q, ++i){
      |                              ^
      |                              ;