Submission #418118

# Submission time Handle Problem Language Result Execution time Memory
418118 2021-06-05T06:14:23 Z usachevd0 Vision Program (IOI19_vision) C++14
100 / 100
14 ms 1656 KB
#include <bits/stdc++.h>
#ifndef LOCAL
    #include "vision.h"
#endif

using namespace std;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define Time (clock() * 1.0 / CLOCKS_PER_SEC)
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
using ld = long double;
template<typename T1, typename T2> bool chkmin(T1& x, T2 y) {
    return y < x ? (x = y, true) : false;
}
template<typename T1, typename T2> bool chkmax(T1& x, T2 y) {
    return y > x ? (x = y, true) : false;
}
void debug_out() {
    cerr << endl;
}
template<typename T1, typename... T2> void debug_out(T1 A, T2... B) {
    cerr << ' ' << A;
    debug_out(B...);
}
template<typename T> void mdebug_out(T* a, int n) {
    for (int i = 0; i < n; ++i)
        cerr << a[i] << ' ';
    cerr << endl;
}
#ifdef LOCAL
    #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
    #define mdebug(a, n) cerr << #a << ": ", mdebug_out(a, n)
#else
    #define debug(...) 1337
    #define mdebug(a, n) 1337
#endif
template<typename T> ostream& operator << (ostream& stream, const vector<T>& v) {
    for (auto& x : v)
        stream << x << ' ';
    return stream;
}
template<typename T1, typename T2> ostream& operator << (ostream& stream, const pair<T1, T2>& p) {
    return stream << p.first << ' ' << p.second;
}


int add_and(vector<int> Ns);
int add_or(vector<int> Ns);
int add_xor(vector<int> Ns);
int add_not(int N);
void construct_network(int n, int m, int k) {
    if (n * m == 2) {
        add_not(add_not(0));
        return;
    }
    int zero = add_and({0, 1, 2});
    int one = add_not(zero);
    
    int last = zero;
    vector<int> px(n);
    for (int i = 0; i < n; ++i) {
        vector<int> a(m);
        for (int j = 0; j < m; ++j)
            a[j] = i * m + j;
        a.push_back(last);
        px[i] = add_xor(a);
        last = px[i];
    }
    last = zero;
    vector<int> py(m);
    for (int j = 0; j < m; ++j) {
        vector<int> a(n);
        for (int i = 0; i < n; ++i)
            a[i] = i * m + j;
        a.push_back(last);
        py[j] = add_xor(a);
        last = py[j];
    }
    
    vector<int> D(9);
    for (int b = 0; b < 9; ++b)
        D[b] = zero;
    
    function<void(int)> addD = [&](int c) {
        for (int b = 0; b < 9; ++b) {
            int nx = add_xor({D[b], c});
            int nc = add_and({D[b], c});
            D[b] = nx;
            c = nc;
        }
    };
    
    for (int i = 0; i < n; ++i)
        addD(px[i]);
    for (int j = 0; j < m; ++j)
        addD(py[j]);
    
    vector<int> K(9);
    for (int b = 0; b < 9; ++b)
        K[b] = ((k >> b) & 1 ? one : zero);
    
    vector<int> bxor(9);
    for (int b = 0; b < 9; ++b) {
        bxor[b] = add_xor({D[b], K[b]});
    }
    add_not(add_or(bxor));
}



#ifdef LOCAL
static const int MAX_INSTRUCTIONS = 10000;
static const int MAX_INPUTS = 1000000;

static const int _AND = 0;
static const int _OR = 1;
static const int _XOR = 2;
static const int _NOT = 3;

static inline bool increasing(int a, int b, int c) {
    return a <= b && b <= c;
}

[[noreturn]] static inline void error(string message) {
    printf("%s\n", message.c_str());
    exit(0);
}

class InstructionNetwork {

    struct Instruction {
        int type;
        vector<int> input_indexes;

        inline Instruction(int _type, const vector<int>& _input_indexes):
                type(_type), input_indexes(_input_indexes) {
        }

        inline int apply(int a, int b) const {
            switch (type) {
                case _AND:
                    return a & b;
                case _OR:
                    return a | b;
                case _XOR:
                    return a ^ b;
                default:
                    return 0;
            }
        }

        inline int compute(const vector<int>& memory_cells) const {
            int r = memory_cells[input_indexes[0]];
            if (type == _NOT)
                return 1 - r;
            for (int j = 1; j < (int)input_indexes.size(); j++)
                r = apply(r, memory_cells[input_indexes[j]]);
            return r;
        }
    };

    int input_size;
    int total_inputs;
    vector<Instruction> instructions;

public:

    inline void init(int _input_size) {
        this->input_size = _input_size;
        this->total_inputs = 0;
        this->instructions.clear();
    }

