Submission #1036714

# Submission time Handle Problem Language Result Execution time Memory
1036714 2024-07-27T15:53:24 Z model_code Bring Down the Grading Server (CEOI23_gradingserver) C++17
100 / 100
790 ms 23020 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

ll S;

struct State{
    ll a1, d1, a2, d2;
    bool operator==(const State& other) const {return a1==other.a1 && a2 == other.a2 && d1 == other.d1 && d2 == other.d2;}
};

State sab(State state){
    return {state.a2, max(0ll, state.d2 - 1), state.a1, state.d1};
}
State att(State state){
    return {state.a2 - (state.a1 - S*state.d2), state.d2, state.a1, state.d1};
}

vector<vector<vector<int>>> dp;

bool half_sab_win(State state){
    ll sab_cnt = state.d2 / 2;
    state.a1 -= sab_cnt * (state.a2 - S*state.d1);
    state.d2 -= sab_cnt;
    state = att(state);
    state.a1 -= state.d2 * (state.a2 - S*state.d1);
    state.d2 = 0;
    state = att(state);

    ll alpha1 = state.a1 - S*state.d2;
    ll beta2 = S - state.a2;
    return alpha1 + state.d2 * beta2 >= S;
}

ll calc(ll d1, ll d2, ll a2);

int calls = 0;

bool wins(State state){
    // trivial cases
    if(state.a1 <= 0) return false;
    if(state.a2 <= 0) return true;
    // no one can attack
    ll sab_rounds = (max(0ll, min(state.d2*S - state.a1, state.d1*S - state.a2)) + S-1) / S;
    state.d1 -= sab_rounds;
    state.d2 -= sab_rounds;
    // player 1 can't attack and player 2 can't sabotage
    if(state.a1 <= state.d2*S && state.d1 == 0 && state.a2 < S){
        ll beta2 = S - state.a2;
        ll rounds = (state.d2*S - state.a1 + beta2-1) / beta2;
        state.d2 -= rounds;
        state.a1 -= rounds * state.a2;
        if(state.d2 < 0 || state.a1 <= 0) return false;
    }
    // player 1 can't attack
    if(state.a1 <= state.d2*S) return !wins(sab(state));
    // helpful values
    ll alpha1 = state.a1 - S*state.d2;
    ll alpha2 = state.a2 - S*state.d1;
    ll beta2 = min(S, S - alpha2);
    // player 1 must attack
    if(alpha1 >= S && alpha2 <= S) return true;
    if(alpha2 >= S){
        // calls++;
        return !wins(att(state));
    }
    if(state.d2 == 0) return !wins(att(state));
    // Can player 1 win by repeated sabotage?
    if(state.d2 >= S) return true; // prevent overflow!
    if(alpha1 + state.d2 * beta2 >= S) return true;
    // Prevent opponent win by repeated sabotage:
    if(state.d1 > 0){
        ll minAlpha1 = (S * (state.d1 - 1) + alpha2) / (state.d1 + 1);
        ll sabs_todo = min(state.d2, (max(0ll, minAlpha1 - alpha1) + beta2-1) / beta2);
        state.d2 -= sabs_todo;
        state.a1 -= sabs_todo * alpha2;
    }
    if(state.d2 == 0) return !wins(att(state));
    // Can player 1 win by using half of his sabotages?
    if(half_sab_win(state)) return true;
    // Now we need dp.
    ll minA1 = calc(state.d1, state.d2, state.a2);
    return state.a1 >= minA1;
}

// It can be proven that we need O(1) iterations when min(d1, d2) > 1
bool winsSafe(State state){
    if(state.a1 <= state.d2*S) return !wins(sab(state));
    if(state.d2 == 0) return !winsSafe(att(state));
    return !wins(sab(state)) || !winsSafe(att(state));
}

