답안 #742145

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
742145 2023-05-15T16:42:08 Z marvinthang 디지털 회로 (IOI22_circuit) C++17
100 / 100
1110 ms 35204 KB
/*************************************
*    author: marvinthang             *
*    created: 15.05.2023 23:16:51    *
*************************************/

#include "circuit.h"
#include <bits/stdc++.h>

using namespace std;

#define                  fi  first
#define                  se  second
#define                left  ___left
#define               right  ___right
#define                TIME  (1.0 * clock() / CLOCKS_PER_SEC)
#define             MASK(i)  (1LL << (i))
#define           BIT(x, i)  ((x) >> (i) & 1)
#define  __builtin_popcount  __builtin_popcountll
#define              ALL(v)  (v).begin(), (v).end()
#define           REP(i, n)  for (int i = 0, _n = (n); i < _n; ++i)
#define          REPD(i, n)  for (int i = (n); i--; )
#define        FOR(i, a, b)  for (int i = (a), _b = (b); i < _b; ++i) 
#define       FORD(i, b, a)  for (int i = (b), _a = (a); --i >= _a; ) 
#define       FORE(i, a, b)  for (int i = (a), _b = (b); i <= _b; ++i) 
#define      FORDE(i, b, a)  for (int i = (b), _a = (a); i >= _a; --i) 
#define        scan_op(...)  istream & operator >> (istream &in, __VA_ARGS__ &u)
#define       print_op(...)  ostream & operator << (ostream &out, const __VA_ARGS__ &u)
#ifdef LOCAL
    #include "debug.h"
#else
    #define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
    #define DB(...) 23
    #define db(...) 23
    #define debug(...) 23
#endif

template <class U, class V> scan_op(pair <U, V>)  { return in >> u.first >> u.second; }
template <class T> scan_op(vector <T>)  { for (size_t i = 0; i < u.size(); ++i) in >> u[i]; return in; }
template <class U, class V> print_op(pair <U, V>)  { return out << '(' << u.first << ", " << u.second << ')'; }
template <size_t i, class T> ostream & print_tuple_utils(ostream &out, const T &tup) { if constexpr(i == tuple_size<T>::value) return out << ")";  else return print_tuple_utils<i + 1, T>(out << (i ? ", " : "(") << get<i>(tup), tup); }
template <class ...U> print_op(tuple<U...>) { return print_tuple_utils<0, tuple<U...>>(out, u); }
template <class Con, class = decltype(begin(declval<Con>()))> typename enable_if <!is_same<Con, string>::value, ostream&>::type operator << (ostream &out, const Con &con) { out << '{'; for (__typeof(con.begin()) it = con.begin(); it != con.end(); ++it) out << (it == con.begin() ? "" : ", ") << *it; return out << '}'; }

const int MOD = 1e9 + 2022;
namespace Mod {

    inline void fasterLLDivMod(unsigned long long x, unsigned y, unsigned &out_d, unsigned &out_m) {
        unsigned xh = (unsigned)(x >> 32), xl = (unsigned)x, d, m;
    #ifdef __GNUC__
        asm(
            "divl %4 \n\t"
            : "=a" (d), "=d" (m)
            : "d" (xh), "a" (xl), "r" (y)
        );
    #else
        __asm {
            mov edx, dword ptr[xh];
            mov eax, dword ptr[xl];
            div dword ptr[y];
            mov dword ptr[d], eax;
            mov dword ptr[m], edx;
        };
    #endif
        out_d = d; out_m = m;
    }

    template <class T> T invGeneral(T a, T b) {
        a %= b;
        if (!a) return b == 1 ? 0 : -1;
        T x = invGeneral(b, a);
        return x == -1 ? -1 : ((1 - 1LL * b * x) / a + b) % b;
    }

    template <int MOD>
    struct ModInt {
        
        unsigned int val;

        ModInt(void): val(0) {}
        ModInt(const long long &x) { *this = x; }

        ModInt & normalize(const unsigned int &v) {
            val = v >= MOD ? v - MOD : v;
            return *this;
        }

        bool operator ! (void) { return !val; }

        ModInt & operator = (const ModInt &x) { val = x.val; return *this; }
        ModInt & operator = (const long long &x) { return normalize(x % MOD + MOD); }

        ModInt operator - (void) { return ModInt(MOD - val); }

