답안 #268288

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
268288 2020-08-16T11:00:47 Z imeimi2000 Interval Collection (CCO20_day2problem2) C++17
25 / 25
4670 ms 221212 KB
#include <bits/stdc++.h>

using namespace std;

multiset<int> L[1000001], R[1000001];

const int inf = 1e8, n = 1e6;
struct node {
    int l, r, m;
    void init(int i) {
        l = L[i].empty() ? -inf : *L[i].rbegin();
        r = R[i].empty() ? inf : *R[i].begin();
        m = r - l;
    }
    node operator+(const node &p) const {
        node ret;
        ret.l = max(l, p.l);
        ret.r = min(r, p.r);
        ret.m = min({ m, p.m, p.r - l });
        return ret;
    }
} seg[1 << 21];

void init(int i, int s, int e) {
    if (s == e) {
        seg[i].init(s);
        return;
    }
    int m = (s + e) / 2;
    init(i + i, s, m);
    init(i + i + 1, m + 1, e);
    seg[i] = seg[i + i] + seg[i + i + 1];
}

void update(int i, int s, int e, int x) {
    if (s == e) {
        seg[i].init(x);
        return;
    }
    int m = (s + e) / 2;
    if (x <= m) update(i + i, s, m, x);
    else update(i + i + 1, m + 1, e, x);
    seg[i] = seg[i + i] + seg[i + i + 1];
}

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
    int q;
    cin >> q;
    multiset<int> Ls, Rs;
    init(1, 1, n);
    while (q--) {
        char C[10];
        int l, r;
        cin >> C >> l >> r;
        if (C[0] == 'A') {
            Ls.insert(l);
            Rs.insert(r);
            L[r].insert(l);
            R[l].insert(r);
        }
        else {
            Ls.erase(Ls.find(l));
            Rs.erase(Rs.find(r));
            L[r].erase(L[r].find(l));
            R[l].erase(R[l].find(r));
        }
        update(1, 1, n, l);
        update(1, 1, n, r);
        if (*Ls.rbegin() < *Rs.begin()) {
            printf("%d\n", *R[*Ls.rbegin()].begin() - *L[*Rs.begin()].rbegin());
            continue;
        }
        printf("%d\n", seg[1].m);
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 90 ms 118904 KB Output is correct
2 Correct 114 ms 119032 KB Output is correct
3 Correct 98 ms 119028 KB Output is correct
4 Correct 103 ms 118836 KB Output is correct
5 Correct 106 ms 118904 KB Output is correct
6 Correct 131 ms 118904 KB Output is correct
7 Correct 119 ms 118836 KB Output is correct
8 Correct 107 ms 119088 KB Output is correct
9 Correct 99 ms 118912 KB Output is correct
10 Correct 102 ms 118904 KB Output is correct
11 Correct 105 ms 118904 KB Output is correct
12 Correct 118 ms 119008 KB Output is correct
13 Correct 106 ms 119032 KB Output is correct
14 Correct 110 ms 119048 KB Output is correct
15 Correct 101 ms 118936 KB Output is correct
16 Correct 108 ms 118984 KB Output is correct
17 Correct 122 ms 118992 KB Output is correct
18 Correct 124 ms 118956 KB Output is correct
19 Correct 119 ms 118904 KB Output is correct
20 Correct 102 ms 118936 KB Output is correct
21 Correct 114 ms 119004 KB Output is correct
22 Correct 124 ms 118928 KB Output is correct
23 Correct 126 ms 118936 KB Output is correct
24 Correct 112 ms 118872 KB Output is correct
25 Correct 109 ms 118984 KB Output is correct
26 Correct 119 ms 118888 KB Output is correct
27 Correct 130 ms 118984 KB Output is correct
28 Correct 129 ms 118956 KB Output is correct
29 Correct 102 ms 118972 KB Output is correct
30 Correct 103 ms 119032 KB Output is correct
31 Correct 131 ms 119032 KB Output is correct
32 Correct 130 ms 119036 KB Output is correct
33 Correct 128 ms 118880 KB Output is correct
34 Correct 117 ms 118892 KB Output is correct
35 Correct 115 ms 118904 KB Output is correct
36 Correct 120 ms 118904 KB Output is correct
37 Correct 139 ms 118916 KB Output is correct
38 Correct 118 ms 118972 KB Output is correct
39 Correct 103 ms 118864 KB Output is correct
40 Correct 108 ms 118944 KB Output is correct
41 Correct 122 ms 118904 KB Output is correct
42 Correct 111 ms 118848 KB Output is correct
43 Correct 112 ms 118912 KB Output is correct
44 Correct 121 ms 118904 KB Output is correct
45 Correct 123 ms 118896 KB Output is correct
46 Correct 111 ms 118852 KB Output is correct
47 Correct 127 ms 118952 KB Output is correct
48 Correct 127 ms 118944 KB Output is correct
49 Correct 114 ms 119000 KB Output is correct
50 Correct 117 ms 118924 KB Output is correct
51 Correct 126 ms 118948 KB Output is correct
52 Correct 133 ms 118904 KB Output is correct
53 Correct 101 ms 118996 KB Output is correct
54 Correct 98 ms 118960 KB Output is correct
55 Correct 124 ms 118976 KB Output is correct
56 Correct 105 ms 118904 KB Output is correct
57 Correct 104 ms 118904 KB Output is correct
58 Correct 110 ms 118892 KB Output is correct
59 Correct 108 ms 118984 KB Output is correct
60 Correct 113 ms 119032 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 90 ms 118904 KB Output is correct
2 Correct 114 ms 119032 KB Output is correct
3 Correct 98 ms 119028 KB Output is correct
4 Correct 103 ms 118836 KB Output is correct
5 Correct 106 ms 118904 KB Output is correct
6 Correct 131 ms 118904 KB Output is correct
7 Correct 119 ms 118836 KB Output is correct
8 Correct 107 ms 119088 KB Output is correct
9 Correct 99 ms 118912 KB Output is correct
10 Correct 102 ms 118904 KB Output is correct
11 Correct 105 ms 118904 KB Output is correct
12 Correct 118 ms 119008 KB Output is correct
13 Correct 106 ms 119032 KB Output is correct
14 Correct 110 ms 119048 KB Output is correct
15 Correct 101 ms 118936 KB Output is correct
16 Correct 108 ms 118984 KB Output is correct
17 Correct 122 ms 118992 KB Output is correct
18 Correct 124 ms 118956 KB Output is correct
19 Correct 119 ms 118904 KB Output is correct
20 Correct 102 ms 118936 KB Output is correct
21 Correct 114 ms 119004 KB Output is correct
22 Correct 124 ms 118928 KB Output is correct
23 Correct 126 ms 118936 KB Output is correct
24 Correct 112 ms 118872 KB Output is correct
25 Correct 109 ms 118984 KB Output is correct
26 Correct 119 ms 118888 KB Output is correct
27 Correct 130 ms 118984 KB Output is correct
28 Correct 129 ms 118956 KB Output is correct
29 Correct 102 ms 118972 KB Output is correct
30 Correct 103 ms 119032 KB Output is correct
31 Correct 131 ms 119032 KB Output is correct
32 Correct 130 ms 119036 KB Output is correct
33 Correct 128 ms 118880 KB Output is correct
34 Correct 117 ms 118892 KB Output is correct
35 Correct 115 ms 118904 KB Output is correct
36 Correct 120 ms 118904 KB Output is correct
37 Correct 139 ms 118916 KB Output is correct
38 Correct 118 ms 118972 KB Output is correct
39 Correct 103 ms 118864 KB Output is correct
40 Correct 108 ms 118944 KB Output is correct
41 Correct 122 ms 118904 KB Output is correct
42 Correct 111 ms 118848 KB Output is correct
43 Correct 112 ms 118912 KB Output is correct
44 Correct 121 ms 118904 KB Output is correct
45 Correct 123 ms 118896 KB Output is correct
46 Correct 111 ms 118852 KB Output is correct
47 Correct 127 ms 118952 KB Output is correct
48 Correct 127 ms 118944 KB Output is correct
49 Correct 114 ms 119000 KB Output is correct
50 Correct 117 ms 118924 KB Output is correct
51 Correct 126 ms 118948 KB Output is correct
52 Correct 133 ms 118904 KB Output is correct
53 Correct 101 ms 118996 KB Output is correct
54 Correct 98 ms 118960 KB Output is correct
55 Correct 124 ms 118976 KB Output is correct
56 Correct 105 ms 118904 KB Output is correct
57 Correct 104 ms 118904 KB Output is correct
58 Correct 110 ms 118892 KB Output is correct
59 Correct 108 ms 118984 KB Output is correct
60 Correct 113 ms 119032 KB Output is correct
61 Correct 110 ms 118868 KB Output is correct
62 Correct 100 ms 118940 KB Output is correct
63 Correct 123 ms 118904 KB Output is correct
64 Correct 138 ms 120228 KB Output is correct
65 Correct 140 ms 119408 KB Output is correct
66 Correct 145 ms 119160 KB Output is correct
67 Correct 121 ms 119168 KB Output is correct
68 Correct 156 ms 120332 KB Output is correct
69 Correct 148 ms 119456 KB Output is correct
70 Correct 128 ms 119224 KB Output is correct
71 Correct 146 ms 119188 KB Output is correct
72 Correct 147 ms 120996 KB Output is correct
73 Correct 157 ms 120644 KB Output is correct
74 Correct 150 ms 120548 KB Output is correct
75 Correct 157 ms 120528 KB Output is correct
76 Correct 156 ms 121336 KB Output is correct
77 Correct 148 ms 121372 KB Output is correct
78 Correct 155 ms 121336 KB Output is correct
79 Correct 180 ms 121404 KB Output is correct
80 Correct 153 ms 120200 KB Output is correct
81 Correct 133 ms 119292 KB Output is correct
82 Correct 121 ms 119216 KB Output is correct
83 Correct 131 ms 119164 KB Output is correct
84 Correct 147 ms 120324 KB Output is correct
85 Correct 135 ms 119480 KB Output is correct
86 Correct 147 ms 119160 KB Output is correct
87 Correct 161 ms 119164 KB Output is correct
88 Correct 143 ms 120936 KB Output is correct
89 Correct 161 ms 120520 KB Output is correct
90 Correct 138 ms 120428 KB Output is correct
91 Correct 159 ms 120440 KB Output is correct
92 Correct 153 ms 121336 KB Output is correct
93 Correct 172 ms 121420 KB Output is correct
94 Correct 139 ms 121404 KB Output is correct
95 Correct 158 ms 121344 KB Output is correct
96 Correct 142 ms 119196 KB Output is correct
97 Correct 124 ms 119100 KB Output is correct
98 Correct 126 ms 119168 KB Output is correct
99 Correct 119 ms 119160 KB Output is correct
100 Correct 153 ms 119244 KB Output is correct
101 Correct 136 ms 119212 KB Output is correct
102 Correct 132 ms 119240 KB Output is correct
103 Correct 135 ms 119212 KB Output is correct
104 Correct 175 ms 120300 KB Output is correct
105 Correct 133 ms 119416 KB Output is correct
106 Correct 146 ms 119196 KB Output is correct
107 Correct 131 ms 119168 KB Output is correct
108 Correct 144 ms 120200 KB Output is correct
109 Correct 139 ms 119420 KB Output is correct
110 Correct 133 ms 119160 KB Output is correct
111 Correct 124 ms 119160 KB Output is correct
112 Correct 153 ms 120212 KB Output is correct
113 Correct 133 ms 120320 KB Output is correct
114 Correct 116 ms 120312 KB Output is correct
115 Correct 131 ms 120284 KB Output is correct
116 Correct 130 ms 120320 KB Output is correct
117 Correct 144 ms 120252 KB Output is correct
118 Correct 127 ms 120312 KB Output is correct
119 Correct 134 ms 120300 KB Output is correct
120 Correct 129 ms 120312 KB Output is correct
121 Correct 132 ms 120328 KB Output is correct
122 Correct 124 ms 121392 KB Output is correct
123 Correct 119 ms 121336 KB Output is correct
124 Correct 122 ms 119416 KB Output is correct
125 Correct 122 ms 119216 KB Output is correct
126 Correct 145 ms 119160 KB Output is correct
127 Correct 124 ms 119544 KB Output is correct
128 Correct 115 ms 119136 KB Output is correct
129 Correct 132 ms 119160 KB Output is correct
130 Correct 133 ms 119676 KB Output is correct
131 Correct 117 ms 119172 KB Output is correct
132 Correct 138 ms 119124 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 90 ms 118904 KB Output is correct
2 Correct 114 ms 119032 KB Output is correct
3 Correct 98 ms 119028 KB Output is correct
4 Correct 103 ms 118836 KB Output is correct
5 Correct 106 ms 118904 KB Output is correct
6 Correct 131 ms 118904 KB Output is correct
7 Correct 119 ms 118836 KB Output is correct
8 Correct 107 ms 119088 KB Output is correct
9 Correct 99 ms 118912 KB Output is correct
10 Correct 102 ms 118904 KB Output is correct
11 Correct 105 ms 118904 KB Output is correct
12 Correct 118 ms 119008 KB Output is correct
13 Correct 106 ms 119032 KB Output is correct
14 Correct 110 ms 119048 KB Output is correct
15 Correct 101 ms 118936 KB Output is correct
16 Correct 108 ms 118984 KB Output is correct
17 Correct 122 ms 118992 KB Output is correct
18 Correct 124 ms 118956 KB Output is correct
19 Correct 119 ms 118904 KB Output is correct
20 Correct 102 ms 118936 KB Output is correct
21 Correct 114 ms 119004 KB Output is correct
22 Correct 124 ms 118928 KB Output is correct
23 Correct 126 ms 118936 KB Output is correct
24 Correct 112 ms 118872 KB Output is correct
25 Correct 109 ms 118984 KB Output is correct
26 Correct 119 ms 118888 KB Output is correct
27 Correct 130 ms 118984 KB Output is correct
28 Correct 129 ms 118956 KB Output is correct
29 Correct 102 ms 118972 KB Output is correct
30 Correct 103 ms 119032 KB Output is correct
31 Correct 131 ms 119032 KB Output is correct
32 Correct 130 ms 119036 KB Output is correct
33 Correct 128 ms 118880 KB Output is correct
34 Correct 117 ms 118892 KB Output is correct
35 Correct 115 ms 118904 KB Output is correct
36 Correct 120 ms 118904 KB Output is correct
37 Correct 139 ms 118916 KB Output is correct
38 Correct 118 ms 118972 KB Output is correct
39 Correct 103 ms 118864 KB Output is correct
40 Correct 108 ms 118944 KB Output is correct
41 Correct 122 ms 118904 KB Output is correct
42 Correct 111 ms 118848 KB Output is correct
43 Correct 112 ms 118912 KB Output is correct
44 Correct 121 ms 118904 KB Output is correct
45 Correct 123 ms 118896 KB Output is correct
46 Correct 111 ms 118852 KB Output is correct
47 Correct 127 ms 118952 KB Output is correct
48 Correct 127 ms 118944 KB Output is correct
49 Correct 114 ms 119000 KB Output is correct
50 Correct 117 ms 118924 KB Output is correct
51 Correct 126 ms 118948 KB Output is correct
52 Correct 133 ms 118904 KB Output is correct
53 Correct 101 ms 118996 KB Output is correct
54 Correct 98 ms 118960 KB Output is correct
55 Correct 124 ms 118976 KB Output is correct
56 Correct 105 ms 118904 KB Output is correct
57 Correct 104 ms 118904 KB Output is correct
58 Correct 110 ms 118892 KB Output is correct
59 Correct 108 ms 118984 KB Output is correct
60 Correct 113 ms 119032 KB Output is correct
61 Correct 110 ms 118868 KB Output is correct
62 Correct 100 ms 118940 KB Output is correct
63 Correct 123 ms 118904 KB Output is correct
64 Correct 138 ms 120228 KB Output is correct
65 Correct 140 ms 119408 KB Output is correct
66 Correct 145 ms 119160 KB Output is correct
67 Correct 121 ms 119168 KB Output is correct
68 Correct 156 ms 120332 KB Output is correct
69 Correct 148 ms 119456 KB Output is correct
70 Correct 128 ms 119224 KB Output is correct
71 Correct 146 ms 119188 KB Output is correct
72 Correct 147 ms 120996 KB Output is correct
73 Correct 157 ms 120644 KB Output is correct
74 Correct 150 ms 120548 KB Output is correct
75 Correct 157 ms 120528 KB Output is correct
76 Correct 156 ms 121336 KB Output is correct
77 Correct 148 ms 121372 KB Output is correct
78 Correct 155 ms 121336 KB Output is correct
79 Correct 180 ms 121404 KB Output is correct
80 Correct 153 ms 120200 KB Output is correct
81 Correct 133 ms 119292 KB Output is correct
82 Correct 121 ms 119216 KB Output is correct
83 Correct 131 ms 119164 KB Output is correct
84 Correct 147 ms 120324 KB Output is correct
85 Correct 135 ms 119480 KB Output is correct
86 Correct 147 ms 119160 KB Output is correct
87 Correct 161 ms 119164 KB Output is correct
88 Correct 143 ms 120936 KB Output is correct
89 Correct 161 ms 120520 KB Output is correct
90 Correct 138 ms 120428 KB Output is correct
91 Correct 159 ms 120440 KB Output is correct
92 Correct 153 ms 121336 KB Output is correct
93 Correct 172 ms 121420 KB Output is correct
94 Correct 139 ms 121404 KB Output is correct
95 Correct 158 ms 121344 KB Output is correct
96 Correct 142 ms 119196 KB Output is correct
97 Correct 124 ms 119100 KB Output is correct
98 Correct 126 ms 119168 KB Output is correct
99 Correct 119 ms 119160 KB Output is correct
100 Correct 153 ms 119244 KB Output is correct
101 Correct 136 ms 119212 KB Output is correct
102 Correct 132 ms 119240 KB Output is correct
103 Correct 135 ms 119212 KB Output is correct
104 Correct 175 ms 120300 KB Output is correct
105 Correct 133 ms 119416 KB Output is correct
106 Correct 146 ms 119196 KB Output is correct
107 Correct 131 ms 119168 KB Output is correct
108 Correct 144 ms 120200 KB Output is correct
109 Correct 139 ms 119420 KB Output is correct
110 Correct 133 ms 119160 KB Output is correct
111 Correct 124 ms 119160 KB Output is correct
112 Correct 153 ms 120212 KB Output is correct
113 Correct 133 ms 120320 KB Output is correct
114 Correct 116 ms 120312 KB Output is correct
115 Correct 131 ms 120284 KB Output is correct
116 Correct 130 ms 120320 KB Output is correct
117 Correct 144 ms 120252 KB Output is correct
118 Correct 127 ms 120312 KB Output is correct
119 Correct 134 ms 120300 KB Output is correct
120 Correct 129 ms 120312 KB Output is correct
121 Correct 132 ms 120328 KB Output is correct
122 Correct 124 ms 121392 KB Output is correct
123 Correct 119 ms 121336 KB Output is correct
124 Correct 122 ms 119416 KB Output is correct
125 Correct 122 ms 119216 KB Output is correct
126 Correct 145 ms 119160 KB Output is correct
127 Correct 124 ms 119544 KB Output is correct
128 Correct 115 ms 119136 KB Output is correct
129 Correct 132 ms 119160 KB Output is correct
130 Correct 133 ms 119676 KB Output is correct
131 Correct 117 ms 119172 KB Output is correct
132 Correct 138 ms 119124 KB Output is correct
133 Correct 312 ms 124548 KB Output is correct
134 Correct 267 ms 120824 KB Output is correct
135 Correct 221 ms 120056 KB Output is correct
136 Correct 223 ms 120056 KB Output is correct
137 Correct 345 ms 124640 KB Output is correct
138 Correct 259 ms 120952 KB Output is correct
139 Correct 257 ms 120308 KB Output is correct
140 Correct 204 ms 120056 KB Output is correct
141 Correct 305 ms 127480 KB Output is correct
142 Correct 301 ms 125836 KB Output is correct
143 Correct 275 ms 125688 KB Output is correct
144 Correct 306 ms 125472 KB Output is correct
145 Correct 320 ms 129320 KB Output is correct
146 Correct 351 ms 129400 KB Output is correct
147 Correct 439 ms 129288 KB Output is correct
148 Correct 377 ms 129368 KB Output is correct
149 Correct 294 ms 124628 KB Output is correct
150 Correct 249 ms 120824 KB Output is correct
151 Correct 214 ms 120100 KB Output is correct
152 Correct 248 ms 120056 KB Output is correct
153 Correct 344 ms 124536 KB Output is correct
154 Correct 307 ms 120824 KB Output is correct
155 Correct 235 ms 120312 KB Output is correct
156 Correct 275 ms 120148 KB Output is correct
157 Correct 321 ms 127368 KB Output is correct
158 Correct 345 ms 125904 KB Output is correct
159 Correct 290 ms 125552 KB Output is correct
160 Correct 301 ms 125556 KB Output is correct
161 Correct 377 ms 129272 KB Output is correct
162 Correct 375 ms 129240 KB Output is correct
163 Correct 307 ms 129256 KB Output is correct
164 Correct 332 ms 129316 KB Output is correct
165 Correct 185 ms 120056 KB Output is correct
166 Correct 184 ms 120060 KB Output is correct
167 Correct 211 ms 119968 KB Output is correct
168 Correct 274 ms 120056 KB Output is correct
169 Correct 273 ms 120012 KB Output is correct
170 Correct 201 ms 120104 KB Output is correct
171 Correct 190 ms 120060 KB Output is correct
172 Correct 186 ms 120056 KB Output is correct
173 Correct 297 ms 124536 KB Output is correct
174 Correct 243 ms 120824 KB Output is correct
175 Correct 223 ms 120108 KB Output is correct
176 Correct 251 ms 120056 KB Output is correct
177 Correct 287 ms 124620 KB Output is correct
178 Correct 238 ms 120928 KB Output is correct
179 Correct 238 ms 120056 KB Output is correct
180 Correct 217 ms 120064 KB Output is correct
181 Correct 189 ms 124664 KB Output is correct
182 Correct 232 ms 124672 KB Output is correct
183 Correct 180 ms 124636 KB Output is correct
184 Correct 234 ms 124736 KB Output is correct
185 Correct 191 ms 124664 KB Output is correct
186 Correct 257 ms 124664 KB Output is correct
187 Correct 173 ms 124856 KB Output is correct
188 Correct 203 ms 124664 KB Output is correct
189 Correct 228 ms 124664 KB Output is correct
190 Correct 214 ms 124700 KB Output is correct
191 Correct 208 ms 129144 KB Output is correct
192 Correct 239 ms 129212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 463 ms 160048 KB Output is correct
2 Correct 537 ms 159908 KB Output is correct
3 Correct 835 ms 200968 KB Output is correct
4 Correct 888 ms 200968 KB Output is correct
5 Correct 994 ms 221044 KB Output is correct
6 Correct 1057 ms 221212 KB Output is correct
7 Correct 1208 ms 129640 KB Output is correct
8 Correct 881 ms 126712 KB Output is correct
9 Correct 804 ms 126328 KB Output is correct
10 Correct 1413 ms 132776 KB Output is correct
11 Correct 851 ms 126800 KB Output is correct
12 Correct 843 ms 126396 KB Output is correct
13 Correct 1574 ms 134268 KB Output is correct
14 Correct 873 ms 126900 KB Output is correct
15 Correct 847 ms 126396 KB Output is correct
16 Correct 832 ms 127664 KB Output is correct
17 Correct 958 ms 127672 KB Output is correct
18 Correct 818 ms 127632 KB Output is correct
19 Correct 802 ms 127440 KB Output is correct
20 Correct 950 ms 127552 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 90 ms 118904 KB Output is correct
2 Correct 114 ms 119032 KB Output is correct
3 Correct 98 ms 119028 KB Output is correct
4 Correct 103 ms 118836 KB Output is correct
5 Correct 106 ms 118904 KB Output is correct
6 Correct 131 ms 118904 KB Output is correct
7 Correct 119 ms 118836 KB Output is correct
8 Correct 107 ms 119088 KB Output is correct
9 Correct 99 ms 118912 KB Output is correct
10 Correct 102 ms 118904 KB Output is correct
11 Correct 105 ms 118904 KB Output is correct
12 Correct 118 ms 119008 KB Output is correct
13 Correct 106 ms 119032 KB Output is correct
14 Correct 110 ms 119048 KB Output is correct
15 Correct 101 ms 118936 KB Output is correct
16 Correct 108 ms 118984 KB Output is correct
17 Correct 122 ms 118992 KB Output is correct
18 Correct 124 ms 118956 KB Output is correct
19 Correct 119 ms 118904 KB Output is correct
20 Correct 102 ms 118936 KB Output is correct
21 Correct 114 ms 119004 KB Output is correct
22 Correct 124 ms 118928 KB Output is correct
23 Correct 126 ms 118936 KB Output is correct
24 Correct 112 ms 118872 KB Output is correct
25 Correct 109 ms 118984 KB Output is correct
26 Correct 119 ms 118888 KB Output is correct
27 Correct 130 ms 118984 KB Output is correct
28 Correct 129 ms 118956 KB Output is correct
29 Correct 102 ms 118972 KB Output is correct
30 Correct 103 ms 119032 KB Output is correct
31 Correct 131 ms 119032 KB Output is correct
32 Correct 130 ms 119036 KB Output is correct
33 Correct 128 ms 118880 KB Output is correct
34 Correct 117 ms 118892 KB Output is correct
35 Correct 115 ms 118904 KB Output is correct
36 Correct 120 ms 118904 KB Output is correct
37 Correct 139 ms 118916 KB Output is correct
38 Correct 118 ms 118972 KB Output is correct
39 Correct 103 ms 118864 KB Output is correct
40 Correct 108 ms 118944 KB Output is correct
41 Correct 122 ms 118904 KB Output is correct
42 Correct 111 ms 118848 KB Output is correct
43 Correct 112 ms 118912 KB Output is correct
44 Correct 121 ms 118904 KB Output is correct
45 Correct 123 ms 118896 KB Output is correct
46 Correct 111 ms 118852 KB Output is correct
47 Correct 127 ms 118952 KB Output is correct
48 Correct 127 ms 118944 KB Output is correct
49 Correct 114 ms 119000 KB Output is correct
50 Correct 117 ms 118924 KB Output is correct
51 Correct 126 ms 118948 KB Output is correct
52 Correct 133 ms 118904 KB Output is correct
53 Correct 101 ms 118996 KB Output is correct
54 Correct 98 ms 118960 KB Output is correct
55 Correct 124 ms 118976 KB Output is correct
56 Correct 105 ms 118904 KB Output is correct
57 Correct 104 ms 118904 KB Output is correct
58 Correct 110 ms 118892 KB Output is correct
59 Correct 108 ms 118984 KB Output is correct
60 Correct 113 ms 119032 KB Output is correct
61 Correct 110 ms 118868 KB Output is correct
62 Correct 100 ms 118940 KB Output is correct
63 Correct 123 ms 118904 KB Output is correct
64 Correct 138 ms 120228 KB Output is correct
65 Correct 140 ms 119408 KB Output is correct
66 Correct 145 ms 119160 KB Output is correct
67 Correct 121 ms 119168 KB Output is correct
68 Correct 156 ms 120332 KB Output is correct
69 Correct 148 ms 119456 KB Output is correct
70 Correct 128 ms 119224 KB Output is correct
71 Correct 146 ms 119188 KB Output is correct
72 Correct 147 ms 120996 KB Output is correct
73 Correct 157 ms 120644 KB Output is correct
74 Correct 150 ms 120548 KB Output is correct
75 Correct 157 ms 120528 KB Output is correct
76 Correct 156 ms 121336 KB Output is correct
77 Correct 148 ms 121372 KB Output is correct
78 Correct 155 ms 121336 KB Output is correct
79 Correct 180 ms 121404 KB Output is correct
80 Correct 153 ms 120200 KB Output is correct
81 Correct 133 ms 119292 KB Output is correct
82 Correct 121 ms 119216 KB Output is correct
83 Correct 131 ms 119164 KB Output is correct
84 Correct 147 ms 120324 KB Output is correct
85 Correct 135 ms 119480 KB Output is correct
86 Correct 147 ms 119160 KB Output is correct
87 Correct 161 ms 119164 KB Output is correct
88 Correct 143 ms 120936 KB Output is correct
89 Correct 161 ms 120520 KB Output is correct
90 Correct 138 ms 120428 KB Output is correct
91 Correct 159 ms 120440 KB Output is correct
92 Correct 153 ms 121336 KB Output is correct
93 Correct 172 ms 121420 KB Output is correct
94 Correct 139 ms 121404 KB Output is correct
95 Correct 158 ms 121344 KB Output is correct
96 Correct 142 ms 119196 KB Output is correct
97 Correct 124 ms 119100 KB Output is correct
98 Correct 126 ms 119168 KB Output is correct
99 Correct 119 ms 119160 KB Output is correct
100 Correct 153 ms 119244 KB Output is correct
101 Correct 136 ms 119212 KB Output is correct
102 Correct 132 ms 119240 KB Output is correct
103 Correct 135 ms 119212 KB Output is correct
104 Correct 175 ms 120300 KB Output is correct
105 Correct 133 ms 119416 KB Output is correct
106 Correct 146 ms 119196 KB Output is correct
107 Correct 131 ms 119168 KB Output is correct
108 Correct 144 ms 120200 KB Output is correct
109 Correct 139 ms 119420 KB Output is correct
110 Correct 133 ms 119160 KB Output is correct
111 Correct 124 ms 119160 KB Output is correct
112 Correct 153 ms 120212 KB Output is correct
113 Correct 133 ms 120320 KB Output is correct
114 Correct 116 ms 120312 KB Output is correct
115 Correct 131 ms 120284 KB Output is correct
116 Correct 130 ms 120320 KB Output is correct
117 Correct 144 ms 120252 KB Output is correct
118 Correct 127 ms 120312 KB Output is correct
119 Correct 134 ms 120300 KB Output is correct
120 Correct 129 ms 120312 KB Output is correct
121 Correct 132 ms 120328 KB Output is correct
122 Correct 124 ms 121392 KB Output is correct
123 Correct 119 ms 121336 KB Output is correct
124 Correct 122 ms 119416 KB Output is correct
125 Correct 122 ms 119216 KB Output is correct
126 Correct 145 ms 119160 KB Output is correct
127 Correct 124 ms 119544 KB Output is correct
128 Correct 115 ms 119136 KB Output is correct
129 Correct 132 ms 119160 KB Output is correct
130 Correct 133 ms 119676 KB Output is correct
131 Correct 117 ms 119172 KB Output is correct
132 Correct 138 ms 119124 KB Output is correct
133 Correct 312 ms 124548 KB Output is correct
134 Correct 267 ms 120824 KB Output is correct
135 Correct 221 ms 120056 KB Output is correct
136 Correct 223 ms 120056 KB Output is correct
137 Correct 345 ms 124640 KB Output is correct
138 Correct 259 ms 120952 KB Output is correct
139 Correct 257 ms 120308 KB Output is correct
140 Correct 204 ms 120056 KB Output is correct
141 Correct 305 ms 127480 KB Output is correct
142 Correct 301 ms 125836 KB Output is correct
143 Correct 275 ms 125688 KB Output is correct
144 Correct 306 ms 125472 KB Output is correct
145 Correct 320 ms 129320 KB Output is correct
146 Correct 351 ms 129400 KB Output is correct
147 Correct 439 ms 129288 KB Output is correct
148 Correct 377 ms 129368 KB Output is correct
149 Correct 294 ms 124628 KB Output is correct
150 Correct 249 ms 120824 KB Output is correct
151 Correct 214 ms 120100 KB Output is correct
152 Correct 248 ms 120056 KB Output is correct
153 Correct 344 ms 124536 KB Output is correct
154 Correct 307 ms 120824 KB Output is correct
155 Correct 235 ms 120312 KB Output is correct
156 Correct 275 ms 120148 KB Output is correct
157 Correct 321 ms 127368 KB Output is correct
158 Correct 345 ms 125904 KB Output is correct
159 Correct 290 ms 125552 KB Output is correct
160 Correct 301 ms 125556 KB Output is correct
161 Correct 377 ms 129272 KB Output is correct
162 Correct 375 ms 129240 KB Output is correct
163 Correct 307 ms 129256 KB Output is correct
164 Correct 332 ms 129316 KB Output is correct
165 Correct 185 ms 120056 KB Output is correct
166 Correct 184 ms 120060 KB Output is correct
167 Correct 211 ms 119968 KB Output is correct
168 Correct 274 ms 120056 KB Output is correct
169 Correct 273 ms 120012 KB Output is correct
170 Correct 201 ms 120104 KB Output is correct
171 Correct 190 ms 120060 KB Output is correct
172 Correct 186 ms 120056 KB Output is correct
173 Correct 297 ms 124536 KB Output is correct
174 Correct 243 ms 120824 KB Output is correct
175 Correct 223 ms 120108 KB Output is correct
176 Correct 251 ms 120056 KB Output is correct
177 Correct 287 ms 124620 KB Output is correct
178 Correct 238 ms 120928 KB Output is correct
179 Correct 238 ms 120056 KB Output is correct
180 Correct 217 ms 120064 KB Output is correct
181 Correct 189 ms 124664 KB Output is correct
182 Correct 232 ms 124672 KB Output is correct
183 Correct 180 ms 124636 KB Output is correct
184 Correct 234 ms 124736 KB Output is correct
185 Correct 191 ms 124664 KB Output is correct
186 Correct 257 ms 124664 KB Output is correct
187 Correct 173 ms 124856 KB Output is correct
188 Correct 203 ms 124664 KB Output is correct
189 Correct 228 ms 124664 KB Output is correct
190 Correct 214 ms 124700 KB Output is correct
191 Correct 208 ms 129144 KB Output is correct
192 Correct 239 ms 129212 KB Output is correct
193 Correct 463 ms 160048 KB Output is correct
194 Correct 537 ms 159908 KB Output is correct
195 Correct 835 ms 200968 KB Output is correct
196 Correct 888 ms 200968 KB Output is correct
197 Correct 994 ms 221044 KB Output is correct
198 Correct 1057 ms 221212 KB Output is correct
199 Correct 1208 ms 129640 KB Output is correct
200 Correct 881 ms 126712 KB Output is correct
201 Correct 804 ms 126328 KB Output is correct
202 Correct 1413 ms 132776 KB Output is correct
203 Correct 851 ms 126800 KB Output is correct
204 Correct 843 ms 126396 KB Output is correct
205 Correct 1574 ms 134268 KB Output is correct
206 Correct 873 ms 126900 KB Output is correct
207 Correct 847 ms 126396 KB Output is correct
208 Correct 832 ms 127664 KB Output is correct
209 Correct 958 ms 127672 KB Output is correct
210 Correct 818 ms 127632 KB Output is correct
211 Correct 802 ms 127440 KB Output is correct
212 Correct 950 ms 127552 KB Output is correct
213 Correct 3228 ms 175340 KB Output is correct
214 Correct 2391 ms 137952 KB Output is correct
215 Correct 1907 ms 130076 KB Output is correct
216 Correct 1098 ms 129560 KB Output is correct
217 Correct 3492 ms 175600 KB Output is correct
218 Correct 3201 ms 138360 KB Output is correct
219 Correct 2079 ms 130424 KB Output is correct
220 Correct 1258 ms 129656 KB Output is correct
221 Correct 3122 ms 203744 KB Output is correct
222 Correct 3181 ms 188844 KB Output is correct
223 Correct 3852 ms 185424 KB Output is correct
224 Correct 4129 ms 185012 KB Output is correct
225 Correct 3271 ms 220948 KB Output is correct
226 Correct 3117 ms 217484 KB Output is correct
227 Correct 3110 ms 214984 KB Output is correct
228 Correct 4670 ms 214904 KB Output is correct
229 Correct 3347 ms 168892 KB Output is correct
230 Correct 3403 ms 130272 KB Output is correct
231 Correct 2093 ms 122744 KB Output is correct
232 Correct 1193 ms 122104 KB Output is correct
233 Correct 3344 ms 168032 KB Output is correct
234 Correct 2324 ms 130460 KB Output is correct
235 Correct 2119 ms 122888 KB Output is correct
236 Correct 1489 ms 121948 KB Output is correct
237 Correct 3256 ms 196032 KB Output is correct
238 Correct 3347 ms 181464 KB Output is correct
239 Correct 3315 ms 178440 KB Output is correct
240 Correct 3277 ms 177540 KB Output is correct
241 Correct 3409 ms 214932 KB Output is correct
242 Correct 3493 ms 214828 KB Output is correct
243 Correct 3214 ms 214776 KB Output is correct
244 Correct 3330 ms 214520 KB Output is correct
245 Correct 960 ms 122492 KB Output is correct
246 Correct 1020 ms 122336 KB Output is correct
247 Correct 1137 ms 122360 KB Output is correct
248 Correct 1099 ms 122404 KB Output is correct
249 Correct 1275 ms 122236 KB Output is correct
250 Correct 1247 ms 122116 KB Output is correct
251 Correct 1332 ms 122072 KB Output is correct
252 Correct 1213 ms 122484 KB Output is correct
253 Correct 2883 ms 167964 KB Output is correct
254 Correct 2334 ms 130824 KB Output is correct
255 Correct 1652 ms 122896 KB Output is correct
256 Correct 1124 ms 122436 KB Output is correct
257 Correct 2672 ms 167988 KB Output is correct
258 Correct 2222 ms 130756 KB Output is correct
259 Correct 1907 ms 122876 KB Output is correct
260 Correct 1155 ms 122480 KB Output is correct
261 Correct 1374 ms 169336 KB Output is correct
262 Correct 1921 ms 169468 KB Output is correct
263 Correct 859 ms 169464 KB Output is correct
264 Correct 1444 ms 169336 KB Output is correct
265 Correct 2007 ms 169500 KB Output is correct
266 Correct 2049 ms 170196 KB Output is correct
267 Correct 1071 ms 170104 KB Output is correct
268 Correct 2655 ms 170080 KB Output is correct
269 Correct 945 ms 214568 KB Output is correct
270 Correct 1067 ms 214588 KB Output is correct
271 Correct 1285 ms 124384 KB Output is correct
272 Correct 857 ms 121564 KB Output is correct
273 Correct 1524 ms 127176 KB Output is correct
274 Correct 866 ms 120916 KB Output is correct
275 Correct 1127 ms 169416 KB Output is correct