Submission details
Task:Dynamic Range Minimum Queries
Sender:aalto26dh_020
Submission time:2026-09-18 17:03:31 +0300
Language:C++ (C++20)
Status:READY
Result:
Test results
testverdicttime
#10.00 sdetails
#2--details

Code

#include <bits/stdc++.h>

using namespace std;

#define F(n) for (int i = 0; i < n; ++i)

int main() {
    int n, q;

    cin >> n >> q;

    vector<int> x;

    F(n) {
        int tmp;

        cin >> tmp;
        x.push_back(tmp);
    }

    F(q) {
        int type, a, b;
        cin >> type >> a >> b;

        if (type == 1) {
            x[a - 1] = b; 
        } else if (type == 2) {
            cout << *min_element(x.begin() + a, x.begin() + b) << endl;
        }
    }


    return (0);
}

Test details

Test 1

Verdict:

input
8 80
7 6 4 6 2 9 4 8
2 1 1
2 1 2
2 1 3
...

correct output
7
6
4
4
2
...

user output
6
6
4
4
2
...

Feedback: Incorrect character on line 1 col 1: expected "7", got "6"

Test 2

Verdict:

input
200000 200000
398739055 65343131 699208332 3...

correct output
28609
129890
20378
20378
311522
...

user output
(empty)