        ModInt & operator += (const ModInt &other) { return normalize(val + other.val); }
        ModInt & operator -= (const ModInt &other) { return normalize(val + MOD - other.val); }
        ModInt & operator /= (const ModInt &other) { return *this *= other.inv(); }

        ModInt & operator *= (const ModInt &other) {
            unsigned dummy;
            fasterLLDivMod((unsigned long long) val * other.val, MOD, dummy, val);
            return *this;
        }

        ModInt operator + (const ModInt &other) const { return ModInt(*this) += other; }
        ModInt operator - (const ModInt &other) const { return ModInt(*this) -= other; }
        ModInt operator * (const ModInt &other) const { return ModInt(*this) *= other; }
        ModInt operator / (const ModInt &other) const { return ModInt(*this) /= other; }

        ModInt pow(long long n) const {
            assert(n >= 0);
            ModInt res = 1, a = *this;
            for (; n; n >>= 1, a *= a) if (n & 1) res *= a;
            return res;
        }

        ModInt inv(void) const {
            int i = invGeneral((int) val, MOD);
            assert(~i);
            return i;
        }

        ModInt & operator ++ (void) { return *this += 1; }
        ModInt & operator -- (void) { return *this -= 1; }
        ModInt operator ++ (int) { ModInt old = *this; operator ++(); return old; }
        ModInt operator -- (int) { ModInt old = *this; operator --(); return old; }

        friend ModInt operator + (const long long &x, const ModInt &y) { return ModInt(x) + y; }
        friend ModInt operator - (const long long &x, const ModInt &y) { return ModInt(x) - y; }
        friend ModInt operator * (const long long &x, const ModInt &y) { return ModInt(x) * y; }
        friend ModInt operator / (const long long &x, const ModInt &y) { return ModInt(x) / y; }
        friend ostream & operator << (ostream &out, const ModInt &x) { return out << x.val; }
        friend istream & operator >> (istream &in, ModInt &x) { long long a; in >> a; x = a; return in; }

        bool operator < (const ModInt &other) const { return val < other.val; }
        bool operator > (const ModInt &other) const { return val > other.val; }
        bool operator <= (const ModInt &other) const { return val <= other.val; }
        bool operator >= (const ModInt &other) const { return val >= other.val; }
        bool operator == (const ModInt &other) const { return val == other.val; }
        bool operator != (const ModInt &other) const { return val != other.val; }
        explicit operator bool(void) const { return val; }
        explicit operator int(void) const { return val; }

    };  

    using Modular = ModInt <MOD>;

}

using namespace Mod;

// end of template

const int MAX = 2e5 + 5;

int N, M;
Modular prod[MAX];
vector <int> adj[MAX];

void dfs(int u) {
    if (u >= N) {
        prod[u] = 1;
        return;
    }
    prod[u] = adj[u].size();
    for (int v: adj[u]) {
        dfs(v);
        prod[u] *= prod[v];
    }
}

Modular add[MAX];

void dfs2(int u, Modular f) {
    if (u >= N) {
        add[u - N] = f;
        return;
    }
    vector <Modular> pref {1};
    for (int v: adj[u]) pref.push_back(pref.back() * prod[v]);
    reverse(ALL(adj[u]));
    for (int v: adj[u]) {
        pref.pop_back();
        dfs2(v, f * pref.back());
        f *= prod[v];
    }
}

Modular st[MAX << 2][2];
bool flip[MAX << 2];
bool states[MAX];

void build(int i, int l, int r) {
    if (r - l == 1) {
        st[i][!states[l]] = 0;
        st[i][states[l]] = add[l];
        return;
    }
    int m = l + r >> 1;
    build(i << 1, l, m);
    build(i << 1 | 1, m, r);
    REP(t, 2) st[i][t] = st[i << 1][t] + st[i << 1 | 1][t];
}

void pushDown(int i) {
    if (!flip[i]) return;
    FORE(c, i << 1, i << 1 | 1) {
        swap(st[c][0], st[c][1]);
        flip[c] = !flip[c];
    }
    flip[i] = 0;
}

void update(int i, int l, int r, int u, int v) {
    if (l >= v || r <= u) return;
    if (u <= l && r <= v) {
        flip[i] = !flip[i];
        swap(st[i][0], st[i][1]);
        return;
    }
    pushDown(i);
    int m = l + r >> 1;
    update(i << 1, l, m, u, v);
    update(i << 1 | 1, m, r, u, v);
    REP(t, 2) st[i][t] = st[i << 1][t] + st[i << 1 | 1][t];
}

