Submission #312634

# Submission time Handle Problem Language Result Execution time Memory
312634 2020-10-13T22:21:07 Z giorgikob Interval Collection (CCO20_day2problem2) C++14
25 / 25
3534 ms 284536 KB
#include<bits/stdc++.h>
#define ll long long
#define ff first
#define ss second
#define pb push_back
using namespace std;

const int N = 1e6+5;

struct bla{
    bla *left = NULL, *right = NULL;
    int answer = 1e9;
    int l = -1e9;
    int r = 1e9;
};


multiset<int>b[N],e[N],L,R;


inline void upd(bla* &node,int tl,int tr,int pos,bool ok){

    if(tl == tr){
        if(!ok){
            if(e[tl].size()){
                node->l = *e[tl].rbegin();
            } else {
                node->l = -1e9;
            }
        } else {
            if(b[tr].size()){
                node->r = *b[tr].begin();
            } else {
                node->r = 1e9;
            }
        }
        node->answer = node->r - node->l;
        return ;
    }

    int mid = tl + tr; mid >>= 1;

    if(node->left == NULL)node->left = new bla();
    if(node->right == NULL)node->right = new bla();

    if(pos <= mid){
        upd(node->left,tl,mid,pos,ok);
    } else {
        upd(node->right,mid+1,tr,pos,ok);
    }

    node->l = max(node->left->l,node->right->l);
    node->r = min(node->left->r,node->right->r);

    node->answer = node->right->r - node->left->l;
    node->answer = min(node->answer, min(node->left->answer, node->right->answer));
}

