Submission #1041752

# Submission time Handle Problem Language Result Execution time Memory
1041752 2024-08-02T07:45:44 Z 정민찬(#11002) A Light Inconvenience (CEOI23_light) C++17
60 / 100
298 ms 600 KB
#include "light.h"
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

const ll goal = 3;
vector<ll> pos;
ll len;

void prepare(){
    pos.clear();
    pos.push_back(1);
    len = 1;
}

pair<ll, vector<ll>> join(ll p){
    len += p;
    vector<ll> nw;
    nw.push_back(len);
    ll idx = pos.size() - 1;
    while (nw.back() != 1) {
        ll nxt = len - (len - nw.back() + 1) * (goal+1);
        while (idx > 0 && pos[idx-1] + p*goal >= nxt)
            idx --;
        if (pos[idx] <= nxt) {
            nw.push_back(nxt);
            continue;
        }
        nw.push_back(pos[idx]);
    }
    reverse(nw.begin(), nw.end());
    pos = nw;
    return {p*goal, nw};
}

pair<ll, vector<ll>> leave(ll p){
    len -= p;
    vector<ll> nw;
    nw.push_back(len);
    ll idx;
    for (ll i=pos.size()-1; i>=0; i--) {
        if (pos[i] <= len) {
            idx = i;
            break;
        }
    }
    while (nw.back() != 1) {
        ll nxt = len - (len - nw.back() + 1) * (goal+1);
        while (idx > 0 && pos[idx-1] + p*goal >= nxt)
            idx --;
        if (pos[idx] <= nxt) {
            nw.push_back(nxt);
            continue;
        }
        nw.push_back(pos[idx]);
    }
    reverse(nw.begin(), nw.end());
    pos = nw;
    return {p*goal, nw};
}
/*
using namespace std;
typedef long long ll;

namespace {

double maxQuotient = 0.0;
ll N = 1;
size_t maxFires = 1;
vector<ll> fires = {1};
constexpr int MAX_NUM_FIRES = 150;

[[noreturn]] void die(string msg)
{
    cout << msg << endl;
    exit(0);
}

void check(ll p, pair<ll, vector<ll>> res) {
    ll t = res.first;
    vector<ll> newFires = res.second;
    maxQuotient = max(maxQuotient, static_cast<double>(t)/abs(static_cast<double>(p)));
    maxFires = max(maxFires, newFires.size());

    cout << (p < 0? "leave" : "join") << "(" << llabs(p) << ") returned " << t << ", {";
    for(size_t i = 0; i < newFires.size(); i++) {
        cout << newFires[i];
        if(i + 1 < newFires.size()) cout << ", ";
    }
    cout << "}" << endl;

    if(t < 0 || t > 5 * static_cast<__int128_t>(llabs(p))) die("Invalid return value");
    for(size_t i = 0; i + 1 < newFires.size(); i++) {
        if(newFires[i] >= newFires[i + 1]) die("Invalid return value");
    }
    if(!newFires.empty() && (newFires[0] <= 0 || newFires.back() > N)) die("Invalid return value");
    if(newFires.size() > MAX_NUM_FIRES) die("Too many burning torches");
    if(newFires.empty() || newFires.back() < N) die("Rightmost torch not on fire");


    size_t i = 0;
    for (ll x : newFires) {
        for (;; ++i) {
            if (i >= fires.size() || fires[i] > x) die("Not all announced torches have been lit");
            if (fires[i] + t >= x) break;
        }
    }
    fires = newFires;
}

};

int main() {
    int Q;
    if (!(cin >> Q)) die("Invalid input");

    cout << "prepare()" << endl;
    prepare();

    for (int i = 0; i < Q; i++) {
        ll p;
        if (!(cin >> p) || p == 0) die("Invalid input");
        N += p;
        if (N <= 0) die("The stage is empty");
        if (p > 0)  check(p, join(p));
        if (p < 0)  check(p, leave(-p));
    }

    cout << "Correct: ratio at most " << maxQuotient << ", at most " << maxFires << " burning torches" << endl;
    return 0;
}*/

Compilation message

light.cpp: In function 'std::pair<long long int, std::vector<long long int> > leave(ll)':
light.cpp:52:20: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
   52 |         if (pos[idx] <= nxt) {
      |                    ^
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 223 ms 432 KB Output is correct
3 Correct 231 ms 344 KB Output is correct
4 Correct 229 ms 344 KB Output is correct
5 Correct 227 ms 600 KB Output is correct
6 Correct 265 ms 424 KB Output is correct
7 Correct 276 ms 432 KB Output is correct
8 Correct 261 ms 344 KB Output is correct
9 Correct 271 ms 344 KB Output is correct
10 Correct 236 ms 416 KB Output is correct
11 Correct 238 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 259 ms 344 KB Output is correct
3 Correct 35 ms 344 KB Output is correct
4 Correct 242 ms 344 KB Output is correct
5 Correct 256 ms 344 KB Output is correct
6 Correct 7 ms 344 KB Output is correct
7 Correct 215 ms 344 KB Output is correct
8 Correct 19 ms 344 KB Output is correct
9 Correct 235 ms 344 KB Output is correct
10 Correct 251 ms 344 KB Output is correct
11 Correct 57 ms 344 KB Output is correct
12 Correct 224 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 259 ms 344 KB Output is correct
3 Correct 35 ms 344 KB Output is correct
4 Correct 242 ms 344 KB Output is correct
5 Correct 256 ms 344 KB Output is correct
6 Correct 7 ms 344 KB Output is correct
7 Correct 215 ms 344 KB Output is correct
8 Correct 19 ms 344 KB Output is correct
9 Correct 235 ms 344 KB Output is correct
10 Correct 251 ms 344 KB Output is correct
11 Correct 57 ms 344 KB Output is correct
12 Correct 224 ms 344 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 236 ms 344 KB Output is correct
15 Correct 43 ms 344 KB Output is correct
16 Correct 222 ms 344 KB Output is correct
17 Correct 253 ms 344 KB Output is correct
18 Correct 3 ms 344 KB Output is correct
19 Correct 245 ms 344 KB Output is correct
20 Correct 14 ms 344 KB Output is correct
21 Correct 235 ms 344 KB Output is correct
22 Correct 248 ms 344 KB Output is correct
23 Correct 73 ms 344 KB Output is correct
24 Correct 210 ms 344 KB Output is correct
25 Correct 5 ms 344 KB Output is correct
26 Correct 3 ms 344 KB Output is correct
27 Correct 4 ms 344 KB Output is correct
28 Correct 236 ms 344 KB Output is correct
29 Correct 13 ms 344 KB Output is correct
30 Correct 241 ms 344 KB Output is correct
31 Correct 234 ms 344 KB Output is correct
32 Correct 5 ms 344 KB Output is correct
33 Correct 234 ms 344 KB Output is correct
34 Correct 223 ms 344 KB Output is correct
35 Correct 224 ms 344 KB Output is correct
36 Correct 231 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 259 ms 344 KB Output is correct
3 Correct 35 ms 344 KB Output is correct
4 Correct 242 ms 344 KB Output is correct
5 Correct 256 ms 344 KB Output is correct
6 Correct 7 ms 344 KB Output is correct
7 Correct 215 ms 344 KB Output is correct
8 Correct 19 ms 344 KB Output is correct
9 Correct 235 ms 344 KB Output is correct
10 Correct 251 ms 344 KB Output is correct
11 Correct 57 ms 344 KB Output is correct
12 Correct 224 ms 344 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 236 ms 344 KB Output is correct
15 Correct 43 ms 344 KB Output is correct
16 Correct 222 ms 344 KB Output is correct
17 Correct 253 ms 344 KB Output is correct
18 Correct 3 ms 344 KB Output is correct
19 Correct 245 ms 344 KB Output is correct
20 Correct 14 ms 344 KB Output is correct
21 Correct 235 ms 344 KB Output is correct
22 Correct 248 ms 344 KB Output is correct
23 Correct 73 ms 344 KB Output is correct
24 Correct 210 ms 344 KB Output is correct
25 Correct 5 ms 344 KB Output is correct
26 Correct 3 ms 344 KB Output is correct
27 Correct 4 ms 344 KB Output is correct
28 Correct 236 ms 344 KB Output is correct
29 Correct 13 ms 344 KB Output is correct
30 Correct 241 ms 344 KB Output is correct
31 Correct 234 ms 344 KB Output is correct
32 Correct 5 ms 344 KB Output is correct
33 Correct 234 ms 344 KB Output is correct
34 Correct 223 ms 344 KB Output is correct
35 Correct 224 ms 344 KB Output is correct
36 Correct 231 ms 340 KB Output is correct
37 Correct 1 ms 344 KB Output is correct
38 Correct 244 ms 344 KB Output is correct
39 Correct 35 ms 344 KB Output is correct
40 Correct 257 ms 344 KB Output is correct
41 Correct 241 ms 596 KB Output is correct
42 Correct 6 ms 344 KB Output is correct
43 Correct 233 ms 344 KB Output is correct
44 Correct 11 ms 344 KB Output is correct
45 Correct 254 ms 344 KB Output is correct
46 Correct 244 ms 344 KB Output is correct
47 Correct 50 ms 344 KB Output is correct
48 Correct 264 ms 344 KB Output is correct
49 Correct 4 ms 344 KB Output is correct
50 Correct 2 ms 344 KB Output is correct
51 Correct 4 ms 344 KB Output is correct
52 Correct 200 ms 596 KB Output is correct
53 Correct 15 ms 344 KB Output is correct
54 Correct 226 ms 344 KB Output is correct
55 Correct 216 ms 348 KB Output is correct
56 Correct 5 ms 344 KB Output is correct
57 Correct 227 ms 344 KB Output is correct
58 Correct 201 ms 596 KB Output is correct
59 Correct 219 ms 344 KB Output is correct
60 Correct 234 ms 344 KB Output is correct
61 Correct 16 ms 344 KB Output is correct
62 Correct 29 ms 344 KB Output is correct
63 Correct 21 ms 344 KB Output is correct
64 Correct 207 ms 344 KB Output is correct
65 Correct 215 ms 344 KB Output is correct
66 Correct 206 ms 344 KB Output is correct
67 Correct 231 ms 344 KB Output is correct
68 Correct 223 ms 344 KB Output is correct
69 Correct 239 ms 344 KB Output is correct
70 Correct 230 ms 344 KB Output is correct
71 Correct 217 ms 344 KB Output is correct
72 Correct 202 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 259 ms 344 KB Output is correct
3 Correct 35 ms 344 KB Output is correct
4 Correct 242 ms 344 KB Output is correct
5 Correct 256 ms 344 KB Output is correct
6 Correct 7 ms 344 KB Output is correct
7 Correct 215 ms 344 KB Output is correct
8 Correct 19 ms 344 KB Output is correct
9 Correct 235 ms 344 KB Output is correct
10 Correct 251 ms 344 KB Output is correct
11 Correct 57 ms 344 KB Output is correct
12 Correct 224 ms 344 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 236 ms 344 KB Output is correct
15 Correct 43 ms 344 KB Output is correct
16 Correct 222 ms 344 KB Output is correct
17 Correct 253 ms 344 KB Output is correct
18 Correct 3 ms 344 KB Output is correct
19 Correct 245 ms 344 KB Output is correct
20 Correct 14 ms 344 KB Output is correct
21 Correct 235 ms 344 KB Output is correct
22 Correct 248 ms 344 KB Output is correct
23 Correct 73 ms 344 KB Output is correct
24 Correct 210 ms 344 KB Output is correct
25 Correct 5 ms 344 KB Output is correct
26 Correct 3 ms 344 KB Output is correct
27 Correct 4 ms 344 KB Output is correct
28 Correct 236 ms 344 KB Output is correct
29 Correct 13 ms 344 KB Output is correct
30 Correct 241 ms 344 KB Output is correct
31 Correct 234 ms 344 KB Output is correct
32 Correct 5 ms 344 KB Output is correct
33 Correct 234 ms 344 KB Output is correct
34 Correct 223 ms 344 KB Output is correct
35 Correct 224 ms 344 KB Output is correct
36 Correct 231 ms 340 KB Output is correct
37 Correct 1 ms 344 KB Output is correct
38 Correct 244 ms 344 KB Output is correct
39 Correct 35 ms 344 KB Output is correct
40 Correct 257 ms 344 KB Output is correct
41 Correct 241 ms 596 KB Output is correct
42 Correct 6 ms 344 KB Output is correct
43 Correct 233 ms 344 KB Output is correct
44 Correct 11 ms 344 KB Output is correct
45 Correct 254 ms 344 KB Output is correct
46 Correct 244 ms 344 KB Output is correct
47 Correct 50 ms 344 KB Output is correct
48 Correct 264 ms 344 KB Output is correct
49 Correct 4 ms 344 KB Output is correct
50 Correct 2 ms 344 KB Output is correct
51 Correct 4 ms 344 KB Output is correct
52 Correct 200 ms 596 KB Output is correct
53 Correct 15 ms 344 KB Output is correct
54 Correct 226 ms 344 KB Output is correct
55 Correct 216 ms 348 KB Output is correct
56 Correct 5 ms 344 KB Output is correct
57 Correct 227 ms 344 KB Output is correct
58 Correct 201 ms 596 KB Output is correct
59 Correct 219 ms 344 KB Output is correct
60 Correct 234 ms 344 KB Output is correct
61 Correct 16 ms 344 KB Output is correct
62 Correct 29 ms 344 KB Output is correct
63 Correct 21 ms 344 KB Output is correct
64 Correct 207 ms 344 KB Output is correct
65 Correct 215 ms 344 KB Output is correct
66 Correct 206 ms 344 KB Output is correct
67 Correct 231 ms 344 KB Output is correct
68 Correct 223 ms 344 KB Output is correct
69 Correct 239 ms 344 KB Output is correct
70 Correct 230 ms 344 KB Output is correct
71 Correct 217 ms 344 KB Output is correct
72 Correct 202 ms 344 KB Output is correct
73 Correct 0 ms 344 KB Output is correct
74 Correct 217 ms 344 KB Output is correct
75 Correct 35 ms 344 KB Output is correct
76 Correct 216 ms 344 KB Output is correct
77 Correct 230 ms 344 KB Output is correct
78 Correct 3 ms 344 KB Output is correct
79 Correct 242 ms 344 KB Output is correct
80 Correct 13 ms 344 KB Output is correct
81 Correct 273 ms 344 KB Output is correct
82 Correct 224 ms 344 KB Output is correct
83 Correct 53 ms 344 KB Output is correct
84 Correct 212 ms 344 KB Output is correct
85 Correct 3 ms 344 KB Output is correct
86 Correct 4 ms 344 KB Output is correct
87 Correct 5 ms 344 KB Output is correct
88 Correct 226 ms 344 KB Output is correct
89 Correct 14 ms 344 KB Output is correct
90 Correct 233 ms 344 KB Output is correct
91 Correct 214 ms 344 KB Output is correct
92 Correct 9 ms 344 KB Output is correct
93 Correct 269 ms 344 KB Output is correct
94 Correct 224 ms 344 KB Output is correct
95 Correct 235 ms 344 KB Output is correct
96 Correct 264 ms 344 KB Output is correct
97 Correct 12 ms 344 KB Output is correct
98 Correct 29 ms 344 KB Output is correct
99 Correct 14 ms 344 KB Output is correct
100 Correct 258 ms 344 KB Output is correct
101 Correct 243 ms 344 KB Output is correct
102 Correct 227 ms 344 KB Output is correct
103 Correct 242 ms 344 KB Output is correct
104 Correct 234 ms 344 KB Output is correct
105 Correct 213 ms 344 KB Output is correct
106 Correct 248 ms 344 KB Output is correct
107 Correct 210 ms 344 KB Output is correct
108 Correct 239 ms 344 KB Output is correct
109 Correct 244 ms 344 KB Output is correct
110 Correct 228 ms 344 KB Output is correct
111 Correct 241 ms 344 KB Output is correct
112 Correct 223 ms 344 KB Output is correct
113 Correct 229 ms 344 KB Output is correct
114 Correct 250 ms 344 KB Output is correct
115 Correct 213 ms 344 KB Output is correct
116 Correct 237 ms 356 KB Output is correct
117 Correct 272 ms 344 KB Output is correct
118 Correct 248 ms 344 KB Output is correct
119 Correct 239 ms 344 KB Output is correct
120 Correct 250 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 259 ms 344 KB Output is correct
3 Correct 35 ms 344 KB Output is correct
4 Correct 242 ms 344 KB Output is correct
5 Correct 256 ms 344 KB Output is correct
6 Correct 7 ms 344 KB Output is correct
7 Correct 215 ms 344 KB Output is correct
8 Correct 19 ms 344 KB Output is correct
9 Correct 235 ms 344 KB Output is correct
10 Correct 251 ms 344 KB Output is correct
11 Correct 57 ms 344 KB Output is correct
12 Correct 224 ms 344 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 236 ms 344 KB Output is correct
15 Correct 43 ms 344 KB Output is correct
16 Correct 222 ms 344 KB Output is correct
17 Correct 253 ms 344 KB Output is correct
18 Correct 3 ms 344 KB Output is correct
19 Correct 245 ms 344 KB Output is correct
20 Correct 14 ms 344 KB Output is correct
21 Correct 235 ms 344 KB Output is correct
22 Correct 248 ms 344 KB Output is correct
23 Correct 73 ms 344 KB Output is correct
24 Correct 210 ms 344 KB Output is correct
25 Correct 5 ms 344 KB Output is correct
26 Correct 3 ms 344 KB Output is correct
27 Correct 4 ms 344 KB Output is correct
28 Correct 236 ms 344 KB Output is correct
29 Correct 13 ms 344 KB Output is correct
30 Correct 241 ms 344 KB Output is correct
31 Correct 234 ms 344 KB Output is correct
32 Correct 5 ms 344 KB Output is correct
33 Correct 234 ms 344 KB Output is correct
34 Correct 223 ms 344 KB Output is correct
35 Correct 224 ms 344 KB Output is correct
36 Correct 231 ms 340 KB Output is correct
37 Correct 1 ms 344 KB Output is correct
38 Correct 244 ms 344 KB Output is correct
39 Correct 35 ms 344 KB Output is correct
40 Correct 257 ms 344 KB Output is correct
41 Correct 241 ms 596 KB Output is correct
42 Correct 6 ms 344 KB Output is correct
43 Correct 233 ms 344 KB Output is correct
44 Correct 11 ms 344 KB Output is correct
45 Correct 254 ms 344 KB Output is correct
46 Correct 244 ms 344 KB Output is correct
47 Correct 50 ms 344 KB Output is correct
48 Correct 264 ms 344 KB Output is correct
49 Correct 4 ms 344 KB Output is correct
50 Correct 2 ms 344 KB Output is correct
51 Correct 4 ms 344 KB Output is correct
52 Correct 200 ms 596 KB Output is correct
53 Correct 15 ms 344 KB Output is correct
54 Correct 226 ms 344 KB Output is correct
55 Correct 216 ms 348 KB Output is correct
56 Correct 5 ms 344 KB Output is correct
57 Correct 227 ms 344 KB Output is correct
58 Correct 201 ms 596 KB Output is correct
59 Correct 219 ms 344 KB Output is correct
60 Correct 234 ms 344 KB Output is correct
61 Correct 16 ms 344 KB Output is correct
62 Correct 29 ms 344 KB Output is correct
63 Correct 21 ms 344 KB Output is correct
64 Correct 207 ms 344 KB Output is correct
65 Correct 215 ms 344 KB Output is correct
66 Correct 206 ms 344 KB Output is correct
67 Correct 231 ms 344 KB Output is correct
68 Correct 223 ms 344 KB Output is correct
69 Correct 239 ms 344 KB Output is correct
70 Correct 230 ms 344 KB Output is correct
71 Correct 217 ms 344 KB Output is correct
72 Correct 202 ms 344 KB Output is correct
73 Correct 0 ms 344 KB Output is correct
74 Correct 217 ms 344 KB Output is correct
75 Correct 35 ms 344 KB Output is correct
76 Correct 216 ms 344 KB Output is correct
77 Correct 230 ms 344 KB Output is correct
78 Correct 3 ms 344 KB Output is correct
79 Correct 242 ms 344 KB Output is correct
80 Correct 13 ms 344 KB Output is correct
81 Correct 273 ms 344 KB Output is correct
82 Correct 224 ms 344 KB Output is correct
83 Correct 53 ms 344 KB Output is correct
84 Correct 212 ms 344 KB Output is correct
85 Correct 3 ms 344 KB Output is correct
86 Correct 4 ms 344 KB Output is correct
87 Correct 5 ms 344 KB Output is correct
88 Correct 226 ms 344 KB Output is correct
89 Correct 14 ms 344 KB Output is correct
90 Correct 233 ms 344 KB Output is correct
91 Correct 214 ms 344 KB Output is correct
92 Correct 9 ms 344 KB Output is correct
93 Correct 269 ms 344 KB Output is correct
94 Correct 224 ms 344 KB Output is correct
95 Correct 235 ms 344 KB Output is correct
96 Correct 264 ms 344 KB Output is correct
97 Correct 12 ms 344 KB Output is correct
98 Correct 29 ms 344 KB Output is correct
99 Correct 14 ms 344 KB Output is correct
100 Correct 258 ms 344 KB Output is correct
101 Correct 243 ms 344 KB Output is correct
102 Correct 227 ms 344 KB Output is correct
103 Correct 242 ms 344 KB Output is correct
104 Correct 234 ms 344 KB Output is correct
105 Correct 213 ms 344 KB Output is correct
106 Correct 248 ms 344 KB Output is correct
107 Correct 210 ms 344 KB Output is correct
108 Correct 239 ms 344 KB Output is correct
109 Correct 244 ms 344 KB Output is correct
110 Correct 228 ms 344 KB Output is correct
111 Correct 241 ms 344 KB Output is correct
112 Correct 223 ms 344 KB Output is correct
113 Correct 229 ms 344 KB Output is correct
114 Correct 250 ms 344 KB Output is correct
115 Correct 213 ms 344 KB Output is correct
116 Correct 237 ms 356 KB Output is correct
117 Correct 272 ms 344 KB Output is correct
118 Correct 248 ms 344 KB Output is correct
119 Correct 239 ms 344 KB Output is correct
120 Correct 250 ms 344 KB Output is correct
121 Correct 0 ms 344 KB Output is correct
122 Correct 247 ms 504 KB Output is correct
123 Correct 39 ms 344 KB Output is correct
124 Correct 239 ms 344 KB Output is correct
125 Correct 248 ms 344 KB Output is correct
126 Correct 6 ms 344 KB Output is correct
127 Correct 234 ms 344 KB Output is correct
128 Correct 20 ms 596 KB Output is correct
129 Correct 229 ms 344 KB Output is correct
130 Correct 242 ms 344 KB Output is correct
131 Correct 63 ms 344 KB Output is correct
132 Correct 219 ms 344 KB Output is correct
133 Correct 5 ms 344 KB Output is correct
134 Correct 4 ms 344 KB Output is correct
135 Correct 4 ms 344 KB Output is correct
136 Correct 244 ms 344 KB Output is correct
137 Correct 17 ms 344 KB Output is correct
138 Correct 211 ms 344 KB Output is correct
139 Correct 233 ms 344 KB Output is correct
140 Correct 9 ms 344 KB Output is correct
141 Correct 298 ms 344 KB Output is correct
142 Correct 266 ms 344 KB Output is correct
143 Correct 242 ms 344 KB Output is correct
144 Correct 219 ms 344 KB Output is correct
145 Correct 18 ms 344 KB Output is correct
146 Correct 32 ms 344 KB Output is correct
147 Correct 15 ms 512 KB Output is correct
148 Correct 194 ms 344 KB Output is correct
149 Correct 272 ms 344 KB Output is correct
150 Correct 222 ms 344 KB Output is correct
151 Correct 289 ms 344 KB Output is correct
152 Correct 244 ms 344 KB Output is correct
153 Correct 201 ms 344 KB Output is correct
154 Correct 207 ms 344 KB Output is correct
155 Correct 200 ms 344 KB Output is correct
156 Correct 267 ms 344 KB Output is correct
157 Correct 201 ms 344 KB Output is correct
158 Correct 238 ms 344 KB Output is correct
159 Correct 249 ms 344 KB Output is correct
160 Correct 245 ms 344 KB Output is correct
161 Correct 269 ms 344 KB Output is correct
162 Correct 237 ms 344 KB Output is correct
163 Correct 221 ms 344 KB Output is correct
164 Correct 234 ms 344 KB Output is correct
165 Correct 250 ms 344 KB Output is correct
166 Correct 223 ms 344 KB Output is correct
167 Correct 206 ms 344 KB Output is correct
168 Correct 234 ms 344 KB Output is correct
169 Correct 221 ms 344 KB Output is correct
170 Correct 220 ms 344 KB Output is correct
171 Correct 255 ms 344 KB Output is correct
172 Correct 230 ms 344 KB Output is correct
173 Correct 247 ms 344 KB Output is correct
174 Correct 225 ms 344 KB Output is correct
175 Correct 232 ms 344 KB Output is correct
176 Correct 232 ms 344 KB Output is correct
177 Correct 206 ms 344 KB Output is correct
178 Correct 232 ms 344 KB Output is correct
179 Correct 206 ms 344 KB Output is correct
180 Correct 214 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 344 KB Partially correct
2 Partially correct 265 ms 412 KB Partially correct
3 Partially correct 221 ms 344 KB Partially correct
4 Partially correct 253 ms 412 KB Partially correct
5 Partially correct 261 ms 512 KB Partially correct
6 Partially correct 249 ms 436 KB Partially correct
7 Partially correct 221 ms 436 KB Partially correct
8 Partially correct 235 ms 432 KB Partially correct
9 Partially correct 220 ms 344 KB Partially correct
10 Partially correct 257 ms 428 KB Partially correct
11 Partially correct 236 ms 344 KB Partially correct
12 Partially correct 255 ms 344 KB Partially correct
13 Partially correct 36 ms 344 KB Partially correct
14 Partially correct 230 ms 344 KB Partially correct
15 Partially correct 247 ms 344 KB Partially correct
16 Partially correct 7 ms 344 KB Partially correct
17 Partially correct 239 ms 344 KB Partially correct
18 Partially correct 17 ms 344 KB Partially correct
19 Partially correct 229 ms 344 KB Partially correct
20 Partially correct 233 ms 344 KB Partially correct
21 Partially correct 70 ms 344 KB Partially correct
22 Partially correct 235 ms 344 KB Partially correct
23 Partially correct 4 ms 344 KB Partially correct
24 Partially correct 3 ms 344 KB Partially correct
25 Partially correct 5 ms 340 KB Partially correct
26 Partially correct 211 ms 344 KB Partially correct
27 Partially correct 17 ms 344 KB Partially correct
28 Partially correct 220 ms 344 KB Partially correct
29 Partially correct 223 ms 344 KB Partially correct
30 Partially correct 5 ms 344 KB Partially correct
31 Partially correct 208 ms 344 KB Partially correct
32 Partially correct 234 ms 344 KB Partially correct
33 Partially correct 238 ms 344 KB Partially correct
34 Partially correct 225 ms 344 KB Partially correct
35 Partially correct 22 ms 344 KB Partially correct
36 Partially correct 30 ms 344 KB Partially correct
37 Partially correct 21 ms 344 KB Partially correct
38 Partially correct 210 ms 344 KB Partially correct
39 Partially correct 239 ms 344 KB Partially correct
40 Partially correct 234 ms 344 KB Partially correct
41 Partially correct 225 ms 344 KB Partially correct
42 Partially correct 245 ms 344 KB Partially correct
43 Partially correct 250 ms 344 KB Partially correct
44 Partially correct 227 ms 596 KB Partially correct
45 Partially correct 240 ms 344 KB Partially correct
46 Partially correct 215 ms 344 KB Partially correct
47 Partially correct 217 ms 344 KB Partially correct
48 Partially correct 224 ms 344 KB Partially correct
49 Partially correct 249 ms 344 KB Partially correct
50 Partially correct 234 ms 344 KB Partially correct
51 Partially correct 221 ms 344 KB Partially correct
52 Partially correct 230 ms 344 KB Partially correct
53 Partially correct 225 ms 344 KB Partially correct
54 Partially correct 203 ms 344 KB Partially correct
55 Partially correct 250 ms 344 KB Partially correct
56 Partially correct 250 ms 344 KB Partially correct
57 Partially correct 219 ms 344 KB Partially correct
58 Partially correct 255 ms 344 KB Partially correct
59 Partially correct 223 ms 344 KB Partially correct
60 Partially correct 229 ms 344 KB Partially correct
61 Partially correct 250 ms 344 KB Partially correct
62 Partially correct 223 ms 596 KB Partially correct
63 Partially correct 215 ms 344 KB Partially correct
64 Partially correct 234 ms 344 KB Partially correct
65 Partially correct 237 ms 340 KB Partially correct
66 Partially correct 195 ms 344 KB Partially correct
67 Partially correct 229 ms 344 KB Partially correct
68 Partially correct 225 ms 344 KB Partially correct
69 Partially correct 246 ms 344 KB Partially correct
70 Partially correct 235 ms 344 KB Partially correct
71 Partially correct 240 ms 344 KB Partially correct
72 Partially correct 277 ms 344 KB Partially correct
73 Partially correct 274 ms 344 KB Partially correct
74 Partially correct 263 ms 344 KB Partially correct
75 Partially correct 268 ms 344 KB Partially correct
76 Partially correct 258 ms 344 KB Partially correct
77 Partially correct 237 ms 344 KB Partially correct
78 Partially correct 240 ms 344 KB Partially correct
79 Partially correct 228 ms 344 KB Partially correct
80 Partially correct 264 ms 344 KB Partially correct
81 Partially correct 267 ms 344 KB Partially correct
82 Partially correct 260 ms 344 KB Partially correct
83 Partially correct 289 ms 344 KB Partially correct
84 Partially correct 270 ms 344 KB Partially correct
85 Partially correct 232 ms 344 KB Partially correct
86 Partially correct 274 ms 344 KB Partially correct
87 Partially correct 272 ms 344 KB Partially correct
88 Partially correct 260 ms 504 KB Partially correct
89 Partially correct 264 ms 344 KB Partially correct
90 Partially correct 226 ms 344 KB Partially correct
91 Partially correct 238 ms 340 KB Partially correct
92 Partially correct 239 ms 344 KB Partially correct
93 Partially correct 244 ms 408 KB Partially correct
94 Partially correct 254 ms 344 KB Partially correct
95 Partially correct 237 ms 344 KB Partially correct
96 Partially correct 230 ms 344 KB Partially correct
97 Partially correct 277 ms 344 KB Partially correct
98 Partially correct 271 ms 596 KB Partially correct
99 Partially correct 231 ms 596 KB Partially correct
100 Partially correct 242 ms 344 KB Partially correct
101 Partially correct 233 ms 596 KB Partially correct
102 Partially correct 249 ms 340 KB Partially correct
103 Partially correct 240 ms 432 KB Partially correct
104 Partially correct 228 ms 412 KB Partially correct
105 Partially correct 237 ms 344 KB Partially correct
106 Partially correct 227 ms 344 KB Partially correct
107 Partially correct 254 ms 412 KB Partially correct
108 Partially correct 162 ms 344 KB Partially correct
109 Partially correct 240 ms 344 KB Partially correct
110 Partially correct 220 ms 344 KB Partially correct
111 Partially correct 250 ms 344 KB Partially correct
112 Partially correct 279 ms 344 KB Partially correct
113 Partially correct 286 ms 344 KB Partially correct
114 Partially correct 252 ms 344 KB Partially correct
115 Partially correct 254 ms 344 KB Partially correct
116 Partially correct 238 ms 344 KB Partially correct
117 Partially correct 288 ms 344 KB Partially correct
118 Partially correct 263 ms 344 KB Partially correct
119 Partially correct 258 ms 412 KB Partially correct
120 Partially correct 230 ms 344 KB Partially correct
121 Partially correct 199 ms 344 KB Partially correct
122 Partially correct 245 ms 344 KB Partially correct
123 Partially correct 216 ms 600 KB Partially correct
124 Partially correct 251 ms 436 KB Partially correct
125 Partially correct 255 ms 344 KB Partially correct
126 Partially correct 206 ms 344 KB Partially correct
127 Partially correct 258 ms 344 KB Partially correct
128 Partially correct 271 ms 344 KB Partially correct
129 Partially correct 238 ms 344 KB Partially correct
130 Partially correct 266 ms 344 KB Partially correct