void init(int n, int m, vector <int> P, vector <int> A) {
    N = n; M = m;
    REP(i, M) states[i] = A[i];
    FOR(i, 1, N + M) adj[P[i]].push_back(i);
    dfs(0);
    dfs2(0, 1);
    build(1, 0, M);
}

int count_ways(int L, int R) {
    update(1, 0, M, L - N, R - N + 1);
    return (int) st[1][1];
}

#ifdef LOCAL
#include "circuit.h"

#include <cassert>
#include <cstdio>

#include <vector>

int main() {
    file("circuit");
  int N, M, Q;
  assert(3 == scanf("%d %d %d", &N, &M, &Q));
  std::vector<int> P(N + M), A(M);
  for (int i = 0; i < N + M; ++i) {
    assert(1 == scanf("%d", &P[i]));
  }
  for (int j = 0; j < M; ++j) {
    assert(1 == scanf("%d", &A[j]));
  }
  init(N, M, P, A);

  for (int i = 0; i < Q; ++i) {
    int L, R;
    assert(2 == scanf("%d %d", &L, &R));
    printf("%d\n", count_ways(L, R));
  }
  return 0;
}
#endif

Compilation message

circuit.cpp: In function 'void build(int, int, int)':
circuit.cpp:198:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  198 |     int m = l + r >> 1;
      |             ~~^~~
