algorithm

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub satashun/algorithm

:warning: cpp_src/data_structure/LazySegmentTreeHelper/RangeSetMin.hpp

Code

// T1 : result, T2 : action
// range set, range minimum
// ABC382F

constexpr int INF = TEN(9);

struct U {
    using T1 = int;
    using T2 = int;
    static T1 id1() { return INF; }
    static T2 id2() { return INF; }
    static T1 op11(const T1& a, const T1& b) { return min(a, b); }
    static T1 op21(const T2& b, const T1& a) {
        if (b == INF)
            return a;
        else
            return b;
    }
    // a : new!
    static T2 op22(const T2& a, const T2& b) {
        if (a == INF)
            return b;
        else
            return a;
    }
};
#line 1 "cpp_src/data_structure/LazySegmentTreeHelper/RangeSetMin.hpp"
// T1 : result, T2 : action
// range set, range minimum
// ABC382F

constexpr int INF = TEN(9);

struct U {
    using T1 = int;
    using T2 = int;
    static T1 id1() { return INF; }
    static T2 id2() { return INF; }
    static T1 op11(const T1& a, const T1& b) { return min(a, b); }
    static T1 op21(const T2& b, const T1& a) {
        if (b == INF)
            return a;
        else
            return b;
    }
    // a : new!
    static T2 op22(const T2& a, const T2& b) {
        if (a == INF)
            return b;
        else
            return a;
    }
};
Back to top page