    inline int add_instruction(int type, const vector<int>& input_indexes) {
        if (input_indexes.size() == 0)
            error("Instruction with no inputs");

        if (instructions.size() + 1 > MAX_INSTRUCTIONS)
            error("Too many instructions");

        if (total_inputs + input_indexes.size() > MAX_INPUTS)
            error("Too many inputs");

        instructions.emplace_back(type, input_indexes);
        total_inputs += input_indexes.size();
        int new_index = input_size + (int)instructions.size() - 1;

        for (int input_index : input_indexes)
            if (!increasing(0, input_index, new_index-1))
                error("Invalid index");

        return new_index;
    }

    inline int compute(vector<int> &memory_cells) const {
        for (auto &instruction : instructions)
            memory_cells.push_back(instruction.compute(memory_cells));
        return memory_cells.back();
    }
};


static InstructionNetwork instructionNetwork;

mt19937 rng(1337);

int main() {
#ifdef LOCAL
    freopen("in", "r", stdin);
#endif
    int H, W, K;
    assert(3 == scanf("%d%d%d", &H, &W, &K));

    FILE *log_file = fopen("log.txt","w");

    instructionNetwork.init(H * W);
    construct_network(H, W, K);

    for (int test = 1; ; ++test) {
        int rowA, colA, rowB, colB;
        // assert(1 == scanf("%d", &rowA));
        // if (rowA == -1)
        //     break;
        // assert(3 == scanf("%d%d%d", &colA, &rowB, &colB));
        rowA = rng() % H, colA = rng() % H;
        rowB = rng() % H, colB = rng() % H;
        while (rowA == rowB && colA == colB) {
            rowB = rng() % H, colB = rng() % H;
        }

        if ((!increasing(0, rowA, H-1)) ||
            (!increasing(0, colA, W-1)) ||
            (!increasing(0, rowB, H-1)) ||
            (!increasing(0, colB, W-1)) ||
            (rowA == rowB && colA == colB)) {
            printf("-1\n");
            fprintf(log_file, "-1\n");
            fflush(stdout);
            fflush(log_file);
            continue;
        }

        vector<int> memory_cells;
        for (int row = 0; row < H; row++)
            for (int col = 0; col < W; col++) {
                bool active = (row == rowA && col == colA) || (row == rowB && col == colB);
                memory_cells.push_back(active ? 1 : 0);
            }
        int computation_result = instructionNetwork.compute(memory_cells);

        // printf("%d\n", computation_result);
        // fflush(stdout);

        // for(int i = 0; i < (int)memory_cells.size(); i++)
        //     fprintf(log_file, (i ? " %d" : "%d"), memory_cells[i]);
        // fprintf(log_file, "\n");
        // fflush(log_file);
        
        if (computation_result != (K == labs(rowA - rowB) + labs(colA - colB))) {
            cout << H << ' ' << W << ' ' << K << endl;
            cout << rowA << ' ' << colA << ' ' << rowB << ' ' << colB << endl;
            exit(0);
        }
        
        if (test % 1000 == 0) debug(test);
    }
    fclose(stdin);
}

int add_and(vector<int> Ns) {
    return instructionNetwork.add_instruction(_AND, Ns);
}

int add_or(vector<int> Ns) {
    return instructionNetwork.add_instruction(_OR, Ns);
}

int add_xor(vector<int> Ns) {
    return instructionNetwork.add_instruction(_XOR, Ns);
}