circuit.cpp: In function 'void update(int, int, int, int, int)':
circuit.cpp:221:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  221 |     int m = l + r >> 1;
      |             ~~^~~
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 12792 KB Output is correct
2 Correct 7 ms 12752 KB Output is correct
3 Correct 7 ms 12752 KB Output is correct
4 Correct 7 ms 12752 KB Output is correct
5 Correct 7 ms 12752 KB Output is correct
6 Correct 7 ms 12752 KB Output is correct
7 Correct 7 ms 12752 KB Output is correct
8 Correct 8 ms 12752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 12752 KB Output is correct
2 Correct 7 ms 12752 KB Output is correct
3 Correct 7 ms 12752 KB Output is correct
4 Correct 7 ms 12824 KB Output is correct
5 Correct 7 ms 12752 KB Output is correct
6 Correct 7 ms 12752 KB Output is correct
7 Correct 7 ms 12824 KB Output is correct
8 Correct 7 ms 12832 KB Output is correct
9 Correct 10 ms 12796 KB Output is correct
10 Correct 9 ms 13008 KB Output is correct
11 Correct 8 ms 13008 KB Output is correct
12 Correct 7 ms 12752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 12792 KB Output is correct
2 Correct 7 ms 12752 KB Output is correct
3 Correct 7 ms 12752 KB Output is correct
4 Correct 7 ms 12752 KB Output is correct
5 Correct 7 ms 12752 KB Output is correct
6 Correct 7 ms 12752 KB Output is correct
7 Correct 7 ms 12752 KB Output is correct
8 Correct 8 ms 12752 KB Output is correct
9 Correct 6 ms 12752 KB Output is correct
10 Correct 7 ms 12752 KB Output is correct
11 Correct 7 ms 12752 KB Output is correct
12 Correct 7 ms 12824 KB Output is correct
13 Correct 7 ms 12752 KB Output is correct
14 Correct 7 ms 12752 KB Output is correct
15 Correct 7 ms 12824 KB Output is correct
16 Correct 7 ms 12832 KB Output is correct
17 Correct 10 ms 12796 KB Output is correct
18 Correct 9 ms 13008 KB Output is correct
19 Correct 8 ms 13008 KB Output is correct
20 Correct 7 ms 12752 KB Output is correct
21 Correct 7 ms 12752 KB Output is correct
22 Correct 8 ms 12752 KB Output is correct
23 Correct 7 ms 12752 KB Output is correct
24 Correct 7 ms 12880 KB Output is correct
25 Correct 8 ms 12880 KB Output is correct
26 Correct 8 ms 12880 KB Output is correct
27 Correct 8 ms 12852 KB Output is correct
28 Correct 8 ms 12880 KB Output is correct
29 Correct 8 ms 12752 KB Output is correct
30 Correct 7 ms 12832 KB Output is correct
31 Correct 7 ms 12904 KB Output is correct
32 Correct 9 ms 12880 KB Output is correct
33 Correct 7 ms 12748 KB Output is correct
34 Correct 7 ms 12752 KB Output is correct
35 Correct 8 ms 12752 KB Output is correct
36 Correct 8 ms 13008 KB Output is correct
37 Correct 8 ms 12996 KB Output is correct
38 Correct 9 ms 13008 KB Output is correct
39 Correct 7 ms 12880 KB Output is correct
40 Correct 8 ms 12828 KB Output is correct
41 Correct 8 ms 12840 KB Output is correct
42 Correct 7 ms 12752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 531 ms 14600 KB Output is correct
2 Correct 1110 ms 16400 KB Output is correct
3 Correct 881 ms 16388 KB Output is correct
4 Correct 758 ms 16408 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 531 ms 14600 KB Output is correct
2 Correct 1110 ms 16400 KB Output is correct
3 Correct 881 ms 16388 KB Output is correct
4 Correct 758 ms 16408 KB Output is correct
5 Correct 570 ms 14604 KB Output is correct
6 Correct 797 ms 16388 KB Output is correct
7 Correct 1022 ms 16404 KB Output is correct
8 Correct 833 ms 16456 KB Output is correct
9 Correct 339 ms 12932 KB Output is correct
10 Correct 687 ms 13008 KB Output is correct
11 Correct 866 ms 13008 KB Output is correct
12 Correct 745 ms 13008 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 12752 KB Output is correct
2 Correct 7 ms 12752 KB Output is correct
3 Correct 7 ms 12752 KB Output is correct
4 Correct 7 ms 12824 KB Output is correct
5 Correct 7 ms 12752 KB Output is correct
6 Correct 7 ms 12752 KB Output is correct
7 Correct 7 ms 12824 KB Output is correct
8 Correct 7 ms 12832 KB Output is correct
9 Correct 10 ms 12796 KB Output is correct
10 Correct 9 ms 13008 KB Output is correct
11 Correct 8 ms 13008 KB Output is correct
12 Correct 7 ms 12752 KB Output is correct
13 Correct 531 ms 14600 KB Output is correct
14 Correct 1110 ms 16400 KB Output is correct
15 Correct 881 ms 16388 KB Output is correct
16 Correct 758 ms 16408 KB Output is correct
17 Correct 570 ms 14604 KB Output is correct
18 Correct 797 ms 16388 KB Output is correct
19 Correct 1022 ms 16404 KB Output is correct
20 Correct 833 ms 16456 KB Output is correct
21 Correct 339 ms 12932 KB Output is correct
22 Correct 687 ms 13008 KB Output is correct
23 Correct 866 ms 13008 KB Output is correct
24 Correct 745 ms 13008 KB Output is correct
25 Correct 742 ms 18184 KB Output is correct
26 Correct 917 ms 18584 KB Output is correct
27 Correct 882 ms 18316 KB Output is correct
28 Correct 768 ms 18376 KB Output is correct
29 Correct 986 ms 33988 KB Output is correct
30 Correct 746 ms 33924 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 12792 KB Output is correct
2 Correct 7 ms 12752 KB Output is correct
3 Correct 7 ms 12752 KB Output is correct
4 Correct 7 ms 12752 KB Output is correct
5 Correct 7 ms 12752 KB Output is correct
6 Correct 7 ms 12752 KB Output is correct
7 Correct 7 ms 12752 KB Output is correct
8 Correct 8 ms 12752 KB Output is correct
9 Correct 6 ms 12752 KB Output is correct
10 Correct 7 ms 12752 KB Output is correct
11 Correct 7 ms 12752 KB Output is correct
12 Correct 7 ms 12824 KB Output is correct
13 Correct 7 ms 12752 KB Output is correct
14 Correct 7 ms 12752 KB Output is correct
15 Correct 7 ms 12824 KB Output is correct
16 Correct 7 ms 12832 KB Output is correct
17 Correct 10 ms 12796 KB Output is correct
18 Correct 9 ms 13008 KB Output is correct
19 Correct 8 ms 13008 KB Output is correct
20 Correct 7 ms 12752 KB Output is correct
21 Correct 7 ms 12752 KB Output is correct
22 Correct 8 ms 12752 KB Output is correct
23 Correct 7 ms 12752 KB Output is correct
24 Correct 7 ms 12880 KB Output is correct
25 Correct 8 ms 12880 KB Output is correct
26 Correct 8 ms 12880 KB Output is correct
27 Correct 8 ms 12852 KB Output is correct
28 Correct 8 ms 12880 KB Output is correct
29 Correct 8 ms 12752 KB Output is correct
30 Correct 7 ms 12832 KB Output is correct
31 Correct 7 ms 12904 KB Output is correct
32 Correct 9 ms 12880 KB Output is correct
33 Correct 7 ms 12748 KB Output is correct
34 Correct 7 ms 12752 KB Output is correct
35 Correct 8 ms 12752 KB Output is correct
36 Correct 8 ms 13008 KB Output is correct
37 Correct 8 ms 12996 KB Output is correct
38 Correct 9 ms 13008 KB Output is correct
39 Correct 7 ms 12880 KB Output is correct
40 Correct 8 ms 12828 KB Output is correct
41 Correct 8 ms 12840 KB Output is correct
42 Correct 7 ms 12752 KB Output is correct
43 Correct 633 ms 12880 KB Output is correct
44 Correct 848 ms 12948 KB Output is correct
45 Correct 752 ms 13008 KB Output is correct
46 Correct 903 ms 13008 KB Output is correct
47 Correct 693 ms 13008 KB Output is correct
48 Correct 723 ms 13008 KB Output is correct
49 Correct 893 ms 13080 KB Output is correct
50 Correct 907 ms 13080 KB Output is correct
51 Correct 859 ms 12880 KB Output is correct
52 Correct 867 ms 12880 KB Output is correct
53 Correct 661 ms 13776 KB Output is correct
54 Correct 880 ms 13008 KB Output is correct
55 Correct 837 ms 13008 KB Output is correct
56 Correct 804 ms 13008 KB Output is correct
57 Correct 829 ms 12880 KB Output is correct
58 Correct 880 ms 13776 KB Output is correct
59 Correct 973 ms 13904 KB Output is correct
60 Correct 708 ms 13904 KB Output is correct
61 Correct 627 ms 13080 KB Output is correct
62 Correct 857 ms 12880 KB Output is correct
63 Correct 803 ms 12880 KB Output is correct
64 Correct 835 ms 12944 KB Output is correct
65 Correct 497 ms 12880 KB Output is correct
66 Correct 926 ms 13008 KB Output is correct
67 Correct 667 ms 13008 KB Output is correct
68 Correct 1022 ms 13008 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 12792 KB Output is correct
2 Correct 7 ms 12752 KB Output is correct
3 Correct 7 ms 12752 KB Output is correct
4 Correct 7 ms 12752 KB Output is correct
5 Correct 7 ms 12752 KB Output is correct
6 Correct 7 ms 12752 KB Output is correct
7 Correct 7 ms 12752 KB Output is correct
8 Correct 8 ms 12752 KB Output is correct
9 Correct 6 ms 12752 KB Output is correct
10 Correct 7 ms 12752 KB Output is correct
11 Correct 7 ms 12752 KB Output is correct
12 Correct 7 ms 12824 KB Output is correct
13 Correct 7 ms 12752 KB Output is correct
14 Correct 7 ms 12752 KB Output is correct
15 Correct 7 ms 12824 KB Output is correct
16 Correct 7 ms 12832 KB Output is correct
17 Correct 10 ms 12796 KB Output is correct
18 Correct 9 ms 13008 KB Output is correct
19 Correct 8 ms 13008 KB Output is correct
20 Correct 7 ms 12752 KB Output is correct
21 Correct 7 ms 12752 KB Output is correct
22 Correct 8 ms 12752 KB Output is correct
23 Correct 7 ms 12752 KB Output is correct
24 Correct 7 ms 12880 KB Output is correct
25 Correct 8 ms 12880 KB Output is correct
26 Correct 8 ms 12880 KB Output is correct
27 Correct 8 ms 12852 KB Output is correct
28 Correct 8 ms 12880 KB Output is correct
29 Correct 8 ms 12752 KB Output is correct
30 Correct 7 ms 12832 KB Output is correct
31 Correct 7 ms 12904 KB Output is correct
32 Correct 9 ms 12880 KB Output is correct
33 Correct 7 ms 12748 KB Output is correct
34 Correct 7 ms 12752 KB Output is correct
35 Correct 8 ms 12752 KB Output is correct
36 Correct 8 ms 13008 KB Output is correct
37 Correct 8 ms 12996 KB Output is correct
38 Correct 9 ms 13008 KB Output is correct
39 Correct 7 ms 12880 KB Output is correct
40 Correct 8 ms 12828 KB Output is correct
41 Correct 8 ms 12840 KB Output is correct
42 Correct 7 ms 12752 KB Output is correct
43 Correct 531 ms 14600 KB Output is correct
44 Correct 1110 ms 16400 KB Output is correct
45 Correct 881 ms 16388 KB Output is correct
46 Correct 758 ms 16408 KB Output is correct
47 Correct 570 ms 14604 KB Output is correct
48 Correct 797 ms 16388 KB Output is correct
49 Correct 1022 ms 16404 KB Output is correct
50 Correct 833 ms 16456 KB Output is correct
51 Correct 339 ms 12932 KB Output is correct
52 Correct 687 ms 13008 KB Output is correct
53 Correct 866 ms 13008 KB Output is correct
54 Correct 745 ms 13008 KB Output is correct
55 Correct 742 ms 18184 KB Output is correct
56 Correct 917 ms 18584 KB Output is correct
57 Correct 882 ms 18316 KB Output is correct
58 Correct 768 ms 18376 KB Output is correct
59 Correct 986 ms 33988 KB Output is correct
60 Correct 746 ms 33924 KB Output is correct
61 Correct 633 ms 12880 KB Output is correct
62 Correct 848 ms 12948 KB Output is correct
63 Correct 752 ms 13008 KB Output is correct
64 Correct 903 ms 13008 KB Output is correct
65 Correct 693 ms 13008 KB Output is correct
66 Correct 723 ms 13008 KB Output is correct
67 Correct 893 ms 13080 KB Output is correct
68 Correct 907 ms 13080 KB Output is correct
69 Correct 859 ms 12880 KB Output is correct
70 Correct 867 ms 12880 KB Output is correct
71 Correct 661 ms 13776 KB Output is correct
72 Correct 880 ms 13008 KB Output is correct
73 Correct 837 ms 13008 KB Output is correct
74 Correct 804 ms 13008 KB Output is correct
75 Correct 829 ms 12880 KB Output is correct
76 Correct 880 ms 13776 KB Output is correct
77 Correct 973 ms 13904 KB Output is correct
78 Correct 708 ms 13904 KB Output is correct
79 Correct 627 ms 13080 KB Output is correct
80 Correct 857 ms 12880 KB Output is correct
81 Correct 803 ms 12880 KB Output is correct
82 Correct 835 ms 12944 KB Output is correct
83 Correct 497 ms 12880 KB Output is correct
84 Correct 926 ms 13008 KB Output is correct
85 Correct 667 ms 13008 KB Output is correct
86 Correct 1022 ms 13008 KB Output is correct
87 Correct 6 ms 12752 KB Output is correct
88 Correct 599 ms 17924 KB Output is correct
89 Correct 1073 ms 16712 KB Output is correct
90 Correct 926 ms 16400 KB Output is correct
91 Correct 1033 ms 18432 KB Output is correct
92 Correct 920 ms 18432 KB Output is correct
93 Correct 939 ms 18520 KB Output is correct
94 Correct 1097 ms 18408 KB Output is correct
95 Correct 949 ms 18508 KB Output is correct
96 Correct 779 ms 15552 KB Output is correct
97 Correct 1002 ms 15552 KB Output is correct
98 Correct 707 ms 32256 KB Output is correct
99 Correct 887 ms 18504 KB Output is correct
100 Correct 918 ms 16392 KB Output is correct
101 Correct 804 ms 15868 KB Output is correct
102 Correct 876 ms 14888 KB Output is correct
103 Correct 765 ms 34048 KB Output is correct
104 Correct 899 ms 35112 KB Output is correct
105 Correct 719 ms 35204 KB Output is correct
106 Correct 804 ms 19848 KB Output is correct
107 Correct 809 ms 15432 KB Output is correct
108 Correct 998 ms 15364 KB Output is correct
109 Correct 866 ms 15056 KB Output is correct