library2

This documentation is automatically generated by competitive-verifier/competitive-verifier

View the Project on GitHub goodstudyqaq/library2

:heavy_check_mark: test/aoj-dsl-2-a.test.cpp

Depends on

Code

// competitive-verifier: PROBLEM http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=DSL_2_A
#include <bits/stdc++.h>

#include "../structure/segment-tree/segment-tree.hpp"

using namespace std;

#ifdef LOCAL
#include "copypaste/debug.h"
#else
#define debug(...) 42
#endif

struct fast_ios {
    fast_ios() {
        cin.tie(nullptr);
        ios::sync_with_stdio(false);
        cout << fixed << setprecision(10);
    };
} fast_ios_;
struct Info {
    // 默认值
    int x;
    Info(int _x = INT_MAX) {
        x = _x;
    }
    static Info merge(const Info& left_info, const Info& right_info, int l, int r) { return Info(min(left_info.x, right_info.x)); };

    string to_string() {
        return std::to_string(x);
    }
};

int main() {
#ifdef LOCAL
    freopen("./data.in", "r", stdin);
#endif

    int n, q;
    cin >> n >> q;
    SegmentTree<Info> seg(n);
    while (q--) {
        int t, x, y;
        cin >> t >> x >> y;
        if (t == 0) {
            seg.assign(x, Info(y));
        } else {
            cout << seg.rangeQuery(x, y + 1).x << endl;
        }
    }
    return 0;
}
Traceback (most recent call last):
  File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj_resolve/resolver.py", line 181, in resolve
    bundled_code = language.bundle(path, basedir=basedir)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj/verify/languages/cplusplus.py", line 252, in bundle
    bundler.update(path)
  File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj/verify/languages/cplusplus_bundle.py", line 477, in update
    raise BundleErrorAt(
competitive_verifier.oj.verify.languages.cplusplus_bundle.BundleErrorAt: test/aoj-dsl-2-a.test.cpp: line 9: unable to process #include in #if / #ifdef / #ifndef other than include guards

Test cases

Env Name Status Elapsed Memory
g++ 00_small_00.in :heavy_check_mark: AC 5 ms 4 MB
g++ 00_small_01.in :heavy_check_mark: AC 4 ms 4 MB
g++ 00_small_02.in :heavy_check_mark: AC 4 ms 4 MB
g++ 00_small_03.in :heavy_check_mark: AC 4 ms 4 MB
g++ 01_rand_00.in :heavy_check_mark: AC 4 ms 4 MB
g++ 01_rand_01.in :heavy_check_mark: AC 4 ms 4 MB
g++ 01_rand_02.in :heavy_check_mark: AC 4 ms 4 MB
g++ 01_rand_03.in :heavy_check_mark: AC 4 ms 4 MB
g++ 02_biased_00.in :heavy_check_mark: AC 4 ms 4 MB
g++ 02_biased_01.in :heavy_check_mark: AC 4 ms 4 MB
g++ 02_biased_02.in :heavy_check_mark: AC 4 ms 4 MB
g++ 02_biased_03.in :heavy_check_mark: AC 62 ms 4 MB
g++ 03_rand_00.in :heavy_check_mark: AC 5 ms 4 MB
g++ 03_rand_01.in :heavy_check_mark: AC 16 ms 4 MB
g++ 03_rand_02.in :heavy_check_mark: AC 13 ms 4 MB
g++ 03_rand_03.in :heavy_check_mark: AC 17 ms 4 MB
g++ 03_rand_04.in :heavy_check_mark: AC 86 ms 4 MB
g++ 03_rand_05.in :heavy_check_mark: AC 96 ms 4 MB
g++ 04_maximum_00.in :heavy_check_mark: AC 137 ms 4 MB
g++ 04_maximum_01.in :heavy_check_mark: AC 91 ms 4 MB
Back to top page