Submission #891232

# Submission time Handle Problem Language Result Execution time Memory
891232 2023-12-22T14:26:04 Z Zanite Bulldozer (JOI17_bulldozer) C++17
100 / 100
1010 ms 81072 KB
// When we're in drama,
// there's that person over there
// polishing their skill.

// 抗えぬ運命と決まっているのなら
// 私はあなたの為に生きたい
// 誰かの為に生きてこその人生
// 輝を増すこと知っているから

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

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

// Namespaces
using namespace std;
using namespace __gnu_pbds;

// Data types
using si  = short int;
using ll  = long long;
using ull = unsigned long long;
using lll = __int128;
using ld  = long double;

// Pairs
using pii  = pair<int, int>;
using psi  = pair<si, si>;
using pll  = pair<ll, ll>;
using plll = pair<lll, lll>;
using pld  = pair<ld, ld>;
#define fi first
#define se second

// PBDS
template<typename Z>
using ordered_set = tree<Z, null_type, less<Z>, rb_tree_tag, tree_order_statistics_node_update>;

// Various outputs
template<typename Y, typename Z>
ostream& operator<<(ostream &os, const pair<Y, Z> &p) {
    return os << "(" << p.fi << ", " << p.se << ")";
}
template<typename RZ>
ostream& operator<<(ostream &os, const tuple<RZ, RZ> &r) {
    os << "{"; bool _first = 1;
    for (RZ i = get<0>(r); i != get<1>(r); i++) {
        if (!_first) os << ", ";
        os << *i; _first = 0;
    }
    return os << "}";
}
template<typename Z>
ostream& operator<<(ostream &os, const vector<Z> &v) {
    return os << make_tuple(v.begin(), v.end());
}

// Quick macro functions
#define sqr(x)        ((x)*(x))
#define debug(x)      cout << #x << " = " << (x) << '\n'
#define debugV(v, x)  cout << #v << "[" << (x) << "] = " << (v[x]) << '\n'
#define rrebug(x)     cerr << #x << " = " << (x) << '\n'
#define rrebugV(v, x) cerr << #v << "[" << (x) << "] = " << (v[x]) << '\n'

#define All(x)       x.begin(), x.end()
#define Sort(x)      sort(All(x))
#define Reverse(x)   reverse(All(x))
#define Uniqueify(x) Sort(x); x.erase(unique(All(x)), x.end())

#define RandomSeed        chrono::steady_clock::now().time_since_epoch().count()
#define MultipleTestcases int _tc; cin >> _tc; for (int _cur_tc = 1; _cur_tc <= _tc; _cur_tc++)

// Check min and max
template<typename Z> bool chmin(Z &a, Z b) {return (b < a) ? a = b, true : false;}
template<typename Z> bool chmax(Z &a, Z b) {return (b > a) ? a = b, true : false;}
 
// Modular arithmetic
template<int MOD>
class ModInt {
  public:
    int v;
    ModInt() : v(0) {}
    ModInt(long long _v) {
        v = int((-MOD < _v && _v < MOD) ? (_v) : (_v % MOD));
        if (v < 0) v += MOD;
    }
 
    friend bool operator==(const ModInt &a, const ModInt &b) {return a.v == b.v;}
    friend bool operator!=(const ModInt &a, const ModInt &b) {return a.v != b.v;}
    friend bool operator< (const ModInt &a, const ModInt &b) {return a.v <  b.v;}
    friend bool operator<=(const ModInt &a, const ModInt &b) {return a.v <= b.v;}
    friend bool operator> (const ModInt &a, const ModInt &b) {return a.v >  b.v;}
    friend bool operator>=(const ModInt &a, const ModInt &b) {return a.v >= b.v;}
 
    ModInt &operator+=(const ModInt &a) {if ((v += a.v) >= MOD) v -= MOD; return *this;}
    ModInt &operator-=(const ModInt &a) {if ((v -= a.v) < 0) v += MOD; return *this;}
    ModInt &operator*=(const ModInt &a) {v = 1ll * v * a.v % MOD; return *this;}
    ModInt &operator/=(const ModInt &a) {return (*this) *= inverse(a);}
 