ll calc(ll d1, ll d2, ll a2){
    ll beta2 = S*(d1+1) - a2;

    if(dp[d2][d1][beta2] != -1) return dp[d2][d1][beta2] + S*d2;
    ll lo = d2*S+1, hi = (d2+1)*S;
    for(ll a1 = (lo+hi)/2; lo<hi; a1 = (lo+hi)/2){
        State state = {a1, d1, a2, d2};
        bool good = !wins(sab(state)) || !winsSafe(att(state));
        if(good) hi = a1;
        else lo = a1+1;
    }
    dp[d2][d1][beta2] = lo - S*d2;
    calls++;
    return lo;
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int Q;
    cin >> S >> Q;
    ll totalSize = 0;
    dp.resize(1);
    for(ll d2 = 1; d2*d2 <= 8*S; d2++){
        vector<vector<int>> inner(min(S, 1 + 8*S/(max(1ll, d2*d2))));
        for(ll d1 = 0; d1 < S && d1*d2*d2 <= 8*S; d1++){
            ll mySize = min(S, 1 + 8*S/max(1ll, d1)/(d2*d2));
            totalSize += mySize;
            inner[d1].assign(mySize, -1);
        }
        dp.push_back(inner);
    }
    for(ll d2 = 1; d2*d2 <= 8*S; d2++){
        for(ll d1 = 0; d1 < S && d1*d2*d2 <= 8*S; d1++){
            ll mySize = min(S, 1 + 8*S/max(1ll, d1)/max(1ll, d2*d2));
            for(ll b2 = 1; b2 < mySize; b2++){
                ll minAlpha1 = (S * d1 - b2) / (d1 + 1);
                State state{S*d2+minAlpha1, d1, S*(d1+1)-b2, d2};
                if(minAlpha1 > 0 && minAlpha1 + d2*b2 < S && !half_sab_win(state)){
                    calc(d1, d2, S*(d1+1) - b2);
                };
            }
        }
    }

    for(int q = 0; q < Q; q++){
        ll a1, d1, a2, d2;
        cin >> a1 >> d1 >> a2 >> d2;
        cout << (wins({a1, d1, a2, d2}) ? "YES" : "NO") << "\n";
    }
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 53 ms 1220 KB Output is correct
3 Correct 55 ms 1108 KB Output is correct
4 Correct 51 ms 1148 KB Output is correct
5 Correct 49 ms 1232 KB Output is correct
6 Correct 49 ms 1316 KB Output is correct
7 Correct 49 ms 1096 KB Output is correct
8 Correct 49 ms 1104 KB Output is correct
9 Correct 47 ms 1108 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 53 ms 1220 KB Output is correct
3 Correct 55 ms 1108 KB Output is correct
4 Correct 51 ms 1148 KB Output is correct
5 Correct 49 ms 1232 KB Output is correct
6 Correct 49 ms 1316 KB Output is correct
7 Correct 49 ms 1096 KB Output is correct
8 Correct 49 ms 1104 KB Output is correct
9 Correct 47 ms 1108 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 67 ms 1064 KB Output is correct
12 Correct 54 ms 1104 KB Output is correct
13 Correct 49 ms 1196 KB Output is correct
14 Correct 49 ms 1164 KB Output is correct
15 Correct 50 ms 1260 KB Output is correct
16 Correct 53 ms 1104 KB Output is correct
17 Correct 52 ms 1080 KB Output is correct
18 Correct 48 ms 1108 KB Output is correct
19 Correct 62 ms 1116 KB Output is correct
20 Correct 85 ms 1164 KB Output is correct
21 Correct 55 ms 1108 KB Output is correct
22 Correct 55 ms 1364 KB Output is correct
23 Correct 65 ms 1336 KB Output is correct
24 Correct 53 ms 1328 KB Output is correct
25 Correct 53 ms 1164 KB Output is correct
26 Correct 49 ms 1364 KB Output is correct
27 Correct 50 ms 1288 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 99 ms 1112 KB Output is correct
2 Correct 93 ms 1104 KB Output is correct
3 Correct 95 ms 1148 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 53 ms 1220 KB Output is correct
3 Correct 55 ms 1108 KB Output is correct
4 Correct 51 ms 1148 KB Output is correct
5 Correct 49 ms 1232 KB Output is correct
6 Correct 49 ms 1316 KB Output is correct
7 Correct 49 ms 1096 KB Output is correct
8 Correct 49 ms 1104 KB Output is correct
9 Correct 47 ms 1108 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 67 ms 1064 KB Output is correct
12 Correct 54 ms 1104 KB Output is correct
13 Correct 49 ms 1196 KB Output is correct
14 Correct 49 ms 1164 KB Output is correct
15 Correct 50 ms 1260 KB Output is correct
16 Correct 53 ms 1104 KB Output is correct
17 Correct 52 ms 1080 KB Output is correct
18 Correct 48 ms 1108 KB Output is correct
19 Correct 62 ms 1116 KB Output is correct
20 Correct 85 ms 1164 KB Output is correct
21 Correct 55 ms 1108 KB Output is correct
22 Correct 55 ms 1364 KB Output is correct
23 Correct 65 ms 1336 KB Output is correct
24 Correct 53 ms 1328 KB Output is correct
25 Correct 53 ms 1164 KB Output is correct
26 Correct 49 ms 1364 KB Output is correct
27 Correct 50 ms 1288 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 54 ms 1172 KB Output is correct
30 Correct 49 ms 1100 KB Output is correct
31 Correct 52 ms 1316 KB Output is correct
32 Correct 52 ms 1228 KB Output is correct
33 Correct 50 ms 1292 KB Output is correct
34 Correct 87 ms 1280 KB Output is correct
35 Correct 53 ms 1108 KB Output is correct
36 Correct 62 ms 1108 KB Output is correct
37 Correct 57 ms 1360 KB Output is correct
38 Correct 77 ms 1060 KB Output is correct
39 Correct 94 ms 1108 KB Output is correct
40 Correct 55 ms 1456 KB Output is correct
41 Correct 89 ms 1304 KB Output is correct
42 Correct 60 ms 1360 KB Output is correct
43 Correct 53 ms 1212 KB Output is correct
44 Correct 49 ms 1108 KB Output is correct
45 Correct 51 ms 1324 KB Output is correct
46 Correct 71 ms 1320 KB Output is correct
47 Correct 64 ms 1108 KB Output is correct
48 Correct 86 ms 1324 KB Output is correct
49 Correct 120 ms 2388 KB Output is correct
50 Correct 69 ms 1876 KB Output is correct
51 Correct 62 ms 1368 KB Output is correct
52 Correct 60 ms 2132 KB Output is correct
53 Correct 85 ms 1364 KB Output is correct
54 Correct 50 ms 1472 KB Output is correct
55 Correct 55 ms 1260 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 53 ms 1220 KB Output is correct
3 Correct 55 ms 1108 KB Output is correct
4 Correct 51 ms 1148 KB Output is correct
5 Correct 49 ms 1232 KB Output is correct
6 Correct 49 ms 1316 KB Output is correct
7 Correct 49 ms 1096 KB Output is correct
8 Correct 49 ms 1104 KB Output is correct
9 Correct 47 ms 1108 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 67 ms 1064 KB Output is correct
12 Correct 54 ms 1104 KB Output is correct
13 Correct 49 ms 1196 KB Output is correct
14 Correct 49 ms 1164 KB Output is correct
15 Correct 50 ms 1260 KB Output is correct
16 Correct 53 ms 1104 KB Output is correct
17 Correct 52 ms 1080 KB Output is correct
18 Correct 48 ms 1108 KB Output is correct
19 Correct 62 ms 1116 KB Output is correct
20 Correct 85 ms 1164 KB Output is correct
21 Correct 55 ms 1108 KB Output is correct
22 Correct 55 ms 1364 KB Output is correct
23 Correct 65 ms 1336 KB Output is correct
24 Correct 53 ms 1328 KB Output is correct
25 Correct 53 ms 1164 KB Output is correct
26 Correct 49 ms 1364 KB Output is correct
27 Correct 50 ms 1288 KB Output is correct
28 Correct 99 ms 1112 KB Output is correct
29 Correct 93 ms 1104 KB Output is correct
30 Correct 95 ms 1148 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 98 ms 1620 KB Output is correct
33 Correct 86 ms 1108 KB Output is correct
34 Correct 116 ms 1104 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 74 ms 1244 KB Output is correct
38 Correct 49 ms 1108 KB Output is correct
39 Correct 53 ms 1268 KB Output is correct
40 Correct 53 ms 1084 KB Output is correct
41 Correct 55 ms 1236 KB Output is correct
42 Correct 48 ms 1104 KB Output is correct
43 Correct 76 ms 1108 KB Output is correct
44 Correct 49 ms 1312 KB Output is correct
45 Correct 54 ms 1144 KB Output is correct
46 Correct 55 ms 1112 KB Output is correct
47 Correct 55 ms 1104 KB Output is correct
48 Correct 55 ms 1428 KB Output is correct
49 Correct 93 ms 1364 KB Output is correct
50 Correct 52 ms 1344 KB Output is correct
51 Correct 53 ms 1360 KB Output is correct
52 Correct 49 ms 1128 KB Output is correct
53 Correct 67 ms 1360 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 51 ms 1404 KB Output is correct
56 Correct 49 ms 1360 KB Output is correct
57 Correct 64 ms 1292 KB Output is correct
58 Correct 67 ms 1256 KB Output is correct
59 Correct 68 ms 1328 KB Output is correct
60 Correct 88 ms 1448 KB Output is correct
61 Correct 92 ms 1364 KB Output is correct
62 Correct 88 ms 1360 KB Output is correct
63 Correct 94 ms 1136 KB Output is correct
64 Correct 88 ms 1336 KB Output is correct
65 Correct 92 ms 1252 KB Output is correct
66 Correct 62 ms 1508 KB Output is correct
67 Correct 61 ms 1488 KB Output is correct
68 Correct 101 ms 1256 KB Output is correct
69 Correct 92 ms 1360 KB Output is correct
70 Correct 103 ms 1480 KB Output is correct
71 Correct 183 ms 1440 KB Output is correct
72 Correct 116 ms 1276 KB Output is correct
73 Correct 67 ms 1380 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 53 ms 1220 KB Output is correct
3 Correct 55 ms 1108 KB Output is correct
4 Correct 51 ms 1148 KB Output is correct
5 Correct 49 ms 1232 KB Output is correct
6 Correct 49 ms 1316 KB Output is correct
7 Correct 49 ms 1096 KB Output is correct
8 Correct 49 ms 1104 KB Output is correct
9 Correct 47 ms 1108 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 51 ms 1308 KB Output is correct
12 Correct 59 ms 1108 KB Output is correct
13 Correct 52 ms 1272 KB Output is correct
14 Correct 49 ms 1108 KB Output is correct
15 Correct 57 ms 1108 KB Output is correct
16 Correct 52 ms 1128 KB Output is correct
17 Correct 52 ms 1072 KB Output is correct
18 Correct 48 ms 1144 KB Output is correct
19 Correct 84 ms 1104 KB Output is correct
20 Correct 142 ms 4180 KB Output is correct
21 Correct 520 ms 18632 KB Output is correct
22 Correct 675 ms 23016 KB Output is correct
23 Correct 566 ms 18712 KB Output is correct
24 Correct 715 ms 22988 KB Output is correct
25 Correct 210 ms 4244 KB Output is correct
26 Correct 125 ms 1364 KB Output is correct
27 Correct 717 ms 22980 KB Output is correct
28 Correct 718 ms 22924 KB Output is correct
29 Correct 695 ms 22900 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 53 ms 1220 KB Output is correct
3 Correct 55 ms 1108 KB Output is correct
4 Correct 51 ms 1148 KB Output is correct
5 Correct 49 ms 1232 KB Output is correct
6 Correct 49 ms 1316 KB Output is correct
7 Correct 49 ms 1096 KB Output is correct
8 Correct 49 ms 1104 KB Output is correct
9 Correct 47 ms 1108 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 67 ms 1064 KB Output is correct
12 Correct 54 ms 1104 KB Output is correct
13 Correct 49 ms 1196 KB Output is correct
14 Correct 49 ms 1164 KB Output is correct
15 Correct 50 ms 1260 KB Output is correct
16 Correct 53 ms 1104 KB Output is correct
17 Correct 52 ms 1080 KB Output is correct
18 Correct 48 ms 1108 KB Output is correct
19 Correct 62 ms 1116 KB Output is correct
20 Correct 85 ms 1164 KB Output is correct
21 Correct 55 ms 1108 KB Output is correct
22 Correct 55 ms 1364 KB Output is correct
23 Correct 65 ms 1336 KB Output is correct
24 Correct 53 ms 1328 KB Output is correct
25 Correct 53 ms 1164 KB Output is correct
26 Correct 49 ms 1364 KB Output is correct
27 Correct 50 ms 1288 KB Output is correct
28 Correct 99 ms 1112 KB Output is correct
29 Correct 93 ms 1104 KB Output is correct
30 Correct 95 ms 1148 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 54 ms 1172 KB Output is correct
34 Correct 49 ms 1100 KB Output is correct
35 Correct 52 ms 1316 KB Output is correct
36 Correct 52 ms 1228 KB Output is correct
37 Correct 50 ms 1292 KB Output is correct
38 Correct 87 ms 1280 KB Output is correct
39 Correct 53 ms 1108 KB Output is correct
40 Correct 62 ms 1108 KB Output is correct
41 Correct 57 ms 1360 KB Output is correct
42 Correct 77 ms 1060 KB Output is correct
43 Correct 94 ms 1108 KB Output is correct
44 Correct 55 ms 1456 KB Output is correct
45 Correct 89 ms 1304 KB Output is correct
46 Correct 60 ms 1360 KB Output is correct
47 Correct 53 ms 1212 KB Output is correct
48 Correct 49 ms 1108 KB Output is correct
49 Correct 51 ms 1324 KB Output is correct
50 Correct 71 ms 1320 KB Output is correct
51 Correct 64 ms 1108 KB Output is correct
52 Correct 86 ms 1324 KB Output is correct
53 Correct 120 ms 2388 KB Output is correct
54 Correct 69 ms 1876 KB Output is correct
55 Correct 62 ms 1368 KB Output is correct
56 Correct 60 ms 2132 KB Output is correct
57 Correct 85 ms 1364 KB Output is correct
58 Correct 50 ms 1472 KB Output is correct
59 Correct 55 ms 1260 KB Output is correct
60 Correct 98 ms 1620 KB Output is correct
61 Correct 86 ms 1108 KB Output is correct
62 Correct 116 ms 1104 KB Output is correct
63 Correct 0 ms 348 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 74 ms 1244 KB Output is correct
66 Correct 49 ms 1108 KB Output is correct
67 Correct 53 ms 1268 KB Output is correct
68 Correct 53 ms 1084 KB Output is correct
69 Correct 55 ms 1236 KB Output is correct
70 Correct 48 ms 1104 KB Output is correct
71 Correct 76 ms 1108 KB Output is correct
72 Correct 49 ms 1312 KB Output is correct
73 Correct 54 ms 1144 KB Output is correct
74 Correct 55 ms 1112 KB Output is correct
75 Correct 55 ms 1104 KB Output is correct
76 Correct 55 ms 1428 KB Output is correct
77 Correct 93 ms 1364 KB Output is correct
78 Correct 52 ms 1344 KB Output is correct
79 Correct 53 ms 1360 KB Output is correct
80 Correct 49 ms 1128 KB Output is correct
81 Correct 67 ms 1360 KB Output is correct
82 Correct 0 ms 348 KB Output is correct
83 Correct 51 ms 1404 KB Output is correct
84 Correct 49 ms 1360 KB Output is correct
85 Correct 64 ms 1292 KB Output is correct
86 Correct 67 ms 1256 KB Output is correct
87 Correct 68 ms 1328 KB Output is correct
88 Correct 88 ms 1448 KB Output is correct
89 Correct 92 ms 1364 KB Output is correct
90 Correct 88 ms 1360 KB Output is correct
91 Correct 94 ms 1136 KB Output is correct
92 Correct 88 ms 1336 KB Output is correct
93 Correct 92 ms 1252 KB Output is correct
94 Correct 62 ms 1508 KB Output is correct
95 Correct 61 ms 1488 KB Output is correct
96 Correct 101 ms 1256 KB Output is correct
97 Correct 92 ms 1360 KB Output is correct
98 Correct 103 ms 1480 KB Output is correct
99 Correct 183 ms 1440 KB Output is correct
100 Correct 116 ms 1276 KB Output is correct
101 Correct 67 ms 1380 KB Output is correct
102 Correct 0 ms 348 KB Output is correct
103 Correct 51 ms 1308 KB Output is correct
104 Correct 59 ms 1108 KB Output is correct
105 Correct 52 ms 1272 KB Output is correct
106 Correct 49 ms 1108 KB Output is correct
107 Correct 57 ms 1108 KB Output is correct
108 Correct 52 ms 1128 KB Output is correct
109 Correct 52 ms 1072 KB Output is correct
110 Correct 48 ms 1144 KB Output is correct
111 Correct 84 ms 1104 KB Output is correct
112 Correct 142 ms 4180 KB Output is correct
113 Correct 520 ms 18632 KB Output is correct
114 Correct 675 ms 23016 KB Output is correct
115 Correct 566 ms 18712 KB Output is correct
116 Correct 715 ms 22988 KB Output is correct
117 Correct 210 ms 4244 KB Output is correct
118 Correct 125 ms 1364 KB Output is correct
119 Correct 717 ms 22980 KB Output is correct
120 Correct 718 ms 22924 KB Output is correct
121 Correct 695 ms 22900 KB Output is correct
122 Correct 92 ms 1204 KB Output is correct
123 Correct 94 ms 1220 KB Output is correct
124 Correct 95 ms 1268 KB Output is correct
125 Correct 0 ms 348 KB Output is correct
126 Correct 0 ms 348 KB Output is correct
127 Correct 51 ms 1156 KB Output is correct
128 Correct 52 ms 1140 KB Output is correct
129 Correct 55 ms 1276 KB Output is correct
130 Correct 49 ms 1168 KB Output is correct
131 Correct 51 ms 1116 KB Output is correct
132 Correct 48 ms 1108 KB Output is correct
133 Correct 48 ms 1108 KB Output is correct
134 Correct 55 ms 1108 KB Output is correct
135 Correct 86 ms 1148 KB Output is correct
136 Correct 55 ms 1104 KB Output is correct
137 Correct 90 ms 1108 KB Output is correct
138 Correct 55 ms 1360 KB Output is correct
139 Correct 55 ms 1360 KB Output is correct
140 Correct 86 ms 1360 KB Output is correct
141 Correct 52 ms 1364 KB Output is correct
142 Correct 80 ms 1108 KB Output is correct
143 Correct 90 ms 1188 KB Output is correct
144 Correct 1 ms 348 KB Output is correct
145 Correct 55 ms 1416 KB Output is correct
146 Correct 58 ms 1472 KB Output is correct
147 Correct 59 ms 1364 KB Output is correct
148 Correct 70 ms 1108 KB Output is correct
149 Correct 61 ms 1104 KB Output is correct
150 Correct 113 ms 1484 KB Output is correct
151 Correct 90 ms 1496 KB Output is correct
152 Correct 87 ms 1364 KB Output is correct
153 Correct 95 ms 1360 KB Output is correct
154 Correct 90 ms 1216 KB Output is correct
155 Correct 92 ms 1280 KB Output is correct
156 Correct 59 ms 1364 KB Output is correct
157 Correct 59 ms 1360 KB Output is correct
158 Correct 88 ms 1104 KB Output is correct
159 Correct 96 ms 1320 KB Output is correct
160 Correct 114 ms 1416 KB Output is correct
161 Correct 175 ms 1524 KB Output is correct
162 Correct 92 ms 1272 KB Output is correct
163 Correct 69 ms 1360 KB Output is correct
164 Correct 81 ms 2384 KB Output is correct
165 Correct 68 ms 1876 KB Output is correct
166 Correct 85 ms 1520 KB Output is correct
167 Correct 60 ms 2152 KB Output is correct
168 Correct 56 ms 1104 KB Output is correct
169 Correct 69 ms 1276 KB Output is correct
170 Correct 137 ms 4240 KB Output is correct
171 Correct 529 ms 18572 KB Output is correct
172 Correct 665 ms 23000 KB Output is correct
173 Correct 593 ms 18576 KB Output is correct
174 Correct 692 ms 23020 KB Output is correct
175 Correct 194 ms 4176 KB Output is correct
176 Correct 124 ms 1340 KB Output is correct
177 Correct 702 ms 22928 KB Output is correct
178 Correct 790 ms 23004 KB Output is correct
179 Correct 683 ms 22936 KB Output is correct
180 Correct 120 ms 2020 KB Output is correct
181 Correct 178 ms 4228 KB Output is correct
182 Correct 532 ms 18584 KB Output is correct
183 Correct 664 ms 22984 KB Output is correct
184 Correct 331 ms 10516 KB Output is correct
185 Correct 750 ms 23016 KB Output is correct
186 Correct 718 ms 23004 KB Output is correct
187 Correct 625 ms 18704 KB Output is correct
188 Correct 511 ms 15352 KB Output is correct
189 Correct 624 ms 23004 KB Output is correct
190 Correct 721 ms 22928 KB Output is correct
191 Correct 677 ms 22948 KB Output is correct