int main(){
    //ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);

    bla* root = new bla();

    int q;
    cin >> q;
    while(q--){
        char c;
        int l,r;
        //cin >> c >> l >> r;
        scanf("%c",&c);
        scanf("%c%d%d", &c, &l, &r);
        if(c == 'A'){
            b[l].insert(r);
            e[r].insert(l);
            L.insert(l);
            R.insert(r);
        } else {
            b[l].erase(b[l].find(r));
            e[r].erase(e[r].find(l));
            L.erase(L.find(l));
            R.erase(R.find(r));
        }


        upd(root,1,N-1,l,1);
        upd(root,1,N-1,r,0);

        int x = *L.rbegin();
        int y = *R.begin();
        if(x < y){
            printf("%d ", (*b[x].begin() - *e[y].rbegin()) );
        } else {
            //cout << "second : ";
            printf("%d ", root->answer );
        }
    }
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:70:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   70 |         scanf("%c",&c);
      |         ~~~~~^~~~~~~~~
Main.cpp:71:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   71 |         scanf("%c%d%d", &c, &l, &r);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 69 ms 94988 KB Output is correct
2 Correct 68 ms 94840 KB Output is correct
3 Correct 65 ms 94712 KB Output is correct
4 Correct 73 ms 94800 KB Output is correct
5 Correct 64 ms 95096 KB Output is correct
6 Correct 62 ms 94840 KB Output is correct
7 Correct 71 ms 94712 KB Output is correct
8 Correct 70 ms 94840 KB Output is correct
9 Correct 62 ms 95356 KB Output is correct
10 Correct 62 ms 95224 KB Output is correct
11 Correct 61 ms 95096 KB Output is correct
12 Correct 62 ms 95096 KB Output is correct
13 Correct 62 ms 95224 KB Output is correct
14 Correct 63 ms 95224 KB Output is correct
15 Correct 61 ms 95224 KB Output is correct
16 Correct 61 ms 95224 KB Output is correct
17 Correct 67 ms 94968 KB Output is correct
18 Correct 64 ms 94840 KB Output is correct
19 Correct 70 ms 94712 KB Output is correct
20 Correct 62 ms 94712 KB Output is correct
21 Correct 65 ms 94968 KB Output is correct
22 Correct 62 ms 94840 KB Output is correct
23 Correct 60 ms 94716 KB Output is correct
24 Correct 60 ms 94840 KB Output is correct
25 Correct 61 ms 95096 KB Output is correct
26 Correct 61 ms 95096 KB Output is correct
27 Correct 61 ms 95096 KB Output is correct
28 Correct 62 ms 95096 KB Output is correct
29 Correct 60 ms 95224 KB Output is correct
30 Correct 62 ms 95224 KB Output is correct
31 Correct 60 ms 95224 KB Output is correct
32 Correct 65 ms 95352 KB Output is correct
33 Correct 65 ms 94712 KB Output is correct
34 Correct 61 ms 94712 KB Output is correct
35 Correct 63 ms 94712 KB Output is correct
36 Correct 61 ms 94712 KB Output is correct
37 Correct 59 ms 94840 KB Output is correct
38 Correct 61 ms 94840 KB Output is correct
39 Correct 58 ms 94712 KB Output is correct
40 Correct 59 ms 94716 KB Output is correct
41 Correct 59 ms 94968 KB Output is correct
42 Correct 60 ms 94840 KB Output is correct
43 Correct 59 ms 94716 KB Output is correct
44 Correct 60 ms 94712 KB Output is correct
45 Correct 58 ms 94840 KB Output is correct
46 Correct 59 ms 94712 KB Output is correct
47 Correct 60 ms 94712 KB Output is correct
48 Correct 58 ms 94712 KB Output is correct
49 Correct 59 ms 94584 KB Output is correct
50 Correct 60 ms 94584 KB Output is correct
51 Correct 59 ms 94584 KB Output is correct
52 Correct 59 ms 94584 KB Output is correct
53 Correct 58 ms 94584 KB Output is correct
54 Correct 63 ms 94584 KB Output is correct
55 Correct 71 ms 94584 KB Output is correct
56 Correct 62 ms 94584 KB Output is correct
57 Correct 61 ms 94584 KB Output is correct
58 Correct 63 ms 94544 KB Output is correct
59 Correct 80 ms 94968 KB Output is correct
60 Correct 61 ms 94840 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 69 ms 94988 KB Output is correct
2 Correct 68 ms 94840 KB Output is correct
3 Correct 65 ms 94712 KB Output is correct
4 Correct 73 ms 94800 KB Output is correct
5 Correct 64 ms 95096 KB Output is correct
6 Correct 62 ms 94840 KB Output is correct
7 Correct 71 ms 94712 KB Output is correct
8 Correct 70 ms 94840 KB Output is correct
9 Correct 62 ms 95356 KB Output is correct
10 Correct 62 ms 95224 KB Output is correct
11 Correct 61 ms 95096 KB Output is correct
12 Correct 62 ms 95096 KB Output is correct
13 Correct 62 ms 95224 KB Output is correct
14 Correct 63 ms 95224 KB Output is correct
15 Correct 61 ms 95224 KB Output is correct
16 Correct 61 ms 95224 KB Output is correct
17 Correct 67 ms 94968 KB Output is correct
18 Correct 64 ms 94840 KB Output is correct
19 Correct 70 ms 94712 KB Output is correct
20 Correct 62 ms 94712 KB Output is correct
21 Correct 65 ms 94968 KB Output is correct
22 Correct 62 ms 94840 KB Output is correct
23 Correct 60 ms 94716 KB Output is correct
24 Correct 60 ms 94840 KB Output is correct
25 Correct 61 ms 95096 KB Output is correct
26 Correct 61 ms 95096 KB Output is correct
27 Correct 61 ms 95096 KB Output is correct
28 Correct 62 ms 95096 KB Output is correct
29 Correct 60 ms 95224 KB Output is correct
30 Correct 62 ms 95224 KB Output is correct
31 Correct 60 ms 95224 KB Output is correct
32 Correct 65 ms 95352 KB Output is correct
33 Correct 65 ms 94712 KB Output is correct
34 Correct 61 ms 94712 KB Output is correct
35 Correct 63 ms 94712 KB Output is correct
36 Correct 61 ms 94712 KB Output is correct
37 Correct 59 ms 94840 KB Output is correct
38 Correct 61 ms 94840 KB Output is correct
39 Correct 58 ms 94712 KB Output is correct
40 Correct 59 ms 94716 KB Output is correct
41 Correct 59 ms 94968 KB Output is correct
42 Correct 60 ms 94840 KB Output is correct
43 Correct 59 ms 94716 KB Output is correct
44 Correct 60 ms 94712 KB Output is correct
45 Correct 58 ms 94840 KB Output is correct
46 Correct 59 ms 94712 KB Output is correct
47 Correct 60 ms 94712 KB Output is correct
48 Correct 58 ms 94712 KB Output is correct
49 Correct 59 ms 94584 KB Output is correct
50 Correct 60 ms 94584 KB Output is correct
51 Correct 59 ms 94584 KB Output is correct
52 Correct 59 ms 94584 KB Output is correct
53 Correct 58 ms 94584 KB Output is correct
54 Correct 63 ms 94584 KB Output is correct
55 Correct 71 ms 94584 KB Output is correct
56 Correct 62 ms 94584 KB Output is correct
57 Correct 61 ms 94584 KB Output is correct
58 Correct 63 ms 94544 KB Output is correct
59 Correct 80 ms 94968 KB Output is correct
60 Correct 61 ms 94840 KB Output is correct
61 Correct 59 ms 94200 KB Output is correct
62 Correct 60 ms 94200 KB Output is correct
63 Correct 60 ms 94200 KB Output is correct
64 Correct 111 ms 105584 KB Output is correct
65 Correct 97 ms 102520 KB Output is correct
66 Correct 92 ms 101752 KB Output is correct
67 Correct 86 ms 101752 KB Output is correct
68 Correct 111 ms 105720 KB Output is correct
69 Correct 98 ms 102648 KB Output is correct
70 Correct 93 ms 101880 KB Output is correct
71 Correct 90 ms 101752 KB Output is correct
72 Correct 137 ms 107640 KB Output is correct
73 Correct 124 ms 106488 KB Output is correct
74 Correct 117 ms 106360 KB Output is correct
75 Correct 116 ms 106104 KB Output is correct
76 Correct 126 ms 108920 KB Output is correct
77 Correct 134 ms 109048 KB Output is correct
78 Correct 119 ms 109048 KB Output is correct
79 Correct 121 ms 108920 KB Output is correct
80 Correct 114 ms 105080 KB Output is correct
81 Correct 103 ms 102136 KB Output is correct
82 Correct 134 ms 101624 KB Output is correct
83 Correct 103 ms 101752 KB Output is correct
84 Correct 109 ms 105208 KB Output is correct
85 Correct 97 ms 102264 KB Output is correct
86 Correct 94 ms 101624 KB Output is correct
87 Correct 98 ms 101496 KB Output is correct
88 Correct 124 ms 107256 KB Output is correct
89 Correct 115 ms 106104 KB Output is correct
90 Correct 117 ms 105720 KB Output is correct
91 Correct 118 ms 105848 KB Output is correct
92 Correct 119 ms 108408 KB Output is correct
93 Correct 119 ms 108408 KB Output is correct
94 Correct 116 ms 108280 KB Output is correct
95 Correct 122 ms 108664 KB Output is correct
96 Correct 87 ms 101752 KB Output is correct
97 Correct 89 ms 101752 KB Output is correct
98 Correct 96 ms 101752 KB Output is correct
99 Correct 94 ms 101752 KB Output is correct
100 Correct 96 ms 101776 KB Output is correct
101 Correct 89 ms 101752 KB Output is correct
102 Correct 91 ms 101752 KB Output is correct
103 Correct 98 ms 101752 KB Output is correct
104 Correct 106 ms 104696 KB Output is correct
105 Correct 97 ms 102264 KB Output is correct
106 Correct 92 ms 101880 KB Output is correct
107 Correct 94 ms 101752 KB Output is correct
108 Correct 100 ms 102904 KB Output is correct
109 Correct 112 ms 102000 KB Output is correct
110 Correct 100 ms 101716 KB Output is correct
111 Correct 93 ms 101752 KB Output is correct
112 Correct 89 ms 100088 KB Output is correct
113 Correct 93 ms 100088 KB Output is correct
114 Correct 87 ms 100216 KB Output is correct
115 Correct 89 ms 100088 KB Output is correct
116 Correct 86 ms 100088 KB Output is correct
117 Correct 90 ms 100088 KB Output is correct
118 Correct 82 ms 100088 KB Output is correct
119 Correct 87 ms 100088 KB Output is correct
120 Correct 84 ms 100088 KB Output is correct
121 Correct 103 ms 100088 KB Output is correct
122 Correct 92 ms 105592 KB Output is correct
123 Correct 94 ms 105592 KB Output is correct
124 Correct 80 ms 95992 KB Output is correct
125 Correct 83 ms 94840 KB Output is correct
126 Correct 95 ms 94712 KB Output is correct
127 Correct 85 ms 96248 KB Output is correct
128 Correct 79 ms 94840 KB Output is correct
129 Correct 92 ms 94712 KB Output is correct
130 Correct 80 ms 96376 KB Output is correct
131 Correct 90 ms 94712 KB Output is correct
132 Correct 73 ms 94712 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 69 ms 94988 KB Output is correct
2 Correct 68 ms 94840 KB Output is correct
3 Correct 65 ms 94712 KB Output is correct
4 Correct 73 ms 94800 KB Output is correct
5 Correct 64 ms 95096 KB Output is correct
6 Correct 62 ms 94840 KB Output is correct
7 Correct 71 ms 94712 KB Output is correct
8 Correct 70 ms 94840 KB Output is correct
9 Correct 62 ms 95356 KB Output is correct
10 Correct 62 ms 95224 KB Output is correct
11 Correct 61 ms 95096 KB Output is correct
12 Correct 62 ms 95096 KB Output is correct
13 Correct 62 ms 95224 KB Output is correct
14 Correct 63 ms 95224 KB Output is correct
15 Correct 61 ms 95224 KB Output is correct
16 Correct 61 ms 95224 KB Output is correct
17 Correct 67 ms 94968 KB Output is correct
18 Correct 64 ms 94840 KB Output is correct
19 Correct 70 ms 94712 KB Output is correct
20 Correct 62 ms 94712 KB Output is correct
21 Correct 65 ms 94968 KB Output is correct
22 Correct 62 ms 94840 KB Output is correct
23 Correct 60 ms 94716 KB Output is correct
24 Correct 60 ms 94840 KB Output is correct
25 Correct 61 ms 95096 KB Output is correct
26 Correct 61 ms 95096 KB Output is correct
27 Correct 61 ms 95096 KB Output is correct
28 Correct 62 ms 95096 KB Output is correct
29 Correct 60 ms 95224 KB Output is correct
30 Correct 62 ms 95224 KB Output is correct
31 Correct 60 ms 95224 KB Output is correct
32 Correct 65 ms 95352 KB Output is correct
33 Correct 65 ms 94712 KB Output is correct
34 Correct 61 ms 94712 KB Output is correct
35 Correct 63 ms 94712 KB Output is correct
36 Correct 61 ms 94712 KB Output is correct
37 Correct 59 ms 94840 KB Output is correct
38 Correct 61 ms 94840 KB Output is correct
39 Correct 58 ms 94712 KB Output is correct
40 Correct 59 ms 94716 KB Output is correct
41 Correct 59 ms 94968 KB Output is correct
42 Correct 60 ms 94840 KB Output is correct
43 Correct 59 ms 94716 KB Output is correct
44 Correct 60 ms 94712 KB Output is correct
45 Correct 58 ms 94840 KB Output is correct
46 Correct 59 ms 94712 KB Output is correct
47 Correct 60 ms 94712 KB Output is correct
48 Correct 58 ms 94712 KB Output is correct
49 Correct 59 ms 94584 KB Output is correct
50 Correct 60 ms 94584 KB Output is correct
51 Correct 59 ms 94584 KB Output is correct
52 Correct 59 ms 94584 KB Output is correct
53 Correct 58 ms 94584 KB Output is correct
54 Correct 63 ms 94584 KB Output is correct
55 Correct 71 ms 94584 KB Output is correct
56 Correct 62 ms 94584 KB Output is correct
57 Correct 61 ms 94584 KB Output is correct
58 Correct 63 ms 94544 KB Output is correct
59 Correct 80 ms 94968 KB Output is correct
60 Correct 61 ms 94840 KB Output is correct
61 Correct 59 ms 94200 KB Output is correct
62 Correct 60 ms 94200 KB Output is correct
63 Correct 60 ms 94200 KB Output is correct
64 Correct 111 ms 105584 KB Output is correct
65 Correct 97 ms 102520 KB Output is correct
66 Correct 92 ms 101752 KB Output is correct
67 Correct 86 ms 101752 KB Output is correct
68 Correct 111 ms 105720 KB Output is correct
69 Correct 98 ms 102648 KB Output is correct
70 Correct 93 ms 101880 KB Output is correct
71 Correct 90 ms 101752 KB Output is correct
72 Correct 137 ms 107640 KB Output is correct
73 Correct 124 ms 106488 KB Output is correct
74 Correct 117 ms 106360 KB Output is correct
75 Correct 116 ms 106104 KB Output is correct
76 Correct 126 ms 108920 KB Output is correct
77 Correct 134 ms 109048 KB Output is correct
78 Correct 119 ms 109048 KB Output is correct
79 Correct 121 ms 108920 KB Output is correct
80 Correct 114 ms 105080 KB Output is correct
81 Correct 103 ms 102136 KB Output is correct
82 Correct 134 ms 101624 KB Output is correct
83 Correct 103 ms 101752 KB Output is correct
84 Correct 109 ms 105208 KB Output is correct
85 Correct 97 ms 102264 KB Output is correct
86 Correct 94 ms 101624 KB Output is correct
87 Correct 98 ms 101496 KB Output is correct
88 Correct 124 ms 107256 KB Output is correct
89 Correct 115 ms 106104 KB Output is correct
90 Correct 117 ms 105720 KB Output is correct
91 Correct 118 ms 105848 KB Output is correct
92 Correct 119 ms 108408 KB Output is correct
93 Correct 119 ms 108408 KB Output is correct
94 Correct 116 ms 108280 KB Output is correct
95 Correct 122 ms 108664 KB Output is correct
96 Correct 87 ms 101752 KB Output is correct
97 Correct 89 ms 101752 KB Output is correct
98 Correct 96 ms 101752 KB Output is correct
99 Correct 94 ms 101752 KB Output is correct
100 Correct 96 ms 101776 KB Output is correct
101 Correct 89 ms 101752 KB Output is correct
102 Correct 91 ms 101752 KB Output is correct
103 Correct 98 ms 101752 KB Output is correct
104 Correct 106 ms 104696 KB Output is correct
105 Correct 97 ms 102264 KB Output is correct
106 Correct 92 ms 101880 KB Output is correct
107 Correct 94 ms 101752 KB Output is correct
108 Correct 100 ms 102904 KB Output is correct
109 Correct 112 ms 102000 KB Output is correct
110 Correct 100 ms 101716 KB Output is correct
111 Correct 93 ms 101752 KB Output is correct
112 Correct 89 ms 100088 KB Output is correct
113 Correct 93 ms 100088 KB Output is correct
114 Correct 87 ms 100216 KB Output is correct
115 Correct 89 ms 100088 KB Output is correct
116 Correct 86 ms 100088 KB Output is correct
117 Correct 90 ms 100088 KB Output is correct
118 Correct 82 ms 100088 KB Output is correct
119 Correct 87 ms 100088 KB Output is correct
120 Correct 84 ms 100088 KB Output is correct
121 Correct 103 ms 100088 KB Output is correct
122 Correct 92 ms 105592 KB Output is correct
123 Correct 94 ms 105592 KB Output is correct
124 Correct 80 ms 95992 KB Output is correct
125 Correct 83 ms 94840 KB Output is correct
126 Correct 95 ms 94712 KB Output is correct
127 Correct 85 ms 96248 KB Output is correct
128 Correct 79 ms 94840 KB Output is correct
129 Correct 92 ms 94712 KB Output is correct
130 Correct 80 ms 96376 KB Output is correct
131 Correct 90 ms 94712 KB Output is correct
132 Correct 73 ms 94712 KB Output is correct
133 Correct 290 ms 126840 KB Output is correct
134 Correct 278 ms 118180 KB Output is correct
135 Correct 224 ms 116220 KB Output is correct
136 Correct 183 ms 115960 KB Output is correct
137 Correct 323 ms 127096 KB Output is correct
138 Correct 267 ms 118264 KB Output is correct
139 Correct 227 ms 116472 KB Output is correct
140 Correct 199 ms 115984 KB Output is correct
141 Correct 340 ms 133112 KB Output is correct
142 Correct 354 ms 129912 KB Output is correct
143 Correct 319 ms 129144 KB Output is correct
144 Correct 329 ms 128892 KB Output is correct
145 Correct 344 ms 137240 KB Output is correct
146 Correct 337 ms 137080 KB Output is correct
147 Correct 344 ms 137208 KB Output is correct
148 Correct 362 ms 137080 KB Output is correct
149 Correct 313 ms 125688 KB Output is correct
150 Correct 269 ms 116984 KB Output is correct
151 Correct 222 ms 115320 KB Output is correct
152 Correct 186 ms 115064 KB Output is correct
153 Correct 308 ms 125560 KB Output is correct
154 Correct 263 ms 117240 KB Output is correct
155 Correct 228 ms 115192 KB Output is correct
156 Correct 207 ms 114936 KB Output is correct
157 Correct 338 ms 131704 KB Output is correct
158 Correct 316 ms 128504 KB Output is correct
159 Correct 303 ms 127736 KB Output is correct
160 Correct 303 ms 127608 KB Output is correct
161 Correct 340 ms 135416 KB Output is correct
162 Correct 356 ms 135400 KB Output is correct
163 Correct 349 ms 135356 KB Output is correct
164 Correct 335 ms 135420 KB Output is correct
165 Correct 179 ms 115960 KB Output is correct
166 Correct 173 ms 115960 KB Output is correct
167 Correct 172 ms 115960 KB Output is correct
168 Correct 175 ms 115960 KB Output is correct
169 Correct 199 ms 115944 KB Output is correct
170 Correct 206 ms 116020 KB Output is correct
171 Correct 194 ms 115908 KB Output is correct
172 Correct 185 ms 115940 KB Output is correct
173 Correct 291 ms 124920 KB Output is correct
174 Correct 242 ms 117752 KB Output is correct
175 Correct 214 ms 116088 KB Output is correct
176 Correct 186 ms 116088 KB Output is correct
177 Correct 294 ms 120568 KB Output is correct
178 Correct 260 ms 116984 KB Output is correct
179 Correct 222 ms 116088 KB Output is correct
180 Correct 183 ms 116088 KB Output is correct
181 Correct 182 ms 115832 KB Output is correct
182 Correct 215 ms 115832 KB Output is correct
183 Correct 168 ms 116088 KB Output is correct
184 Correct 208 ms 116108 KB Output is correct
185 Correct 190 ms 115832 KB Output is correct
186 Correct 213 ms 115832 KB Output is correct
187 Correct 167 ms 116088 KB Output is correct
188 Correct 248 ms 116088 KB Output is correct
189 Correct 185 ms 115832 KB Output is correct
190 Correct 213 ms 115832 KB Output is correct
191 Correct 195 ms 131832 KB Output is correct
192 Correct 224 ms 131704 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 528 ms 199928 KB Output is correct
2 Correct 527 ms 199800 KB Output is correct
3 Correct 940 ms 246272 KB Output is correct
4 Correct 911 ms 246268 KB Output is correct
5 Correct 1119 ms 284536 KB Output is correct
6 Correct 1144 ms 283768 KB Output is correct
7 Correct 1408 ms 107588 KB Output is correct
8 Correct 868 ms 98296 KB Output is correct
9 Correct 846 ms 97716 KB Output is correct
10 Correct 1583 ms 113332 KB Output is correct
11 Correct 948 ms 98300 KB Output is correct
12 Correct 831 ms 97656 KB Output is correct
13 Correct 1547 ms 115832 KB Output is correct
14 Correct 850 ms 98424 KB Output is correct
15 Correct 811 ms 97784 KB Output is correct
16 Correct 876 ms 144248 KB Output is correct
17 Correct 869 ms 144120 KB Output is correct
18 Correct 889 ms 144376 KB Output is correct
19 Correct 881 ms 144984 KB Output is correct
20 Correct 877 ms 144376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 69 ms 94988 KB Output is correct
2 Correct 68 ms 94840 KB Output is correct
3 Correct 65 ms 94712 KB Output is correct
4 Correct 73 ms 94800 KB Output is correct
5 Correct 64 ms 95096 KB Output is correct
6 Correct 62 ms 94840 KB Output is correct
7 Correct 71 ms 94712 KB Output is correct
8 Correct 70 ms 94840 KB Output is correct
9 Correct 62 ms 95356 KB Output is correct
10 Correct 62 ms 95224 KB Output is correct
11 Correct 61 ms 95096 KB Output is correct
12 Correct 62 ms 95096 KB Output is correct
13 Correct 62 ms 95224 KB Output is correct
14 Correct 63 ms 95224 KB Output is correct
15 Correct 61 ms 95224 KB Output is correct
16 Correct 61 ms 95224 KB Output is correct
17 Correct 67 ms 94968 KB Output is correct
18 Correct 64 ms 94840 KB Output is correct
19 Correct 70 ms 94712 KB Output is correct
20 Correct 62 ms 94712 KB Output is correct
21 Correct 65 ms 94968 KB Output is correct
22 Correct 62 ms 94840 KB Output is correct
23 Correct 60 ms 94716 KB Output is correct
24 Correct 60 ms 94840 KB Output is correct
25 Correct 61 ms 95096 KB Output is correct
26 Correct 61 ms 95096 KB Output is correct
27 Correct 61 ms 95096 KB Output is correct
28 Correct 62 ms 95096 KB Output is correct
29 Correct 60 ms 95224 KB Output is correct
30 Correct 62 ms 95224 KB Output is correct
31 Correct 60 ms 95224 KB Output is correct
32 Correct 65 ms 95352 KB Output is correct
33 Correct 65 ms 94712 KB Output is correct
34 Correct 61 ms 94712 KB Output is correct
35 Correct 63 ms 94712 KB Output is correct
36 Correct 61 ms 94712 KB Output is correct
37 Correct 59 ms 94840 KB Output is correct
38 Correct 61 ms 94840 KB Output is correct
39 Correct 58 ms 94712 KB Output is correct
40 Correct 59 ms 94716 KB Output is correct
41 Correct 59 ms 94968 KB Output is correct
42 Correct 60 ms 94840 KB Output is correct
43 Correct 59 ms 94716 KB Output is correct
44 Correct 60 ms 94712 KB Output is correct
45 Correct 58 ms 94840 KB Output is correct
46 Correct 59 ms 94712 KB Output is correct
47 Correct 60 ms 94712 KB Output is correct
48 Correct 58 ms 94712 KB Output is correct
49 Correct 59 ms 94584 KB Output is correct
50 Correct 60 ms 94584 KB Output is correct
51 Correct 59 ms 94584 KB Output is correct
52 Correct 59 ms 94584 KB Output is correct
53 Correct 58 ms 94584 KB Output is correct
54 Correct 63 ms 94584 KB Output is correct
55 Correct 71 ms 94584 KB Output is correct
56 Correct 62 ms 94584 KB Output is correct
57 Correct 61 ms 94584 KB Output is correct
58 Correct 63 ms 94544 KB Output is correct
59 Correct 80 ms 94968 KB Output is correct
60 Correct 61 ms 94840 KB Output is correct
61 Correct 59 ms 94200 KB Output is correct
62 Correct 60 ms 94200 KB Output is correct
63 Correct 60 ms 94200 KB Output is correct
64 Correct 111 ms 105584 KB Output is correct
65 Correct 97 ms 102520 KB Output is correct
66 Correct 92 ms 101752 KB Output is correct
67 Correct 86 ms 101752 KB Output is correct
68 Correct 111 ms 105720 KB Output is correct
69 Correct 98 ms 102648 KB Output is correct
70 Correct 93 ms 101880 KB Output is correct
71 Correct 90 ms 101752 KB Output is correct
72 Correct 137 ms 107640 KB Output is correct
73 Correct 124 ms 106488 KB Output is correct
74 Correct 117 ms 106360 KB Output is correct
75 Correct 116 ms 106104 KB Output is correct
76 Correct 126 ms 108920 KB Output is correct
77 Correct 134 ms 109048 KB Output is correct
78 Correct 119 ms 109048 KB Output is correct
79 Correct 121 ms 108920 KB Output is correct
80 Correct 114 ms 105080 KB Output is correct
81 Correct 103 ms 102136 KB Output is correct
82 Correct 134 ms 101624 KB Output is correct
83 Correct 103 ms 101752 KB Output is correct
84 Correct 109 ms 105208 KB Output is correct
85 Correct 97 ms 102264 KB Output is correct
86 Correct 94 ms 101624 KB Output is correct
87 Correct 98 ms 101496 KB Output is correct
88 Correct 124 ms 107256 KB Output is correct
89 Correct 115 ms 106104 KB Output is correct
90 Correct 117 ms 105720 KB Output is correct
91 Correct 118 ms 105848 KB Output is correct
92 Correct 119 ms 108408 KB Output is correct
93 Correct 119 ms 108408 KB Output is correct
94 Correct 116 ms 108280 KB Output is correct
95 Correct 122 ms 108664 KB Output is correct
96 Correct 87 ms 101752 KB Output is correct
97 Correct 89 ms 101752 KB Output is correct
98 Correct 96 ms 101752 KB Output is correct
99 Correct 94 ms 101752 KB Output is correct
100 Correct 96 ms 101776 KB Output is correct
101 Correct 89 ms 101752 KB Output is correct
102 Correct 91 ms 101752 KB Output is correct
103 Correct 98 ms 101752 KB Output is correct
104 Correct 106 ms 104696 KB Output is correct
105 Correct 97 ms 102264 KB Output is correct
106 Correct 92 ms 101880 KB Output is correct
107 Correct 94 ms 101752 KB Output is correct
108 Correct 100 ms 102904 KB Output is correct
109 Correct 112 ms 102000 KB Output is correct
110 Correct 100 ms 101716 KB Output is correct
111 Correct 93 ms 101752 KB Output is correct
112 Correct 89 ms 100088 KB Output is correct
113 Correct 93 ms 100088 KB Output is correct
114 Correct 87 ms 100216 KB Output is correct
115 Correct 89 ms 100088 KB Output is correct
116 Correct 86 ms 100088 KB Output is correct
117 Correct 90 ms 100088 KB Output is correct
118 Correct 82 ms 100088 KB Output is correct
119 Correct 87 ms 100088 KB Output is correct
120 Correct 84 ms 100088 KB Output is correct
121 Correct 103 ms 100088 KB Output is correct
122 Correct 92 ms 105592 KB Output is correct
123 Correct 94 ms 105592 KB Output is correct
124 Correct 80 ms 95992 KB Output is correct
125 Correct 83 ms 94840 KB Output is correct
126 Correct 95 ms 94712 KB Output is correct
127 Correct 85 ms 96248 KB Output is correct
128 Correct 79 ms 94840 KB Output is correct
129 Correct 92 ms 94712 KB Output is correct
130 Correct 80 ms 96376 KB Output is correct
131 Correct 90 ms 94712 KB Output is correct
132 Correct 73 ms 94712 KB Output is correct
133 Correct 290 ms 126840 KB Output is correct
134 Correct 278 ms 118180 KB Output is correct
135 Correct 224 ms 116220 KB Output is correct
136 Correct 183 ms 115960 KB Output is correct
137 Correct 323 ms 127096 KB Output is correct
138 Correct 267 ms 118264 KB Output is correct
139 Correct 227 ms 116472 KB Output is correct
140 Correct 199 ms 115984 KB Output is correct
141 Correct 340 ms 133112 KB Output is correct
142 Correct 354 ms 129912 KB Output is correct
143 Correct 319 ms 129144 KB Output is correct
144 Correct 329 ms 128892 KB Output is correct
145 Correct 344 ms 137240 KB Output is correct
146 Correct 337 ms 137080 KB Output is correct
147 Correct 344 ms 137208 KB Output is correct
148 Correct 362 ms 137080 KB Output is correct
149 Correct 313 ms 125688 KB Output is correct
150 Correct 269 ms 116984 KB Output is correct
151 Correct 222 ms 115320 KB Output is correct
152 Correct 186 ms 115064 KB Output is correct
153 Correct 308 ms 125560 KB Output is correct
154 Correct 263 ms 117240 KB Output is correct
155 Correct 228 ms 115192 KB Output is correct
156 Correct 207 ms 114936 KB Output is correct
157 Correct 338 ms 131704 KB Output is correct
158 Correct 316 ms 128504 KB Output is correct
159 Correct 303 ms 127736 KB Output is correct
160 Correct 303 ms 127608 KB Output is correct
161 Correct 340 ms 135416 KB Output is correct
162 Correct 356 ms 135400 KB Output is correct
163 Correct 349 ms 135356 KB Output is correct
164 Correct 335 ms 135420 KB Output is correct
165 Correct 179 ms 115960 KB Output is correct
166 Correct 173 ms 115960 KB Output is correct
167 Correct 172 ms 115960 KB Output is correct
168 Correct 175 ms 115960 KB Output is correct
169 Correct 199 ms 115944 KB Output is correct
170 Correct 206 ms 116020 KB Output is correct
171 Correct 194 ms 115908 KB Output is correct
172 Correct 185 ms 115940 KB Output is correct
173 Correct 291 ms 124920 KB Output is correct
174 Correct 242 ms 117752 KB Output is correct
175 Correct 214 ms 116088 KB Output is correct
176 Correct 186 ms 116088 KB Output is correct
177 Correct 294 ms 120568 KB Output is correct
178 Correct 260 ms 116984 KB Output is correct
179 Correct 222 ms 116088 KB Output is correct
180 Correct 183 ms 116088 KB Output is correct
181 Correct 182 ms 115832 KB Output is correct
182 Correct 215 ms 115832 KB Output is correct
183 Correct 168 ms 116088 KB Output is correct
184 Correct 208 ms 116108 KB Output is correct
185 Correct 190 ms 115832 KB Output is correct
186 Correct 213 ms 115832 KB Output is correct
187 Correct 167 ms 116088 KB Output is correct
188 Correct 248 ms 116088 KB Output is correct
189 Correct 185 ms 115832 KB Output is correct
190 Correct 213 ms 115832 KB Output is correct
191 Correct 195 ms 131832 KB Output is correct
192 Correct 224 ms 131704 KB Output is correct
193 Correct 528 ms 199928 KB Output is correct
194 Correct 527 ms 199800 KB Output is correct
195 Correct 940 ms 246272 KB Output is correct
196 Correct 911 ms 246268 KB Output is correct
197 Correct 1119 ms 284536 KB Output is correct
198 Correct 1144 ms 283768 KB Output is correct
199 Correct 1408 ms 107588 KB Output is correct
200 Correct 868 ms 98296 KB Output is correct
201 Correct 846 ms 97716 KB Output is correct
202 Correct 1583 ms 113332 KB Output is correct
203 Correct 948 ms 98300 KB Output is correct
204 Correct 831 ms 97656 KB Output is correct
205 Correct 1547 ms 115832 KB Output is correct
206 Correct 850 ms 98424 KB Output is correct
207 Correct 811 ms 97784 KB Output is correct
208 Correct 876 ms 144248 KB Output is correct
209 Correct 869 ms 144120 KB Output is correct
210 Correct 889 ms 144376 KB Output is correct
211 Correct 881 ms 144984 KB Output is correct
212 Correct 877 ms 144376 KB Output is correct
213 Correct 3239 ms 224428 KB Output is correct
214 Correct 2835 ms 180600 KB Output is correct
215 Correct 2231 ms 170792 KB Output is correct
216 Correct 1340 ms 169976 KB Output is correct
217 Correct 3210 ms 224632 KB Output is correct
218 Correct 2846 ms 180600 KB Output is correct
219 Correct 2290 ms 170812 KB Output is correct
220 Correct 1532 ms 169720 KB Output is correct
221 Correct 3324 ms 256148 KB Output is correct
222 Correct 3286 ms 239476 KB Output is correct
223 Correct 3251 ms 235740 KB Output is correct
224 Correct 3277 ms 235312 KB Output is correct
225 Correct 3391 ms 276600 KB Output is correct
226 Correct 3376 ms 276604 KB Output is correct
227 Correct 3419 ms 276476 KB Output is correct
228 Correct 3534 ms 276592 KB Output is correct
229 Correct 3171 ms 221804 KB Output is correct
230 Correct 2794 ms 177300 KB Output is correct
231 Correct 2167 ms 167656 KB Output is correct
232 Correct 1303 ms 166816 KB Output is correct
233 Correct 3210 ms 221912 KB Output is correct
234 Correct 2834 ms 177636 KB Output is correct
235 Correct 2292 ms 167812 KB Output is correct
236 Correct 1557 ms 166584 KB Output is correct
237 Correct 3313 ms 253816 KB Output is correct
238 Correct 3252 ms 237036 KB Output is correct
239 Correct 3226 ms 233208 KB Output is correct
240 Correct 3271 ms 232792 KB Output is correct
241 Correct 3407 ms 274168 KB Output is correct
242 Correct 3374 ms 274032 KB Output is correct
243 Correct 3388 ms 274040 KB Output is correct
244 Correct 3377 ms 274040 KB Output is correct
245 Correct 1160 ms 169720 KB Output is correct
246 Correct 1155 ms 169720 KB Output is correct
247 Correct 1174 ms 169848 KB Output is correct
248 Correct 1155 ms 169736 KB Output is correct
249 Correct 1478 ms 169580 KB Output is correct
250 Correct 1651 ms 169480 KB Output is correct
251 Correct 1691 ms 169464 KB Output is correct
252 Correct 1330 ms 169812 KB Output is correct
253 Correct 3227 ms 221756 KB Output is correct
254 Correct 2683 ms 179704 KB Output is correct
255 Correct 2080 ms 169800 KB Output is correct
256 Correct 1341 ms 169780 KB Output is correct
257 Correct 2936 ms 215416 KB Output is correct
258 Correct 2624 ms 178268 KB Output is correct
259 Correct 2141 ms 170492 KB Output is correct
260 Correct 1344 ms 169720 KB Output is correct
261 Correct 1522 ms 234272 KB Output is correct
262 Correct 2269 ms 234488 KB Output is correct
263 Correct 937 ms 231536 KB Output is correct
264 Correct 1609 ms 231544 KB Output is correct
265 Correct 1503 ms 234360 KB Output is correct
266 Correct 2222 ms 234364 KB Output is correct
267 Correct 941 ms 231544 KB Output is correct
268 Correct 1636 ms 231596 KB Output is correct
269 Correct 1127 ms 283292 KB Output is correct
270 Correct 1131 ms 283420 KB Output is correct
271 Correct 1430 ms 107984 KB Output is correct
272 Correct 876 ms 97784 KB Output is correct
273 Correct 1536 ms 115448 KB Output is correct
274 Correct 855 ms 97912 KB Output is correct
275 Correct 821 ms 144892 KB Output is correct