    friend ModInt pow(ModInt a, long long x) {
        ModInt res = 1;
        for (; x; x /= 2, a *= a) if (x & 1) res *= a;
        return res;
    }
    friend ModInt inverse(ModInt a) {return pow(a, MOD - 2);}
 
    ModInt operator+ () const {return ModInt( v);}
    ModInt operator- () const {return ModInt(-v);}
    ModInt operator++() const {return *this += 1;}
    ModInt operator--() const {return *this -= 1;}
 
    friend ModInt operator+(ModInt a, const ModInt &b) {return a += b;}
    friend ModInt operator-(ModInt a, const ModInt &b) {return a -= b;}
    friend ModInt operator*(ModInt a, const ModInt &b) {return a *= b;}
    friend ModInt operator/(ModInt a, const ModInt &b) {return a /= b;}
 
    friend istream &operator>>(istream &is, ModInt &v) {return is >> v.v;}
    friend ostream &operator<<(ostream &os, const ModInt &v) {return os << v.v;}
};
const int ModA = 998244353;
const int ModC = 1e9 + 7;
using MintA    = ModInt<ModA>;
using MintC    = ModInt<ModC>;

// Other constants
const ll INF  = 1e18;
const ll iINF = 1e9;
const ld EPS  = 1e-9;
const ld iEPS = 1e-6;

struct Segtree {
    struct Elm {
        ll pf, sf, mx, sum;
        Elm() {
            pf = sf = mx = -INF;
            sum = 0;
        }
        Elm(ll val) {
            pf = sf = mx = max(val, 0ll);
            sum = val;
        }
    };
	Elm DEFAULT = Elm();

	#define m	((l+r) >> 1)
	#define lc	(pos << 1)
	#define rc	(lc | 1)

	int sz;
	vector<Elm> seg;

	Segtree(int sz) : sz(sz) {seg.assign((sz << 2) + 1, DEFAULT);}

	void updateNode(int pos, ll val) {
		seg[pos] = Elm(val);
	}

	Elm merge(Elm a, Elm b) {
		Elm nw = Elm();
        nw.pf = max({-INF, a.pf, a.sum + b.pf});
        nw.sf = max({-INF, b.sf, b.sum + a.sf});
        nw.mx = max({-INF, a.mx, b.mx, a.sf + b.pf});
        nw.sum = a.sum + b.sum;
        return nw;
	}

	void update(int pos, int l, int r, int idx, ll val) {
		if (l == r) {
			updateNode(pos, val);
			return;
		}

		if (idx <= m) {update(lc, l, m, idx, val);}
		else {update(rc, m+1, r, idx, val);}
		seg[pos] = merge(seg[lc], seg[rc]);
	}
	void update(int idx, ll val) {update(1, 1, sz, idx, val);}

	Elm query(int pos, int l, int r, int ql, int qr) {
		if (l > r || ql > qr || ql > r || l > qr) {return DEFAULT;}
		if (ql <= l && r <= qr) {return seg[pos];}

		return merge(query(lc, l, m, ql, qr), query(rc, m+1, r, ql, qr));
	}
	Elm query(int ql, int qr) {return query(1, 1, sz, ql, qr);}

	#undef	m
	#undef	lc
	#undef	rc
};

bool _less(ld x, ld y) {return x - y < -EPS;}
bool _greater(ld x, ld y) {return x - y > EPS;}

using TempPoint = tuple<ll, ll, ll>; // {x, y, w}

const int maxN  = 2'023;

int N;
TempPoint TP[maxN];
pll P[maxN];
ll W[maxN];
ld C[maxN][maxN];
vector<pii> pairs;
int pos[maxN];

ld getLineC(pll a, pll b) {
    if (a.fi == b.fi) {
        return -a.fi;
    } else {
        ld d = -(ld)(a.se - b.se) / (ld)(a.fi - b.fi);
        ld c = -d * (ld)(a.fi) - (ld)a.se;
        return c;
    }
}