int add_not(int N) {
    vector<int> Ns = {N};
    return instructionNetwork.add_instruction(_NOT, Ns);
}
#endif
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 252 KB Output is correct
12 Correct 1 ms 204 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 252 KB Output is correct
12 Correct 1 ms 204 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 292 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 1 ms 204 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
25 Correct 1 ms 332 KB Output is correct
26 Correct 1 ms 292 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 252 KB Output is correct
12 Correct 1 ms 204 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 292 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 1 ms 204 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
25 Correct 1 ms 332 KB Output is correct
26 Correct 1 ms 292 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
28 Correct 1 ms 332 KB Output is correct
29 Correct 1 ms 332 KB Output is correct
30 Correct 1 ms 288 KB Output is correct
31 Correct 1 ms 332 KB Output is correct
32 Correct 1 ms 332 KB Output is correct
33 Correct 1 ms 332 KB Output is correct
34 Correct 1 ms 332 KB Output is correct
35 Correct 2 ms 420 KB Output is correct
36 Correct 1 ms 332 KB Output is correct
37 Correct 2 ms 332 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 252 KB Output is correct
12 Correct 1 ms 204 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 292 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 1 ms 204 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
25 Correct 1 ms 332 KB Output is correct
26 Correct 1 ms 292 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
28 Correct 1 ms 332 KB Output is correct
29 Correct 1 ms 332 KB Output is correct
30 Correct 1 ms 288 KB Output is correct
31 Correct 1 ms 332 KB Output is correct
32 Correct 1 ms 332 KB Output is correct
33 Correct 1 ms 332 KB Output is correct
34 Correct 1 ms 332 KB Output is correct
35 Correct 2 ms 420 KB Output is correct
36 Correct 1 ms 332 KB Output is correct
37 Correct 2 ms 332 KB Output is correct
38 Correct 5 ms 716 KB Output is correct
39 Correct 2 ms 332 KB Output is correct
40 Correct 2 ms 332 KB Output is correct
41 Correct 3 ms 588 KB Output is correct
42 Correct 3 ms 588 KB Output is correct
43 Correct 5 ms 716 KB Output is correct
44 Correct 5 ms 716 KB Output is correct
45 Correct 5 ms 716 KB Output is correct
46 Correct 6 ms 716 KB Output is correct
47 Correct 5 ms 716 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 588 KB Output is correct
2 Correct 3 ms 588 KB Output is correct
3 Correct 3 ms 588 KB Output is correct
4 Correct 3 ms 588 KB Output is correct
5 Correct 3 ms 588 KB Output is correct
6 Correct 3 ms 588 KB Output is correct
7 Correct 3 ms 588 KB Output is correct
8 Correct 3 ms 588 KB Output is correct
9 Correct 3 ms 588 KB Output is correct
10 Correct 3 ms 588 KB Output is correct
11 Correct 3 ms 588 KB Output is correct
12 Correct 3 ms 588 KB Output is correct
13 Correct 3 ms 588 KB Output is correct
14 Correct 3 ms 588 KB Output is correct
15 Correct 3 ms 588 KB Output is correct
16 Correct 3 ms 588 KB Output is correct
17 Correct 3 ms 588 KB Output is correct
18 Correct 3 ms 588 KB Output is correct
19 Correct 3 ms 588 KB Output is correct
20 Correct 3 ms 588 KB Output is correct
21 Correct 1 ms 204 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 3 ms 588 KB Output is correct
4 Correct 3 ms 588 KB Output is correct
5 Correct 2 ms 588 KB Output is correct
6 Correct 3 ms 460 KB Output is correct
7 Correct 2 ms 588 KB Output is correct
8 Correct 4 ms 588 KB Output is correct
9 Correct 4 ms 588 KB Output is correct
10 Correct 4 ms 588 KB Output is correct
11 Correct 4 ms 588 KB Output is correct
12 Correct 4 ms 588 KB Output is correct
13 Correct 3 ms 588 KB Output is correct
14 Correct 3 ms 588 KB Output is correct
15 Correct 3 ms 588 KB Output is correct
16 Correct 3 ms 588 KB Output is correct
17 Correct 3 ms 588 KB Output is correct
18 Correct 3 ms 588 KB Output is correct
19 Correct 3 ms 588 KB Output is correct
20 Correct 8 ms 1096 KB Output is correct
21 Correct 9 ms 1100 KB Output is correct
22 Correct 8 ms 1096 KB Output is correct
23 Correct 8 ms 1084 KB Output is correct
24 Correct 8 ms 1096 KB Output is correct
25 Correct 8 ms 1104 KB Output is correct
26 Correct 8 ms 1096 KB Output is correct
27 Correct 13 ms 1624 KB Output is correct
28 Correct 14 ms 1608 KB Output is correct
29 Correct 13 ms 1608 KB Output is correct
30 Correct 14 ms 1608 KB Output is correct
31 Correct 14 ms 1608 KB Output is correct
32 Correct 1 ms 204 KB Output is correct
33 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 14 ms 1608 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 3 ms 588 KB Output is correct
4 Correct 4 ms 588 KB Output is correct
5 Correct 3 ms 588 KB Output is correct
6 Correct 3 ms 588 KB Output is correct
7 Correct 8 ms 1012 KB Output is correct
8 Correct 8 ms 1096 KB Output is correct
9 Correct 13 ms 1608 KB Output is correct
10 Correct 0 ms 204 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 252 KB Output is correct
12 Correct 1 ms 204 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 1 ms 204 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 1 ms 292 KB Output is correct
22 Correct 1 ms 204 KB Output is correct
23 Correct 1 ms 204 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
25 Correct 1 ms 332 KB Output is correct
26 Correct 1 ms 292 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
28 Correct 1 ms 332 KB Output is correct
29 Correct 1 ms 332 KB Output is correct
30 Correct 1 ms 288 KB Output is correct
31 Correct 1 ms 332 KB Output is correct
32 Correct 1 ms 332 KB Output is correct
33 Correct 1 ms 332 KB Output is correct
34 Correct 1 ms 332 KB Output is correct
35 Correct 2 ms 420 KB Output is correct
36 Correct 1 ms 332 KB Output is correct
37 Correct 2 ms 332 KB Output is correct
38 Correct 5 ms 716 KB Output is correct
39 Correct 2 ms 332 KB Output is correct
40 Correct 2 ms 332 KB Output is correct
41 Correct 3 ms 588 KB Output is correct
42 Correct 3 ms 588 KB Output is correct
43 Correct 5 ms 716 KB Output is correct
44 Correct 5 ms 716 KB Output is correct
45 Correct 5 ms 716 KB Output is correct
46 Correct 6 ms 716 KB Output is correct
47 Correct 5 ms 716 KB Output is correct
48 Correct 3 ms 588 KB Output is correct
49 Correct 3 ms 588 KB Output is correct
50 Correct 3 ms 588 KB Output is correct
51 Correct 3 ms 588 KB Output is correct
52 Correct 3 ms 588 KB Output is correct
53 Correct 3 ms 588 KB Output is correct
54 Correct 3 ms 588 KB Output is correct
55 Correct 3 ms 588 KB Output is correct
56 Correct 3 ms 588 KB Output is correct
57 Correct 3 ms 588 KB Output is correct
58 Correct 3 ms 588 KB Output is correct
59 Correct 3 ms 588 KB Output is correct
60 Correct 3 ms 588 KB Output is correct
61 Correct 3 ms 588 KB Output is correct
62 Correct 3 ms 588 KB Output is correct
63 Correct 3 ms 588 KB Output is correct
64 Correct 3 ms 588 KB Output is correct
65 Correct 3 ms 588 KB Output is correct
66 Correct 3 ms 588 KB Output is correct
67 Correct 3 ms 588 KB Output is correct
68 Correct 1 ms 204 KB Output is correct
69 Correct 1 ms 204 KB Output is correct
70 Correct 1 ms 204 KB Output is correct
71 Correct 1 ms 204 KB Output is correct
72 Correct 3 ms 588 KB Output is correct
73 Correct 3 ms 588 KB Output is correct
74 Correct 2 ms 588 KB Output is correct
75 Correct 3 ms 460 KB Output is correct
76 Correct 2 ms 588 KB Output is correct
77 Correct 4 ms 588 KB Output is correct
78 Correct 4 ms 588 KB Output is correct
79 Correct 4 ms 588 KB Output is correct
80 Correct 4 ms 588 KB Output is correct
81 Correct 4 ms 588 KB Output is correct
82 Correct 3 ms 588 KB Output is correct
83 Correct 3 ms 588 KB Output is correct
84 Correct 3 ms 588 KB Output is correct
85 Correct 3 ms 588 KB Output is correct
86 Correct 3 ms 588 KB Output is correct
87 Correct 3 ms 588 KB Output is correct
88 Correct 3 ms 588 KB Output is correct
89 Correct 8 ms 1096 KB Output is correct
90 Correct 9 ms 1100 KB Output is correct
91 Correct 8 ms 1096 KB Output is correct
92 Correct 8 ms 1084 KB Output is correct
93 Correct 8 ms 1096 KB Output is correct
94 Correct 8 ms 1104 KB Output is correct
95 Correct 8 ms 1096 KB Output is correct
96 Correct 13 ms 1624 KB Output is correct
97 Correct 14 ms 1608 KB Output is correct
98 Correct 13 ms 1608 KB Output is correct
99 Correct 14 ms 1608 KB Output is correct
100 Correct 14 ms 1608 KB Output is correct
101 Correct 1 ms 204 KB Output is correct
102 Correct 1 ms 204 KB Output is correct
103 Correct 14 ms 1608 KB Output is correct
104 Correct 1 ms 204 KB Output is correct
105 Correct 3 ms 588 KB Output is correct
106 Correct 4 ms 588 KB Output is correct
107 Correct 3 ms 588 KB Output is correct
108 Correct 3 ms 588 KB Output is correct
109 Correct 8 ms 1012 KB Output is correct
110 Correct 8 ms 1096 KB Output is correct
111 Correct 13 ms 1608 KB Output is correct
112 Correct 0 ms 204 KB Output is correct
113 Correct 1 ms 204 KB Output is correct
114 Correct 14 ms 1652 KB Output is correct
115 Correct 3 ms 588 KB Output is correct
116 Correct 3 ms 588 KB Output is correct
117 Correct 8 ms 1132 KB Output is correct
118 Correct 8 ms 1056 KB Output is correct
119 Correct 13 ms 1608 KB Output is correct
120 Correct 13 ms 1656 KB Output is correct
121 Correct 14 ms 1620 KB Output is correct
122 Correct 14 ms 1628 KB Output is correct
123 Correct 13 ms 1608 KB Output is correct
124 Correct 14 ms 1580 KB Output is correct
125 Correct 13 ms 1564 KB Output is correct
126 Correct 14 ms 1564 KB Output is correct
127 Correct 14 ms 1608 KB Output is correct
128 Correct 13 ms 1608 KB Output is correct