Submission #277641

# Submission time Handle Problem Language Result Execution time Memory
277641 2020-08-21T06:29:26 Z 문홍윤(#5120) Interval Collection (CCO20_day2problem2) C++17
25 / 25
1504 ms 232276 KB
#include <bits/stdc++.h>
#define eb emplace_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define svec(x) sort(x.begin(), x.end())
#define press(x) x.erase(unique(x.begin(), x.end()), x.end())
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
typedef pair<LL, LL> pll;
typedef pair<int, LL> pil;
typedef pair<LL, int> pli;
const LL llinf=2e18;
const int inf=1e9;

struct MY_MULTISET{
    int sz;
    priority_queue<int> pq, del;
    void in(int x){pq.push(x); sz++;}
    void er(int x){del.push(x); sz--;}
    int tp(){
        if(!sz)return -inf;
        while(del.size()){
            if(del.top()!=pq.top())break;
            del.pop(); pq.pop();
        }
        return pq.top();
    }
    MY_MULTISET(){sz=0;}
}l[1000010], r[1000010], tl, tr;

struct SEGMENT_TREE{
    struct NODE{
        int maxl, minr, ans;
        NODE(){maxl=-inf, minr=ans=inf;}
    }tree[4000010];
    void upd(int point, int s, int e, int num){
        if(s==e){
            tree[point].maxl=l[s].tp();
            tree[point].minr=-r[s].tp();
            tree[point].ans=tree[point].minr-tree[point].maxl;
            return;
        }
        if(num<=(s+e)/2)upd(point*2, s, (s+e)/2, num);
        else upd(point*2+1, (s+e)/2+1, e, num);
        tree[point].maxl=max(tree[point*2].maxl, tree[point*2+1].maxl);
        tree[point].minr=min(tree[point*2].minr, tree[point*2+1].minr);
        tree[point].ans=min(min(tree[point*2].ans, tree[point*2+1].ans), tree[point*2+1].minr-tree[point*2].maxl);
    }
    int query(){return tree[1].ans;}
}seg;

int q;
void ins(int a, int b){
    tl.in(a);
    tr.in(-b);
    l[b].in(a);
    r[a].in(-b);
    seg.upd(1, 1, 1000000, a);
    seg.upd(1, 1, 1000000, b);
}
void del(int a, int b){
    tl.er(a);
    tr.er(-b);
    l[b].er(a);
    r[a].er(-b);
    seg.upd(1, 1, 1000000, a);
    seg.upd(1, 1, 1000000, b);
}
int query(){
    int maxl=tl.tp();
    int minr=-tr.tp();
    if(maxl<minr)return -r[maxl].tp()-l[minr].tp();
    return seg.query();
}

int main(){
    scanf("%d", &q);
    while(q--){
        int a, b; char c;
        scanf(" %c %d %d", &c, &a, &b);
        if(c=='A')ins(a, b);
        if(c=='R')del(a, b);
        printf("%d\n", query());
    }
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:80:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   80 |     scanf("%d", &q);
      |     ~~~~~^~~~~~~~~~
Main.cpp:83:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   83 |         scanf(" %c %d %d", &c, &a, &b);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 132 ms 188152 KB Output is correct
2 Correct 129 ms 188152 KB Output is correct
3 Correct 133 ms 188152 KB Output is correct
4 Correct 132 ms 188176 KB Output is correct
5 Correct 125 ms 188264 KB Output is correct
6 Correct 128 ms 188152 KB Output is correct
7 Correct 128 ms 188168 KB Output is correct
8 Correct 128 ms 188152 KB Output is correct
9 Correct 132 ms 188152 KB Output is correct
10 Correct 158 ms 188152 KB Output is correct
11 Correct 148 ms 188280 KB Output is correct
12 Correct 124 ms 188152 KB Output is correct
13 Correct 125 ms 188280 KB Output is correct
14 Correct 124 ms 188160 KB Output is correct
15 Correct 123 ms 188152 KB Output is correct
16 Correct 123 ms 188152 KB Output is correct
17 Correct 124 ms 188152 KB Output is correct
18 Correct 127 ms 188164 KB Output is correct
19 Correct 128 ms 188152 KB Output is correct
20 Correct 126 ms 188280 KB Output is correct
21 Correct 124 ms 188152 KB Output is correct
22 Correct 127 ms 188152 KB Output is correct
23 Correct 131 ms 188152 KB Output is correct
24 Correct 129 ms 188152 KB Output is correct
25 Correct 130 ms 188152 KB Output is correct
26 Correct 131 ms 188280 KB Output is correct
27 Correct 136 ms 188152 KB Output is correct
28 Correct 128 ms 188152 KB Output is correct
29 Correct 159 ms 188280 KB Output is correct
30 Correct 144 ms 188152 KB Output is correct
31 Correct 140 ms 188152 KB Output is correct
32 Correct 122 ms 188152 KB Output is correct
33 Correct 123 ms 188268 KB Output is correct
34 Correct 127 ms 188152 KB Output is correct
35 Correct 128 ms 188280 KB Output is correct
36 Correct 134 ms 188152 KB Output is correct
37 Correct 129 ms 188152 KB Output is correct
38 Correct 123 ms 188280 KB Output is correct
39 Correct 122 ms 188280 KB Output is correct
40 Correct 123 ms 188152 KB Output is correct
41 Correct 126 ms 188152 KB Output is correct
42 Correct 125 ms 188152 KB Output is correct
43 Correct 126 ms 188152 KB Output is correct
44 Correct 126 ms 188152 KB Output is correct
45 Correct 123 ms 188280 KB Output is correct
46 Correct 124 ms 188152 KB Output is correct
47 Correct 123 ms 188152 KB Output is correct
48 Correct 125 ms 188152 KB Output is correct
49 Correct 126 ms 188280 KB Output is correct
50 Correct 124 ms 188152 KB Output is correct
51 Correct 122 ms 188152 KB Output is correct
52 Correct 125 ms 188152 KB Output is correct
53 Correct 125 ms 188280 KB Output is correct
54 Correct 126 ms 188152 KB Output is correct
55 Correct 122 ms 188152 KB Output is correct
56 Correct 124 ms 188152 KB Output is correct
57 Correct 124 ms 188152 KB Output is correct
58 Correct 127 ms 188152 KB Output is correct
59 Correct 123 ms 188268 KB Output is correct
60 Correct 123 ms 188152 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 132 ms 188152 KB Output is correct
2 Correct 129 ms 188152 KB Output is correct
3 Correct 133 ms 188152 KB Output is correct
4 Correct 132 ms 188176 KB Output is correct
5 Correct 125 ms 188264 KB Output is correct
6 Correct 128 ms 188152 KB Output is correct
7 Correct 128 ms 188168 KB Output is correct
8 Correct 128 ms 188152 KB Output is correct
9 Correct 132 ms 188152 KB Output is correct
10 Correct 158 ms 188152 KB Output is correct
11 Correct 148 ms 188280 KB Output is correct
12 Correct 124 ms 188152 KB Output is correct
13 Correct 125 ms 188280 KB Output is correct
14 Correct 124 ms 188160 KB Output is correct
15 Correct 123 ms 188152 KB Output is correct
16 Correct 123 ms 188152 KB Output is correct
17 Correct 124 ms 188152 KB Output is correct
18 Correct 127 ms 188164 KB Output is correct
19 Correct 128 ms 188152 KB Output is correct
20 Correct 126 ms 188280 KB Output is correct
21 Correct 124 ms 188152 KB Output is correct
22 Correct 127 ms 188152 KB Output is correct
23 Correct 131 ms 188152 KB Output is correct
24 Correct 129 ms 188152 KB Output is correct
25 Correct 130 ms 188152 KB Output is correct
26 Correct 131 ms 188280 KB Output is correct
27 Correct 136 ms 188152 KB Output is correct
28 Correct 128 ms 188152 KB Output is correct
29 Correct 159 ms 188280 KB Output is correct
30 Correct 144 ms 188152 KB Output is correct
31 Correct 140 ms 188152 KB Output is correct
32 Correct 122 ms 188152 KB Output is correct
33 Correct 123 ms 188268 KB Output is correct
34 Correct 127 ms 188152 KB Output is correct
35 Correct 128 ms 188280 KB Output is correct
36 Correct 134 ms 188152 KB Output is correct
37 Correct 129 ms 188152 KB Output is correct
38 Correct 123 ms 188280 KB Output is correct
39 Correct 122 ms 188280 KB Output is correct
40 Correct 123 ms 188152 KB Output is correct
41 Correct 126 ms 188152 KB Output is correct
42 Correct 125 ms 188152 KB Output is correct
43 Correct 126 ms 188152 KB Output is correct
44 Correct 126 ms 188152 KB Output is correct
45 Correct 123 ms 188280 KB Output is correct
46 Correct 124 ms 188152 KB Output is correct
47 Correct 123 ms 188152 KB Output is correct
48 Correct 125 ms 188152 KB Output is correct
49 Correct 126 ms 188280 KB Output is correct
50 Correct 124 ms 188152 KB Output is correct
51 Correct 122 ms 188152 KB Output is correct
52 Correct 125 ms 188152 KB Output is correct
53 Correct 125 ms 188280 KB Output is correct
54 Correct 126 ms 188152 KB Output is correct
55 Correct 122 ms 188152 KB Output is correct
56 Correct 124 ms 188152 KB Output is correct
57 Correct 124 ms 188152 KB Output is correct
58 Correct 127 ms 188152 KB Output is correct
59 Correct 123 ms 188268 KB Output is correct
60 Correct 123 ms 188152 KB Output is correct
61 Correct 122 ms 188228 KB Output is correct
62 Correct 123 ms 188232 KB Output is correct
63 Correct 139 ms 188152 KB Output is correct
64 Correct 164 ms 189176 KB Output is correct
65 Correct 160 ms 189432 KB Output is correct
66 Correct 166 ms 189280 KB Output is correct
67 Correct 146 ms 189176 KB Output is correct
68 Correct 152 ms 189304 KB Output is correct
69 Correct 158 ms 189304 KB Output is correct
70 Correct 170 ms 189400 KB Output is correct
71 Correct 148 ms 189304 KB Output is correct
72 Correct 155 ms 189432 KB Output is correct
73 Correct 154 ms 189328 KB Output is correct
74 Correct 167 ms 189304 KB Output is correct
75 Correct 149 ms 189304 KB Output is correct
76 Correct 151 ms 189304 KB Output is correct
77 Correct 150 ms 189304 KB Output is correct
78 Correct 160 ms 189304 KB Output is correct
79 Correct 164 ms 189380 KB Output is correct
80 Correct 154 ms 189304 KB Output is correct
81 Correct 149 ms 189304 KB Output is correct
82 Correct 146 ms 189304 KB Output is correct
83 Correct 167 ms 189304 KB Output is correct
84 Correct 157 ms 189528 KB Output is correct
85 Correct 146 ms 189304 KB Output is correct
86 Correct 146 ms 189304 KB Output is correct
87 Correct 145 ms 189304 KB Output is correct
88 Correct 153 ms 189304 KB Output is correct
89 Correct 149 ms 189304 KB Output is correct
90 Correct 166 ms 189304 KB Output is correct
91 Correct 147 ms 189304 KB Output is correct
92 Correct 147 ms 189304 KB Output is correct
93 Correct 150 ms 189432 KB Output is correct
94 Correct 154 ms 189304 KB Output is correct
95 Correct 158 ms 189248 KB Output is correct
96 Correct 145 ms 189176 KB Output is correct
97 Correct 159 ms 189228 KB Output is correct
98 Correct 152 ms 189176 KB Output is correct
99 Correct 144 ms 189176 KB Output is correct
100 Correct 147 ms 189272 KB Output is correct
101 Correct 148 ms 189304 KB Output is correct
102 Correct 162 ms 189364 KB Output is correct
103 Correct 145 ms 189176 KB Output is correct
104 Correct 148 ms 189304 KB Output is correct
105 Correct 148 ms 189304 KB Output is correct
106 Correct 146 ms 189176 KB Output is correct
107 Correct 148 ms 189304 KB Output is correct
108 Correct 148 ms 189304 KB Output is correct
109 Correct 154 ms 189204 KB Output is correct
110 Correct 165 ms 189296 KB Output is correct
111 Correct 162 ms 189176 KB Output is correct
112 Correct 140 ms 189304 KB Output is correct
113 Correct 146 ms 189308 KB Output is correct
114 Correct 148 ms 189304 KB Output is correct
115 Correct 150 ms 189048 KB Output is correct
116 Correct 149 ms 189304 KB Output is correct
117 Correct 148 ms 189304 KB Output is correct
118 Correct 143 ms 189048 KB Output is correct
119 Correct 140 ms 189048 KB Output is correct
120 Correct 143 ms 189432 KB Output is correct
121 Correct 147 ms 189432 KB Output is correct
122 Correct 142 ms 189308 KB Output is correct
123 Correct 142 ms 189304 KB Output is correct
124 Correct 146 ms 189048 KB Output is correct
125 Correct 141 ms 188656 KB Output is correct
126 Correct 137 ms 188664 KB Output is correct
127 Correct 137 ms 188920 KB Output is correct
128 Correct 135 ms 188792 KB Output is correct
129 Correct 135 ms 188680 KB Output is correct
130 Correct 137 ms 188920 KB Output is correct
131 Correct 138 ms 188664 KB Output is correct
132 Correct 135 ms 188792 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 132 ms 188152 KB Output is correct
2 Correct 129 ms 188152 KB Output is correct
3 Correct 133 ms 188152 KB Output is correct
4 Correct 132 ms 188176 KB Output is correct
5 Correct 125 ms 188264 KB Output is correct
6 Correct 128 ms 188152 KB Output is correct
7 Correct 128 ms 188168 KB Output is correct
8 Correct 128 ms 188152 KB Output is correct
9 Correct 132 ms 188152 KB Output is correct
10 Correct 158 ms 188152 KB Output is correct
11 Correct 148 ms 188280 KB Output is correct
12 Correct 124 ms 188152 KB Output is correct
13 Correct 125 ms 188280 KB Output is correct
14 Correct 124 ms 188160 KB Output is correct
15 Correct 123 ms 188152 KB Output is correct
16 Correct 123 ms 188152 KB Output is correct
17 Correct 124 ms 188152 KB Output is correct
18 Correct 127 ms 188164 KB Output is correct
19 Correct 128 ms 188152 KB Output is correct
20 Correct 126 ms 188280 KB Output is correct
21 Correct 124 ms 188152 KB Output is correct
22 Correct 127 ms 188152 KB Output is correct
23 Correct 131 ms 188152 KB Output is correct
24 Correct 129 ms 188152 KB Output is correct
25 Correct 130 ms 188152 KB Output is correct
26 Correct 131 ms 188280 KB Output is correct
27 Correct 136 ms 188152 KB Output is correct
28 Correct 128 ms 188152 KB Output is correct
29 Correct 159 ms 188280 KB Output is correct
30 Correct 144 ms 188152 KB Output is correct
31 Correct 140 ms 188152 KB Output is correct
32 Correct 122 ms 188152 KB Output is correct
33 Correct 123 ms 188268 KB Output is correct
34 Correct 127 ms 188152 KB Output is correct
35 Correct 128 ms 188280 KB Output is correct
36 Correct 134 ms 188152 KB Output is correct
37 Correct 129 ms 188152 KB Output is correct
38 Correct 123 ms 188280 KB Output is correct
39 Correct 122 ms 188280 KB Output is correct
40 Correct 123 ms 188152 KB Output is correct
41 Correct 126 ms 188152 KB Output is correct
42 Correct 125 ms 188152 KB Output is correct
43 Correct 126 ms 188152 KB Output is correct
44 Correct 126 ms 188152 KB Output is correct
45 Correct 123 ms 188280 KB Output is correct
46 Correct 124 ms 188152 KB Output is correct
47 Correct 123 ms 188152 KB Output is correct
48 Correct 125 ms 188152 KB Output is correct
49 Correct 126 ms 188280 KB Output is correct
50 Correct 124 ms 188152 KB Output is correct
51 Correct 122 ms 188152 KB Output is correct
52 Correct 125 ms 188152 KB Output is correct
53 Correct 125 ms 188280 KB Output is correct
54 Correct 126 ms 188152 KB Output is correct
55 Correct 122 ms 188152 KB Output is correct
56 Correct 124 ms 188152 KB Output is correct
57 Correct 124 ms 188152 KB Output is correct
58 Correct 127 ms 188152 KB Output is correct
59 Correct 123 ms 188268 KB Output is correct
60 Correct 123 ms 188152 KB Output is correct
61 Correct 122 ms 188228 KB Output is correct
62 Correct 123 ms 188232 KB Output is correct
63 Correct 139 ms 188152 KB Output is correct
64 Correct 164 ms 189176 KB Output is correct
65 Correct 160 ms 189432 KB Output is correct
66 Correct 166 ms 189280 KB Output is correct
67 Correct 146 ms 189176 KB Output is correct
68 Correct 152 ms 189304 KB Output is correct
69 Correct 158 ms 189304 KB Output is correct
70 Correct 170 ms 189400 KB Output is correct
71 Correct 148 ms 189304 KB Output is correct
72 Correct 155 ms 189432 KB Output is correct
73 Correct 154 ms 189328 KB Output is correct
74 Correct 167 ms 189304 KB Output is correct
75 Correct 149 ms 189304 KB Output is correct
76 Correct 151 ms 189304 KB Output is correct
77 Correct 150 ms 189304 KB Output is correct
78 Correct 160 ms 189304 KB Output is correct
79 Correct 164 ms 189380 KB Output is correct
80 Correct 154 ms 189304 KB Output is correct
81 Correct 149 ms 189304 KB Output is correct
82 Correct 146 ms 189304 KB Output is correct
83 Correct 167 ms 189304 KB Output is correct
84 Correct 157 ms 189528 KB Output is correct
85 Correct 146 ms 189304 KB Output is correct
86 Correct 146 ms 189304 KB Output is correct
87 Correct 145 ms 189304 KB Output is correct
88 Correct 153 ms 189304 KB Output is correct
89 Correct 149 ms 189304 KB Output is correct
90 Correct 166 ms 189304 KB Output is correct
91 Correct 147 ms 189304 KB Output is correct
92 Correct 147 ms 189304 KB Output is correct
93 Correct 150 ms 189432 KB Output is correct
94 Correct 154 ms 189304 KB Output is correct
95 Correct 158 ms 189248 KB Output is correct
96 Correct 145 ms 189176 KB Output is correct
97 Correct 159 ms 189228 KB Output is correct
98 Correct 152 ms 189176 KB Output is correct
99 Correct 144 ms 189176 KB Output is correct
100 Correct 147 ms 189272 KB Output is correct
101 Correct 148 ms 189304 KB Output is correct
102 Correct 162 ms 189364 KB Output is correct
103 Correct 145 ms 189176 KB Output is correct
104 Correct 148 ms 189304 KB Output is correct
105 Correct 148 ms 189304 KB Output is correct
106 Correct 146 ms 189176 KB Output is correct
107 Correct 148 ms 189304 KB Output is correct
108 Correct 148 ms 189304 KB Output is correct
109 Correct 154 ms 189204 KB Output is correct
110 Correct 165 ms 189296 KB Output is correct
111 Correct 162 ms 189176 KB Output is correct
112 Correct 140 ms 189304 KB Output is correct
113 Correct 146 ms 189308 KB Output is correct
114 Correct 148 ms 189304 KB Output is correct
115 Correct 150 ms 189048 KB Output is correct
116 Correct 149 ms 189304 KB Output is correct
117 Correct 148 ms 189304 KB Output is correct
118 Correct 143 ms 189048 KB Output is correct
119 Correct 140 ms 189048 KB Output is correct
120 Correct 143 ms 189432 KB Output is correct
121 Correct 147 ms 189432 KB Output is correct
122 Correct 142 ms 189308 KB Output is correct
123 Correct 142 ms 189304 KB Output is correct
124 Correct 146 ms 189048 KB Output is correct
125 Correct 141 ms 188656 KB Output is correct
126 Correct 137 ms 188664 KB Output is correct
127 Correct 137 ms 188920 KB Output is correct
128 Correct 135 ms 188792 KB Output is correct
129 Correct 135 ms 188680 KB Output is correct
130 Correct 137 ms 188920 KB Output is correct
131 Correct 138 ms 188664 KB Output is correct
132 Correct 135 ms 188792 KB Output is correct
133 Correct 235 ms 192624 KB Output is correct
134 Correct 231 ms 192632 KB Output is correct
135 Correct 233 ms 192760 KB Output is correct
136 Correct 228 ms 192376 KB Output is correct
137 Correct 258 ms 192688 KB Output is correct
138 Correct 265 ms 192888 KB Output is correct
139 Correct 224 ms 192760 KB Output is correct
140 Correct 222 ms 192760 KB Output is correct
141 Correct 238 ms 192620 KB Output is correct
142 Correct 241 ms 192624 KB Output is correct
143 Correct 255 ms 192752 KB Output is correct
144 Correct 263 ms 192836 KB Output is correct
145 Correct 243 ms 192624 KB Output is correct
146 Correct 257 ms 192624 KB Output is correct
147 Correct 247 ms 192824 KB Output is correct
148 Correct 241 ms 192624 KB Output is correct
149 Correct 234 ms 192624 KB Output is correct
150 Correct 243 ms 192632 KB Output is correct
151 Correct 256 ms 192760 KB Output is correct
152 Correct 228 ms 192368 KB Output is correct
153 Correct 241 ms 192496 KB Output is correct
154 Correct 258 ms 192760 KB Output is correct
155 Correct 230 ms 192632 KB Output is correct
156 Correct 263 ms 192504 KB Output is correct
157 Correct 235 ms 192496 KB Output is correct
158 Correct 231 ms 192496 KB Output is correct
159 Correct 235 ms 192496 KB Output is correct
160 Correct 234 ms 192500 KB Output is correct
161 Correct 230 ms 192392 KB Output is correct
162 Correct 251 ms 192492 KB Output is correct
163 Correct 232 ms 192492 KB Output is correct
164 Correct 231 ms 192496 KB Output is correct
165 Correct 223 ms 192376 KB Output is correct
166 Correct 233 ms 192376 KB Output is correct
167 Correct 215 ms 192376 KB Output is correct
168 Correct 221 ms 192376 KB Output is correct
169 Correct 233 ms 192760 KB Output is correct
170 Correct 230 ms 192504 KB Output is correct
171 Correct 258 ms 192376 KB Output is correct
172 Correct 221 ms 192376 KB Output is correct
173 Correct 237 ms 193008 KB Output is correct
174 Correct 237 ms 192648 KB Output is correct
175 Correct 247 ms 192448 KB Output is correct
176 Correct 230 ms 192376 KB Output is correct
177 Correct 242 ms 192632 KB Output is correct
178 Correct 245 ms 192632 KB Output is correct
179 Correct 247 ms 192504 KB Output is correct
180 Correct 248 ms 192376 KB Output is correct
181 Correct 206 ms 192664 KB Output is correct
182 Correct 217 ms 192760 KB Output is correct
183 Correct 195 ms 191864 KB Output is correct
184 Correct 209 ms 191936 KB Output is correct
185 Correct 200 ms 192628 KB Output is correct
186 Correct 216 ms 192636 KB Output is correct
187 Correct 211 ms 192024 KB Output is correct
188 Correct 219 ms 191992 KB Output is correct
189 Correct 207 ms 192656 KB Output is correct
190 Correct 217 ms 192628 KB Output is correct
191 Correct 188 ms 192624 KB Output is correct
192 Correct 187 ms 192624 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 371 ms 202920 KB Output is correct
2 Correct 378 ms 205792 KB Output is correct
3 Correct 603 ms 222124 KB Output is correct
4 Correct 639 ms 222036 KB Output is correct
5 Correct 820 ms 228840 KB Output is correct
6 Correct 799 ms 228852 KB Output is correct
7 Correct 1058 ms 207172 KB Output is correct
8 Correct 746 ms 200004 KB Output is correct
9 Correct 721 ms 199500 KB Output is correct
10 Correct 940 ms 208452 KB Output is correct
11 Correct 785 ms 200008 KB Output is correct
12 Correct 711 ms 199476 KB Output is correct
13 Correct 1012 ms 208828 KB Output is correct
14 Correct 748 ms 199976 KB Output is correct
15 Correct 726 ms 199432 KB Output is correct
16 Correct 897 ms 213712 KB Output is correct
17 Correct 830 ms 213876 KB Output is correct
18 Correct 886 ms 213976 KB Output is correct
19 Correct 863 ms 213984 KB Output is correct
20 Correct 860 ms 213856 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 132 ms 188152 KB Output is correct
2 Correct 129 ms 188152 KB Output is correct
3 Correct 133 ms 188152 KB Output is correct
4 Correct 132 ms 188176 KB Output is correct
5 Correct 125 ms 188264 KB Output is correct
6 Correct 128 ms 188152 KB Output is correct
7 Correct 128 ms 188168 KB Output is correct
8 Correct 128 ms 188152 KB Output is correct
9 Correct 132 ms 188152 KB Output is correct
10 Correct 158 ms 188152 KB Output is correct
11 Correct 148 ms 188280 KB Output is correct
12 Correct 124 ms 188152 KB Output is correct
13 Correct 125 ms 188280 KB Output is correct
14 Correct 124 ms 188160 KB Output is correct
15 Correct 123 ms 188152 KB Output is correct
16 Correct 123 ms 188152 KB Output is correct
17 Correct 124 ms 188152 KB Output is correct
18 Correct 127 ms 188164 KB Output is correct
19 Correct 128 ms 188152 KB Output is correct
20 Correct 126 ms 188280 KB Output is correct
21 Correct 124 ms 188152 KB Output is correct
22 Correct 127 ms 188152 KB Output is correct
23 Correct 131 ms 188152 KB Output is correct
24 Correct 129 ms 188152 KB Output is correct
25 Correct 130 ms 188152 KB Output is correct
26 Correct 131 ms 188280 KB Output is correct
27 Correct 136 ms 188152 KB Output is correct
28 Correct 128 ms 188152 KB Output is correct
29 Correct 159 ms 188280 KB Output is correct
30 Correct 144 ms 188152 KB Output is correct
31 Correct 140 ms 188152 KB Output is correct
32 Correct 122 ms 188152 KB Output is correct
33 Correct 123 ms 188268 KB Output is correct
34 Correct 127 ms 188152 KB Output is correct
35 Correct 128 ms 188280 KB Output is correct
36 Correct 134 ms 188152 KB Output is correct
37 Correct 129 ms 188152 KB Output is correct
38 Correct 123 ms 188280 KB Output is correct
39 Correct 122 ms 188280 KB Output is correct
40 Correct 123 ms 188152 KB Output is correct
41 Correct 126 ms 188152 KB Output is correct
42 Correct 125 ms 188152 KB Output is correct
43 Correct 126 ms 188152 KB Output is correct
44 Correct 126 ms 188152 KB Output is correct
45 Correct 123 ms 188280 KB Output is correct
46 Correct 124 ms 188152 KB Output is correct
47 Correct 123 ms 188152 KB Output is correct
48 Correct 125 ms 188152 KB Output is correct
49 Correct 126 ms 188280 KB Output is correct
50 Correct 124 ms 188152 KB Output is correct
51 Correct 122 ms 188152 KB Output is correct
52 Correct 125 ms 188152 KB Output is correct
53 Correct 125 ms 188280 KB Output is correct
54 Correct 126 ms 188152 KB Output is correct
55 Correct 122 ms 188152 KB Output is correct
56 Correct 124 ms 188152 KB Output is correct
57 Correct 124 ms 188152 KB Output is correct
58 Correct 127 ms 188152 KB Output is correct
59 Correct 123 ms 188268 KB Output is correct
60 Correct 123 ms 188152 KB Output is correct
61 Correct 122 ms 188228 KB Output is correct
62 Correct 123 ms 188232 KB Output is correct
63 Correct 139 ms 188152 KB Output is correct
64 Correct 164 ms 189176 KB Output is correct
65 Correct 160 ms 189432 KB Output is correct
66 Correct 166 ms 189280 KB Output is correct
67 Correct 146 ms 189176 KB Output is correct
68 Correct 152 ms 189304 KB Output is correct
69 Correct 158 ms 189304 KB Output is correct
70 Correct 170 ms 189400 KB Output is correct
71 Correct 148 ms 189304 KB Output is correct
72 Correct 155 ms 189432 KB Output is correct
73 Correct 154 ms 189328 KB Output is correct
74 Correct 167 ms 189304 KB Output is correct
75 Correct 149 ms 189304 KB Output is correct
76 Correct 151 ms 189304 KB Output is correct
77 Correct 150 ms 189304 KB Output is correct
78 Correct 160 ms 189304 KB Output is correct
79 Correct 164 ms 189380 KB Output is correct
80 Correct 154 ms 189304 KB Output is correct
81 Correct 149 ms 189304 KB Output is correct
82 Correct 146 ms 189304 KB Output is correct
83 Correct 167 ms 189304 KB Output is correct
84 Correct 157 ms 189528 KB Output is correct
85 Correct 146 ms 189304 KB Output is correct
86 Correct 146 ms 189304 KB Output is correct
87 Correct 145 ms 189304 KB Output is correct
88 Correct 153 ms 189304 KB Output is correct
89 Correct 149 ms 189304 KB Output is correct
90 Correct 166 ms 189304 KB Output is correct
91 Correct 147 ms 189304 KB Output is correct
92 Correct 147 ms 189304 KB Output is correct
93 Correct 150 ms 189432 KB Output is correct
94 Correct 154 ms 189304 KB Output is correct
95 Correct 158 ms 189248 KB Output is correct
96 Correct 145 ms 189176 KB Output is correct
97 Correct 159 ms 189228 KB Output is correct
98 Correct 152 ms 189176 KB Output is correct
99 Correct 144 ms 189176 KB Output is correct
100 Correct 147 ms 189272 KB Output is correct
101 Correct 148 ms 189304 KB Output is correct
102 Correct 162 ms 189364 KB Output is correct
103 Correct 145 ms 189176 KB Output is correct
104 Correct 148 ms 189304 KB Output is correct
105 Correct 148 ms 189304 KB Output is correct
106 Correct 146 ms 189176 KB Output is correct
107 Correct 148 ms 189304 KB Output is correct
108 Correct 148 ms 189304 KB Output is correct
109 Correct 154 ms 189204 KB Output is correct
110 Correct 165 ms 189296 KB Output is correct
111 Correct 162 ms 189176 KB Output is correct
112 Correct 140 ms 189304 KB Output is correct
113 Correct 146 ms 189308 KB Output is correct
114 Correct 148 ms 189304 KB Output is correct
115 Correct 150 ms 189048 KB Output is correct
116 Correct 149 ms 189304 KB Output is correct
117 Correct 148 ms 189304 KB Output is correct
118 Correct 143 ms 189048 KB Output is correct
119 Correct 140 ms 189048 KB Output is correct
120 Correct 143 ms 189432 KB Output is correct
121 Correct 147 ms 189432 KB Output is correct
122 Correct 142 ms 189308 KB Output is correct
123 Correct 142 ms 189304 KB Output is correct
124 Correct 146 ms 189048 KB Output is correct
125 Correct 141 ms 188656 KB Output is correct
126 Correct 137 ms 188664 KB Output is correct
127 Correct 137 ms 188920 KB Output is correct
128 Correct 135 ms 188792 KB Output is correct
129 Correct 135 ms 188680 KB Output is correct
130 Correct 137 ms 188920 KB Output is correct
131 Correct 138 ms 188664 KB Output is correct
132 Correct 135 ms 188792 KB Output is correct
133 Correct 235 ms 192624 KB Output is correct
134 Correct 231 ms 192632 KB Output is correct
135 Correct 233 ms 192760 KB Output is correct
136 Correct 228 ms 192376 KB Output is correct
137 Correct 258 ms 192688 KB Output is correct
138 Correct 265 ms 192888 KB Output is correct
139 Correct 224 ms 192760 KB Output is correct
140 Correct 222 ms 192760 KB Output is correct
141 Correct 238 ms 192620 KB Output is correct
142 Correct 241 ms 192624 KB Output is correct
143 Correct 255 ms 192752 KB Output is correct
144 Correct 263 ms 192836 KB Output is correct
145 Correct 243 ms 192624 KB Output is correct
146 Correct 257 ms 192624 KB Output is correct
147 Correct 247 ms 192824 KB Output is correct
148 Correct 241 ms 192624 KB Output is correct
149 Correct 234 ms 192624 KB Output is correct
150 Correct 243 ms 192632 KB Output is correct
151 Correct 256 ms 192760 KB Output is correct
152 Correct 228 ms 192368 KB Output is correct
153 Correct 241 ms 192496 KB Output is correct
154 Correct 258 ms 192760 KB Output is correct
155 Correct 230 ms 192632 KB Output is correct
156 Correct 263 ms 192504 KB Output is correct
157 Correct 235 ms 192496 KB Output is correct
158 Correct 231 ms 192496 KB Output is correct
159 Correct 235 ms 192496 KB Output is correct
160 Correct 234 ms 192500 KB Output is correct
161 Correct 230 ms 192392 KB Output is correct
162 Correct 251 ms 192492 KB Output is correct
163 Correct 232 ms 192492 KB Output is correct
164 Correct 231 ms 192496 KB Output is correct
165 Correct 223 ms 192376 KB Output is correct
166 Correct 233 ms 192376 KB Output is correct
167 Correct 215 ms 192376 KB Output is correct
168 Correct 221 ms 192376 KB Output is correct
169 Correct 233 ms 192760 KB Output is correct
170 Correct 230 ms 192504 KB Output is correct
171 Correct 258 ms 192376 KB Output is correct
172 Correct 221 ms 192376 KB Output is correct
173 Correct 237 ms 193008 KB Output is correct
174 Correct 237 ms 192648 KB Output is correct
175 Correct 247 ms 192448 KB Output is correct
176 Correct 230 ms 192376 KB Output is correct
177 Correct 242 ms 192632 KB Output is correct
178 Correct 245 ms 192632 KB Output is correct
179 Correct 247 ms 192504 KB Output is correct
180 Correct 248 ms 192376 KB Output is correct
181 Correct 206 ms 192664 KB Output is correct
182 Correct 217 ms 192760 KB Output is correct
183 Correct 195 ms 191864 KB Output is correct
184 Correct 209 ms 191936 KB Output is correct
185 Correct 200 ms 192628 KB Output is correct
186 Correct 216 ms 192636 KB Output is correct
187 Correct 211 ms 192024 KB Output is correct
188 Correct 219 ms 191992 KB Output is correct
189 Correct 207 ms 192656 KB Output is correct
190 Correct 217 ms 192628 KB Output is correct
191 Correct 188 ms 192624 KB Output is correct
192 Correct 187 ms 192624 KB Output is correct
193 Correct 371 ms 202920 KB Output is correct
194 Correct 378 ms 205792 KB Output is correct
195 Correct 603 ms 222124 KB Output is correct
196 Correct 639 ms 222036 KB Output is correct
197 Correct 820 ms 228840 KB Output is correct
198 Correct 799 ms 228852 KB Output is correct
199 Correct 1058 ms 207172 KB Output is correct
200 Correct 746 ms 200004 KB Output is correct
201 Correct 721 ms 199500 KB Output is correct
202 Correct 940 ms 208452 KB Output is correct
203 Correct 785 ms 200008 KB Output is correct
204 Correct 711 ms 199476 KB Output is correct
205 Correct 1012 ms 208828 KB Output is correct
206 Correct 748 ms 199976 KB Output is correct
207 Correct 726 ms 199432 KB Output is correct
208 Correct 897 ms 213712 KB Output is correct
209 Correct 830 ms 213876 KB Output is correct
210 Correct 886 ms 213976 KB Output is correct
211 Correct 863 ms 213984 KB Output is correct
212 Correct 860 ms 213856 KB Output is correct
213 Correct 1319 ms 226044 KB Output is correct
214 Correct 1440 ms 227156 KB Output is correct
215 Correct 1443 ms 227452 KB Output is correct
216 Correct 1194 ms 227656 KB Output is correct
217 Correct 1301 ms 226136 KB Output is correct
218 Correct 1285 ms 227308 KB Output is correct
219 Correct 1297 ms 227268 KB Output is correct
220 Correct 1237 ms 227592 KB Output is correct
221 Correct 1404 ms 224488 KB Output is correct
222 Correct 1311 ms 225236 KB Output is correct
223 Correct 1405 ms 225492 KB Output is correct
224 Correct 1326 ms 225456 KB Output is correct
225 Correct 1324 ms 222924 KB Output is correct
226 Correct 1407 ms 222844 KB Output is correct
227 Correct 1404 ms 222996 KB Output is correct
228 Correct 1401 ms 222892 KB Output is correct
229 Correct 1439 ms 224876 KB Output is correct
230 Correct 1436 ms 225480 KB Output is correct
231 Correct 1291 ms 225800 KB Output is correct
232 Correct 1240 ms 225612 KB Output is correct
233 Correct 1286 ms 224716 KB Output is correct
234 Correct 1300 ms 225356 KB Output is correct
235 Correct 1280 ms 225992 KB Output is correct
236 Correct 1225 ms 225748 KB Output is correct
237 Correct 1422 ms 223800 KB Output is correct
238 Correct 1367 ms 224332 KB Output is correct
239 Correct 1360 ms 224616 KB Output is correct
240 Correct 1375 ms 224496 KB Output is correct
241 Correct 1319 ms 222228 KB Output is correct
242 Correct 1352 ms 222148 KB Output is correct
243 Correct 1410 ms 222036 KB Output is correct
244 Correct 1413 ms 221808 KB Output is correct
245 Correct 1166 ms 224536 KB Output is correct
246 Correct 1164 ms 224460 KB Output is correct
247 Correct 1141 ms 224632 KB Output is correct
248 Correct 1122 ms 224348 KB Output is correct
249 Correct 1258 ms 225380 KB Output is correct
250 Correct 1376 ms 226500 KB Output is correct
251 Correct 1217 ms 227224 KB Output is correct
252 Correct 1218 ms 224556 KB Output is correct
253 Correct 1314 ms 226788 KB Output is correct
254 Correct 1353 ms 225468 KB Output is correct
255 Correct 1504 ms 224568 KB Output is correct
256 Correct 1265 ms 224504 KB Output is correct
257 Correct 1357 ms 227032 KB Output is correct
258 Correct 1411 ms 225824 KB Output is correct
259 Correct 1438 ms 224364 KB Output is correct
260 Correct 1208 ms 224452 KB Output is correct
261 Correct 987 ms 230492 KB Output is correct
262 Correct 1302 ms 230480 KB Output is correct
263 Correct 693 ms 217172 KB Output is correct
264 Correct 945 ms 217172 KB Output is correct
265 Correct 948 ms 230228 KB Output is correct
266 Correct 1220 ms 230280 KB Output is correct
267 Correct 691 ms 217172 KB Output is correct
268 Correct 976 ms 217176 KB Output is correct
269 Correct 700 ms 232276 KB Output is correct
270 Correct 709 ms 232136 KB Output is correct
271 Correct 954 ms 208948 KB Output is correct
272 Correct 798 ms 200904 KB Output is correct
273 Correct 1016 ms 210776 KB Output is correct
274 Correct 722 ms 201124 KB Output is correct
275 Correct 627 ms 201672 KB Output is correct