int compareSlope(pii a, pii b) {
    pll A1 = P[a.fi], A2 = P[a.se];
    pll B1 = P[b.fi], B2 = P[b.se];

    bool a_inf = (A1.fi == A2.fi);
    bool b_inf = (B1.fi == B2.fi);
    if (a_inf && b_inf) return 0;
    if (a_inf) return -1;
    if (b_inf) return 1;

    //    (A2.y - A1.y) / (A1.x - A2.x) - (B2.y - B1.y) / (B1.x - B2.x)
    // -> (A2.y - A1.y)(B1.x - B2.x) - (B2.y - B1.y)(A1.x - A2.x)

    ll cur = (A2.se - A1.se) * (B1.fi - B2.fi) - (B2.se - B1.se) * (A1.fi - A2.fi);
    if (cur < 0) return -1;
    if (cur > 0) return 1;
    return 0;
}

int main() {
    ios_base::sync_with_stdio(false); cin.tie(NULL);
    
    cin >> N;
    for (int i = 1; i <= N; i++) {
        auto &[x, y, w] = TP[i];
        cin >> x >> y >> w;
    }

    sort(TP + 1, TP + N + 1);
    for (int i = 1; i <= N; i++) {
        auto &[x, y, w] = TP[i];
        P[i] = {x, y};
        W[i] = w;
    }

    for (int i = 1; i <= N; i++) {
        for (int j = i; j <= N; j++) {
            C[i][j] = getLineC(P[i], P[j]);
            pairs.push_back({i, j});
        }
    }

    sort(All(pairs), [&](const pii &a, const pii &b){
        auto &[ai, aj] = a;
        auto &[bi, bj] = b;

        int cs = compareSlope(a, b);
        if (cs == -1) return true;
        if (cs == 1) return false;

        if (_less(C[ai][aj], C[bi][bj])) return true;
        if (_greater(C[ai][aj], C[bi][bj])) return false;

        if (ai < bi) return true;
        if (ai > bi) return false;
        return aj < bj;
    });

    Segtree S(N);
    for (int i = 1; i <= N; i++) {
        pos[i] = i;
        S.update(i, W[i]);
    }
    ll ans = S.query(1, N).mx;
    int P = pairs.size();

    for (int i = 0; i < P; i++) {
        auto &[ci, cj] = pairs[i];
        swap(pos[ci], pos[cj]);
        S.update(pos[ci], W[ci]);
        S.update(pos[cj], W[cj]);

        bool process = true;
        if (i < P-1) {
            if (compareSlope(pairs[i], pairs[i+1]) != -1) {
                process = false;
            }
        }

        if (process) {
            chmax(ans, S.query(1, N).mx);
        }
    }

    cout << ans << "\n";
}

// あなたの傍に居させて...

// dibisakan
# Verdict Execution time Memory Grader output
1 Correct 3 ms 4700 KB Output is correct
2 Correct 4 ms 4700 KB Output is correct
3 Correct 3 ms 4700 KB Output is correct
4 Correct 3 ms 4700 KB Output is correct
5 Correct 3 ms 4696 KB Output is correct
6 Correct 3 ms 4700 KB Output is correct
7 Correct 3 ms 4700 KB Output is correct
8 Correct 3 ms 4700 KB Output is correct
9 Correct 3 ms 4700 KB Output is correct
10 Correct 3 ms 4732 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 4700 KB Output is correct
2 Correct 2 ms 4700 KB Output is correct
3 Correct 2 ms 4700 KB Output is correct
4 Correct 2 ms 4624 KB Output is correct
5 Correct 2 ms 4700 KB Output is correct
6 Correct 2 ms 4736 KB Output is correct
7 Correct 2 ms 4700 KB Output is correct
8 Correct 2 ms 4700 KB Output is correct
9 Correct 2 ms 4700 KB Output is correct
10 Correct 2 ms 4700 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 0 ms 600 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 2 ms 4700 KB Output is correct
22 Correct 2 ms 4700 KB Output is correct
23 Correct 2 ms 4696 KB Output is correct
24 Correct 2 ms 4700 KB Output is correct
25 Correct 2 ms 4732 KB Output is correct
26 Correct 2 ms 4952 KB Output is correct
27 Correct 2 ms 4700 KB Output is correct
28 Correct 2 ms 4700 KB Output is correct
29 Correct 2 ms 4700 KB Output is correct
30 Correct 2 ms 4696 KB Output is correct
31 Correct 2 ms 4696 KB Output is correct
32 Correct 2 ms 4896 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 4700 KB Output is correct
2 Correct 2 ms 4700 KB Output is correct
3 Correct 2 ms 4700 KB Output is correct
4 Correct 2 ms 4624 KB Output is correct
5 Correct 2 ms 4700 KB Output is correct
6 Correct 2 ms 4736 KB Output is correct
7 Correct 2 ms 4700 KB Output is correct
8 Correct 2 ms 4700 KB Output is correct
9 Correct 2 ms 4700 KB Output is correct
10 Correct 2 ms 4700 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 0 ms 600 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 2 ms 4700 KB Output is correct
22 Correct 2 ms 4700 KB Output is correct
23 Correct 2 ms 4696 KB Output is correct
24 Correct 2 ms 4700 KB Output is correct
25 Correct 2 ms 4732 KB Output is correct
26 Correct 2 ms 4952 KB Output is correct
27 Correct 2 ms 4700 KB Output is correct
28 Correct 2 ms 4700 KB Output is correct
29 Correct 2 ms 4700 KB Output is correct
30 Correct 2 ms 4696 KB Output is correct
31 Correct 2 ms 4696 KB Output is correct
32 Correct 2 ms 4896 KB Output is correct
33 Correct 885 ms 80056 KB Output is correct
34 Correct 920 ms 80096 KB Output is correct
35 Correct 900 ms 80396 KB Output is correct
36 Correct 887 ms 80044 KB Output is correct
37 Correct 885 ms 80092 KB Output is correct
38 Correct 894 ms 80064 KB Output is correct
39 Correct 883 ms 80556 KB Output is correct
40 Correct 958 ms 80116 KB Output is correct
41 Correct 881 ms 80300 KB Output is correct
42 Correct 868 ms 80092 KB Output is correct
43 Correct 900 ms 80304 KB Output is correct
44 Correct 874 ms 80192 KB Output is correct
45 Correct 860 ms 80056 KB Output is correct
46 Correct 869 ms 80060 KB Output is correct
47 Correct 873 ms 80584 KB Output is correct
48 Correct 896 ms 80092 KB Output is correct
49 Correct 872 ms 80048 KB Output is correct
50 Correct 882 ms 80604 KB Output is correct
51 Correct 868 ms 80308 KB Output is correct
52 Correct 915 ms 80096 KB Output is correct
53 Correct 881 ms 80132 KB Output is correct
54 Correct 871 ms 80092 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 4700 KB Output is correct
2 Correct 2 ms 4700 KB Output is correct
3 Correct 2 ms 4700 KB Output is correct
4 Correct 2 ms 4624 KB Output is correct
5 Correct 2 ms 4700 KB Output is correct
6 Correct 2 ms 4736 KB Output is correct
7 Correct 2 ms 4700 KB Output is correct
8 Correct 2 ms 4700 KB Output is correct
9 Correct 2 ms 4700 KB Output is correct
10 Correct 2 ms 4700 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 0 ms 600 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 2 ms 4700 KB Output is correct
22 Correct 2 ms 4700 KB Output is correct
23 Correct 2 ms 4696 KB Output is correct
24 Correct 2 ms 4700 KB Output is correct
25 Correct 2 ms 4732 KB Output is correct
26 Correct 2 ms 4952 KB Output is correct
27 Correct 2 ms 4700 KB Output is correct
28 Correct 2 ms 4700 KB Output is correct
29 Correct 2 ms 4700 KB Output is correct
30 Correct 2 ms 4696 KB Output is correct
31 Correct 2 ms 4696 KB Output is correct
32 Correct 2 ms 4896 KB Output is correct
33 Correct 885 ms 80056 KB Output is correct
34 Correct 920 ms 80096 KB Output is correct
35 Correct 900 ms 80396 KB Output is correct
36 Correct 887 ms 80044 KB Output is correct
37 Correct 885 ms 80092 KB Output is correct
38 Correct 894 ms 80064 KB Output is correct
39 Correct 883 ms 80556 KB Output is correct
40 Correct 958 ms 80116 KB Output is correct
41 Correct 881 ms 80300 KB Output is correct
42 Correct 868 ms 80092 KB Output is correct
43 Correct 900 ms 80304 KB Output is correct
44 Correct 874 ms 80192 KB Output is correct
45 Correct 860 ms 80056 KB Output is correct
46 Correct 869 ms 80060 KB Output is correct
47 Correct 873 ms 80584 KB Output is correct
48 Correct 896 ms 80092 KB Output is correct
49 Correct 872 ms 80048 KB Output is correct
50 Correct 882 ms 80604 KB Output is correct
51 Correct 868 ms 80308 KB Output is correct
52 Correct 915 ms 80096 KB Output is correct
53 Correct 881 ms 80132 KB Output is correct
54 Correct 871 ms 80092 KB Output is correct
55 Correct 895 ms 80304 KB Output is correct
56 Correct 876 ms 80304 KB Output is correct
57 Correct 899 ms 80316 KB Output is correct
58 Correct 878 ms 80840 KB Output is correct
59 Correct 874 ms 80148 KB Output is correct
60 Correct 882 ms 80304 KB Output is correct
61 Correct 887 ms 80096 KB Output is correct
62 Correct 878 ms 80092 KB Output is correct
63 Correct 915 ms 80100 KB Output is correct
64 Correct 874 ms 80556 KB Output is correct
65 Correct 914 ms 80300 KB Output is correct
66 Correct 879 ms 80300 KB Output is correct
67 Correct 893 ms 80688 KB Output is correct
68 Correct 873 ms 80464 KB Output is correct
69 Correct 879 ms 80300 KB Output is correct
70 Correct 890 ms 80044 KB Output is correct
71 Correct 885 ms 80060 KB Output is correct
72 Correct 882 ms 80092 KB Output is correct
73 Correct 876 ms 80072 KB Output is correct
74 Correct 883 ms 80044 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 4700 KB Output is correct
2 Correct 4 ms 4700 KB Output is correct
3 Correct 3 ms 4700 KB Output is correct
4 Correct 3 ms 4700 KB Output is correct
5 Correct 3 ms 4696 KB Output is correct
6 Correct 3 ms 4700 KB Output is correct
7 Correct 3 ms 4700 KB Output is correct
8 Correct 3 ms 4700 KB Output is correct
9 Correct 3 ms 4700 KB Output is correct
10 Correct 3 ms 4732 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 2 ms 4700 KB Output is correct
17 Correct 2 ms 4700 KB Output is correct
18 Correct 2 ms 4700 KB Output is correct
19 Correct 2 ms 4624 KB Output is correct
20 Correct 2 ms 4700 KB Output is correct
21 Correct 2 ms 4736 KB Output is correct
22 Correct 2 ms 4700 KB Output is correct
23 Correct 2 ms 4700 KB Output is correct
24 Correct 2 ms 4700 KB Output is correct
25 Correct 2 ms 4700 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 344 KB Output is correct
28 Correct 0 ms 600 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 2 ms 4700 KB Output is correct
37 Correct 2 ms 4700 KB Output is correct
38 Correct 2 ms 4696 KB Output is correct
39 Correct 2 ms 4700 KB Output is correct
40 Correct 2 ms 4732 KB Output is correct
41 Correct 2 ms 4952 KB Output is correct
42 Correct 2 ms 4700 KB Output is correct
43 Correct 2 ms 4700 KB Output is correct
44 Correct 2 ms 4700 KB Output is correct
45 Correct 2 ms 4696 KB Output is correct
46 Correct 2 ms 4696 KB Output is correct
47 Correct 2 ms 4896 KB Output is correct
48 Correct 885 ms 80056 KB Output is correct
49 Correct 920 ms 80096 KB Output is correct
50 Correct 900 ms 80396 KB Output is correct
51 Correct 887 ms 80044 KB Output is correct
52 Correct 885 ms 80092 KB Output is correct
53 Correct 894 ms 80064 KB Output is correct
54 Correct 883 ms 80556 KB Output is correct
55 Correct 958 ms 80116 KB Output is correct
56 Correct 881 ms 80300 KB Output is correct
57 Correct 868 ms 80092 KB Output is correct
58 Correct 900 ms 80304 KB Output is correct
59 Correct 874 ms 80192 KB Output is correct
60 Correct 860 ms 80056 KB Output is correct
61 Correct 869 ms 80060 KB Output is correct
62 Correct 873 ms 80584 KB Output is correct
63 Correct 896 ms 80092 KB Output is correct
64 Correct 872 ms 80048 KB Output is correct
65 Correct 882 ms 80604 KB Output is correct
66 Correct 868 ms 80308 KB Output is correct
67 Correct 915 ms 80096 KB Output is correct
68 Correct 881 ms 80132 KB Output is correct
69 Correct 871 ms 80092 KB Output is correct
70 Correct 895 ms 80304 KB Output is correct
71 Correct 876 ms 80304 KB Output is correct
72 Correct 899 ms 80316 KB Output is correct
73 Correct 878 ms 80840 KB Output is correct
74 Correct 874 ms 80148 KB Output is correct
75 Correct 882 ms 80304 KB Output is correct
76 Correct 887 ms 80096 KB Output is correct
77 Correct 878 ms 80092 KB Output is correct
78 Correct 915 ms 80100 KB Output is correct
79 Correct 874 ms 80556 KB Output is correct
80 Correct 914 ms 80300 KB Output is correct
81 Correct 879 ms 80300 KB Output is correct
82 Correct 893 ms 80688 KB Output is correct
83 Correct 873 ms 80464 KB Output is correct
84 Correct 879 ms 80300 KB Output is correct
85 Correct 890 ms 80044 KB Output is correct
86 Correct 885 ms 80060 KB Output is correct
87 Correct 882 ms 80092 KB Output is correct
88 Correct 876 ms 80072 KB Output is correct
89 Correct 883 ms 80044 KB Output is correct
90 Correct 884 ms 80572 KB Output is correct
91 Correct 874 ms 80112 KB Output is correct
92 Correct 876 ms 80308 KB Output is correct
93 Correct 924 ms 80048 KB Output is correct
94 Correct 874 ms 80840 KB Output is correct
95 Correct 875 ms 80060 KB Output is correct
96 Correct 888 ms 80648 KB Output is correct
97 Correct 920 ms 80064 KB Output is correct
98 Correct 876 ms 80048 KB Output is correct
99 Correct 884 ms 80056 KB Output is correct
100 Correct 891 ms 80096 KB Output is correct
101 Correct 835 ms 80100 KB Output is correct
102 Correct 870 ms 80188 KB Output is correct
103 Correct 786 ms 80096 KB Output is correct
104 Correct 830 ms 80820 KB Output is correct
105 Correct 956 ms 80092 KB Output is correct
106 Correct 910 ms 80812 KB Output is correct
107 Correct 917 ms 80824 KB Output is correct
108 Correct 974 ms 80304 KB Output is correct
109 Correct 940 ms 81072 KB Output is correct
110 Correct 940 ms 80816 KB Output is correct
111 Correct 945 ms 80092 KB Output is correct
112 Correct 1010 ms 80276 KB Output is correct
113 Correct 957 ms 80116 KB Output is correct
114 Correct 964 ms 80304 KB Output is correct
115 Correct 957 ms 80820 KB Output is correct
116 Correct 993 ms 80300 KB Output is correct
117 Correct 960 ms 80312 KB Output is correct
118 Correct 958 ms 80304 KB Output is correct
119 Correct 968 ms 80060 KB Output is correct
120 Correct 1 ms 2392 KB Output is correct
121 Correct 1 ms 2396 KB Output is correct
122 Correct 941 ms 80096 KB Output is correct
123 Correct 933 ms 80064 KB Output is correct
124 Correct 967 ms 80084 KB Output is correct
125 Correct 902 ms 80508 KB Output is correct
126 Correct 909 ms 80556 KB Output is correct
127 Correct 936 ms 80056 KB Output is correct
128 Correct 925 ms 80476 KB Output is correct
129 Correct 916 ms 80096 KB Output is correct
130 Correct 919 ms 80812 KB Output is correct
131 Correct 882 ms 80312 KB Output is correct
132 Correct 877 ms 80464 KB Output is correct
133 Correct 871 ms 79980 KB Output is correct