Submission #311816

# Submission time Handle Problem Language Result Execution time Memory
311816 2020-10-11T19:54:31 Z lukameladze Interval Collection (CCO20_day2problem2) C++14
25 / 25
4239 ms 286512 KB
# include <bits/stdc++.h>
using namespace std;
# define mnri first.second
#define mxle  first.first
pair <pair <long long, long long> , long long>  tree[4000035];
long long  x,l,r,le1,ri1,ans,q,mnr,mxl,mx=1000005;
char ch;
multiset<long long>::iterator it;
multiset< long long> le,ri,ms1[1000005],ms2[1000005];
void update(long long node, long long le, long long ri, long long idx, long long val, int ty)
{
    
    if (le>idx || ri<idx) return;
    if (le==ri)
    {
        if (ty==0)
        {
            tree[node].mnri=val;
        }
        else tree[node].mxle=val;
        tree[node].second=tree[node].mnri-tree[node].mxle;
        return;
    }
    long long mid=(le+ri)/2;
    update(2*node,le,mid,idx,val, ty);
    update(2*node+1, mid+1, ri, idx, val, ty);
    tree[node].mnri=min(tree[2*node].mnri, tree[2*node+1].mnri);
    tree[node].mxle=max(tree[2*node].mxle, tree[2*node+1].mxle);
    x=min(tree[2*node].second, tree[2*node+1].second);
    tree[node].second=min(x,tree[2*node+1].mnri-tree[2*node].mxle);
}
int main()
{
    std::ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    cin>>q;
    for (long long i=1; i<=4000020; i++)
    {
        tree[i].mnri=1000000000;
        tree[i].mxle=-1000000000;
        tree[i].second=2000000000;
    }
    while (q--)
    {
        cin>>ch>>l>>r;
        if (ch=='R')
        {
            le.erase(le.find(l));
            ri.erase(ri.find(r));
            ms1[l].erase(ms1[l].find(r));
            ms2[r].erase(ms2[r].find(l));
            if (!ms1[l].size()) ms1[l].insert(1e9);
            if (!ms2[r].size()) ms2[r].insert(-1e9);
            mnr=*ms1[l].begin();
            update(1,1,mx,l,mnr,0);
            
                it=ms2[r].end();
                it--;
            mxl=*it;
            update(1,1,mx,r,mxl,1);
        }
        else
        {
            ms1[l].insert(r);
            ms2[r].insert(l);
            le.insert(l);
            ri.insert(r);
            mnr=*ms1[l].begin();
            it=ms2[r].end();
            it--;
            mxl=*it;
            update(1,1,mx,l,mnr,0);
            update(1,1,mx,r,mxl,1);
        }
       it=le.end();
       it--;
        mxl=*it;
        mnr=*(ri.begin());
        if (mnr<=mxl)
        {
            cout<<tree[1].second<<endl;
        }
        else
        {
            ri1=*(ms1[mxl].begin());
            it=ms2[mnr].end();
            it--;
            le1=*it;
            cout<<ri1-le1<<endl;
        }
    }
}
# Verdict Execution time Memory Grader output
1 Correct 125 ms 188280 KB Output is correct
2 Correct 118 ms 188196 KB Output is correct
3 Correct 118 ms 188280 KB Output is correct
4 Correct 119 ms 188280 KB Output is correct
5 Correct 119 ms 188280 KB Output is correct
6 Correct 120 ms 188408 KB Output is correct
7 Correct 118 ms 188280 KB Output is correct
8 Correct 118 ms 188280 KB Output is correct
9 Correct 118 ms 188280 KB Output is correct
10 Correct 119 ms 188208 KB Output is correct
11 Correct 122 ms 188280 KB Output is correct
12 Correct 120 ms 188280 KB Output is correct
13 Correct 118 ms 188280 KB Output is correct
14 Correct 120 ms 188280 KB Output is correct
15 Correct 119 ms 188280 KB Output is correct
16 Correct 120 ms 188280 KB Output is correct
17 Correct 119 ms 188284 KB Output is correct
18 Correct 118 ms 188280 KB Output is correct
19 Correct 119 ms 188280 KB Output is correct
20 Correct 117 ms 188280 KB Output is correct
21 Correct 121 ms 188216 KB Output is correct
22 Correct 120 ms 188280 KB Output is correct
23 Correct 118 ms 188204 KB Output is correct
24 Correct 120 ms 188280 KB Output is correct
25 Correct 118 ms 188280 KB Output is correct
26 Correct 122 ms 188284 KB Output is correct
27 Correct 118 ms 188280 KB Output is correct
28 Correct 119 ms 188280 KB Output is correct
29 Correct 118 ms 188280 KB Output is correct
30 Correct 120 ms 188360 KB Output is correct
31 Correct 120 ms 188384 KB Output is correct
32 Correct 123 ms 188280 KB Output is correct
33 Correct 118 ms 188280 KB Output is correct
34 Correct 121 ms 188276 KB Output is correct
35 Correct 119 ms 188344 KB Output is correct
36 Correct 119 ms 188280 KB Output is correct
37 Correct 118 ms 188280 KB Output is correct
38 Correct 118 ms 188256 KB Output is correct
39 Correct 117 ms 188316 KB Output is correct
40 Correct 119 ms 188280 KB Output is correct
41 Correct 118 ms 188280 KB Output is correct
42 Correct 118 ms 188280 KB Output is correct
43 Correct 119 ms 188188 KB Output is correct
44 Correct 119 ms 188280 KB Output is correct
45 Correct 119 ms 188280 KB Output is correct
46 Correct 118 ms 188280 KB Output is correct
47 Correct 122 ms 188280 KB Output is correct
48 Correct 119 ms 188280 KB Output is correct
49 Correct 119 ms 188280 KB Output is correct
50 Correct 119 ms 188280 KB Output is correct
51 Correct 118 ms 188280 KB Output is correct
52 Correct 119 ms 188280 KB Output is correct
53 Correct 117 ms 188232 KB Output is correct
54 Correct 118 ms 188284 KB Output is correct
55 Correct 118 ms 188328 KB Output is correct
56 Correct 119 ms 188280 KB Output is correct
57 Correct 117 ms 188280 KB Output is correct
58 Correct 120 ms 188280 KB Output is correct
59 Correct 119 ms 188280 KB Output is correct
60 Correct 119 ms 188280 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 125 ms 188280 KB Output is correct
2 Correct 118 ms 188196 KB Output is correct
3 Correct 118 ms 188280 KB Output is correct
4 Correct 119 ms 188280 KB Output is correct
5 Correct 119 ms 188280 KB Output is correct
6 Correct 120 ms 188408 KB Output is correct
7 Correct 118 ms 188280 KB Output is correct
8 Correct 118 ms 188280 KB Output is correct
9 Correct 118 ms 188280 KB Output is correct
10 Correct 119 ms 188208 KB Output is correct
11 Correct 122 ms 188280 KB Output is correct
12 Correct 120 ms 188280 KB Output is correct
13 Correct 118 ms 188280 KB Output is correct
14 Correct 120 ms 188280 KB Output is correct
15 Correct 119 ms 188280 KB Output is correct
16 Correct 120 ms 188280 KB Output is correct
17 Correct 119 ms 188284 KB Output is correct
18 Correct 118 ms 188280 KB Output is correct
19 Correct 119 ms 188280 KB Output is correct
20 Correct 117 ms 188280 KB Output is correct
21 Correct 121 ms 188216 KB Output is correct
22 Correct 120 ms 188280 KB Output is correct
23 Correct 118 ms 188204 KB Output is correct
24 Correct 120 ms 188280 KB Output is correct
25 Correct 118 ms 188280 KB Output is correct
26 Correct 122 ms 188284 KB Output is correct
27 Correct 118 ms 188280 KB Output is correct
28 Correct 119 ms 188280 KB Output is correct
29 Correct 118 ms 188280 KB Output is correct
30 Correct 120 ms 188360 KB Output is correct
31 Correct 120 ms 188384 KB Output is correct
32 Correct 123 ms 188280 KB Output is correct
33 Correct 118 ms 188280 KB Output is correct
34 Correct 121 ms 188276 KB Output is correct
35 Correct 119 ms 188344 KB Output is correct
36 Correct 119 ms 188280 KB Output is correct
37 Correct 118 ms 188280 KB Output is correct
38 Correct 118 ms 188256 KB Output is correct
39 Correct 117 ms 188316 KB Output is correct
40 Correct 119 ms 188280 KB Output is correct
41 Correct 118 ms 188280 KB Output is correct
42 Correct 118 ms 188280 KB Output is correct
43 Correct 119 ms 188188 KB Output is correct
44 Correct 119 ms 188280 KB Output is correct
45 Correct 119 ms 188280 KB Output is correct
46 Correct 118 ms 188280 KB Output is correct
47 Correct 122 ms 188280 KB Output is correct
48 Correct 119 ms 188280 KB Output is correct
49 Correct 119 ms 188280 KB Output is correct
50 Correct 119 ms 188280 KB Output is correct
51 Correct 118 ms 188280 KB Output is correct
52 Correct 119 ms 188280 KB Output is correct
53 Correct 117 ms 188232 KB Output is correct
54 Correct 118 ms 188284 KB Output is correct
55 Correct 118 ms 188328 KB Output is correct
56 Correct 119 ms 188280 KB Output is correct
57 Correct 117 ms 188280 KB Output is correct
58 Correct 120 ms 188280 KB Output is correct
59 Correct 119 ms 188280 KB Output is correct
60 Correct 119 ms 188280 KB Output is correct
61 Correct 116 ms 188152 KB Output is correct
62 Correct 116 ms 188152 KB Output is correct
63 Correct 115 ms 188152 KB Output is correct
64 Correct 182 ms 189816 KB Output is correct
65 Correct 178 ms 189228 KB Output is correct
66 Correct 173 ms 189084 KB Output is correct
67 Correct 168 ms 189048 KB Output is correct
68 Correct 182 ms 189816 KB Output is correct
69 Correct 180 ms 189304 KB Output is correct
70 Correct 174 ms 189048 KB Output is correct
71 Correct 169 ms 189176 KB Output is correct
72 Correct 185 ms 190328 KB Output is correct
73 Correct 183 ms 190072 KB Output is correct
74 Correct 184 ms 190072 KB Output is correct
75 Correct 183 ms 189944 KB Output is correct
76 Correct 186 ms 190712 KB Output is correct
77 Correct 188 ms 190716 KB Output is correct
78 Correct 186 ms 190712 KB Output is correct
79 Correct 187 ms 190716 KB Output is correct
80 Correct 181 ms 189816 KB Output is correct
81 Correct 177 ms 189176 KB Output is correct
82 Correct 175 ms 188988 KB Output is correct
83 Correct 167 ms 189148 KB Output is correct
84 Correct 182 ms 189916 KB Output is correct
85 Correct 179 ms 189180 KB Output is correct
86 Correct 176 ms 189176 KB Output is correct
87 Correct 172 ms 189048 KB Output is correct
88 Correct 183 ms 190328 KB Output is correct
89 Correct 182 ms 190200 KB Output is correct
90 Correct 180 ms 190072 KB Output is correct
91 Correct 183 ms 189944 KB Output is correct
92 Correct 193 ms 190712 KB Output is correct
93 Correct 185 ms 190712 KB Output is correct
94 Correct 184 ms 190712 KB Output is correct
95 Correct 183 ms 190724 KB Output is correct
96 Correct 167 ms 189048 KB Output is correct
97 Correct 165 ms 189048 KB Output is correct
98 Correct 166 ms 189048 KB Output is correct
99 Correct 168 ms 189052 KB Output is correct
100 Correct 171 ms 189048 KB Output is correct
101 Correct 170 ms 189048 KB Output is correct
102 Correct 174 ms 189048 KB Output is correct
103 Correct 168 ms 189048 KB Output is correct
104 Correct 182 ms 189816 KB Output is correct
105 Correct 179 ms 189304 KB Output is correct
106 Correct 171 ms 189048 KB Output is correct
107 Correct 169 ms 189048 KB Output is correct
108 Correct 182 ms 189556 KB Output is correct
109 Correct 177 ms 189176 KB Output is correct
110 Correct 174 ms 188976 KB Output is correct
111 Correct 169 ms 189048 KB Output is correct
112 Correct 167 ms 189816 KB Output is correct
113 Correct 170 ms 189816 KB Output is correct
114 Correct 166 ms 189816 KB Output is correct
115 Correct 165 ms 189688 KB Output is correct
116 Correct 168 ms 189828 KB Output is correct
117 Correct 172 ms 189948 KB Output is correct
118 Correct 164 ms 189688 KB Output is correct
119 Correct 165 ms 189688 KB Output is correct
120 Correct 165 ms 189816 KB Output is correct
121 Correct 167 ms 189816 KB Output is correct
122 Correct 170 ms 190628 KB Output is correct
123 Correct 168 ms 190712 KB Output is correct
124 Correct 163 ms 189048 KB Output is correct
125 Correct 163 ms 188664 KB Output is correct
126 Correct 164 ms 188536 KB Output is correct
127 Correct 168 ms 189332 KB Output is correct
128 Correct 164 ms 188664 KB Output is correct
129 Correct 162 ms 188536 KB Output is correct
130 Correct 181 ms 189308 KB Output is correct
131 Correct 162 ms 188716 KB Output is correct
132 Correct 159 ms 188536 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 125 ms 188280 KB Output is correct
2 Correct 118 ms 188196 KB Output is correct
3 Correct 118 ms 188280 KB Output is correct
4 Correct 119 ms 188280 KB Output is correct
5 Correct 119 ms 188280 KB Output is correct
6 Correct 120 ms 188408 KB Output is correct
7 Correct 118 ms 188280 KB Output is correct
8 Correct 118 ms 188280 KB Output is correct
9 Correct 118 ms 188280 KB Output is correct
10 Correct 119 ms 188208 KB Output is correct
11 Correct 122 ms 188280 KB Output is correct
12 Correct 120 ms 188280 KB Output is correct
13 Correct 118 ms 188280 KB Output is correct
14 Correct 120 ms 188280 KB Output is correct
15 Correct 119 ms 188280 KB Output is correct
16 Correct 120 ms 188280 KB Output is correct
17 Correct 119 ms 188284 KB Output is correct
18 Correct 118 ms 188280 KB Output is correct
19 Correct 119 ms 188280 KB Output is correct
20 Correct 117 ms 188280 KB Output is correct
21 Correct 121 ms 188216 KB Output is correct
22 Correct 120 ms 188280 KB Output is correct
23 Correct 118 ms 188204 KB Output is correct
24 Correct 120 ms 188280 KB Output is correct
25 Correct 118 ms 188280 KB Output is correct
26 Correct 122 ms 188284 KB Output is correct
27 Correct 118 ms 188280 KB Output is correct
28 Correct 119 ms 188280 KB Output is correct
29 Correct 118 ms 188280 KB Output is correct
30 Correct 120 ms 188360 KB Output is correct
31 Correct 120 ms 188384 KB Output is correct
32 Correct 123 ms 188280 KB Output is correct
33 Correct 118 ms 188280 KB Output is correct
34 Correct 121 ms 188276 KB Output is correct
35 Correct 119 ms 188344 KB Output is correct
36 Correct 119 ms 188280 KB Output is correct
37 Correct 118 ms 188280 KB Output is correct
38 Correct 118 ms 188256 KB Output is correct
39 Correct 117 ms 188316 KB Output is correct
40 Correct 119 ms 188280 KB Output is correct
41 Correct 118 ms 188280 KB Output is correct
42 Correct 118 ms 188280 KB Output is correct
43 Correct 119 ms 188188 KB Output is correct
44 Correct 119 ms 188280 KB Output is correct
45 Correct 119 ms 188280 KB Output is correct
46 Correct 118 ms 188280 KB Output is correct
47 Correct 122 ms 188280 KB Output is correct
48 Correct 119 ms 188280 KB Output is correct
49 Correct 119 ms 188280 KB Output is correct
50 Correct 119 ms 188280 KB Output is correct
51 Correct 118 ms 188280 KB Output is correct
52 Correct 119 ms 188280 KB Output is correct
53 Correct 117 ms 188232 KB Output is correct
54 Correct 118 ms 188284 KB Output is correct
55 Correct 118 ms 188328 KB Output is correct
56 Correct 119 ms 188280 KB Output is correct
57 Correct 117 ms 188280 KB Output is correct
58 Correct 120 ms 188280 KB Output is correct
59 Correct 119 ms 188280 KB Output is correct
60 Correct 119 ms 188280 KB Output is correct
61 Correct 116 ms 188152 KB Output is correct
62 Correct 116 ms 188152 KB Output is correct
63 Correct 115 ms 188152 KB Output is correct
64 Correct 182 ms 189816 KB Output is correct
65 Correct 178 ms 189228 KB Output is correct
66 Correct 173 ms 189084 KB Output is correct
67 Correct 168 ms 189048 KB Output is correct
68 Correct 182 ms 189816 KB Output is correct
69 Correct 180 ms 189304 KB Output is correct
70 Correct 174 ms 189048 KB Output is correct
71 Correct 169 ms 189176 KB Output is correct
72 Correct 185 ms 190328 KB Output is correct
73 Correct 183 ms 190072 KB Output is correct
74 Correct 184 ms 190072 KB Output is correct
75 Correct 183 ms 189944 KB Output is correct
76 Correct 186 ms 190712 KB Output is correct
77 Correct 188 ms 190716 KB Output is correct
78 Correct 186 ms 190712 KB Output is correct
79 Correct 187 ms 190716 KB Output is correct
80 Correct 181 ms 189816 KB Output is correct
81 Correct 177 ms 189176 KB Output is correct
82 Correct 175 ms 188988 KB Output is correct
83 Correct 167 ms 189148 KB Output is correct
84 Correct 182 ms 189916 KB Output is correct
85 Correct 179 ms 189180 KB Output is correct
86 Correct 176 ms 189176 KB Output is correct
87 Correct 172 ms 189048 KB Output is correct
88 Correct 183 ms 190328 KB Output is correct
89 Correct 182 ms 190200 KB Output is correct
90 Correct 180 ms 190072 KB Output is correct
91 Correct 183 ms 189944 KB Output is correct
92 Correct 193 ms 190712 KB Output is correct
93 Correct 185 ms 190712 KB Output is correct
94 Correct 184 ms 190712 KB Output is correct
95 Correct 183 ms 190724 KB Output is correct
96 Correct 167 ms 189048 KB Output is correct
97 Correct 165 ms 189048 KB Output is correct
98 Correct 166 ms 189048 KB Output is correct
99 Correct 168 ms 189052 KB Output is correct
100 Correct 171 ms 189048 KB Output is correct
101 Correct 170 ms 189048 KB Output is correct
102 Correct 174 ms 189048 KB Output is correct
103 Correct 168 ms 189048 KB Output is correct
104 Correct 182 ms 189816 KB Output is correct
105 Correct 179 ms 189304 KB Output is correct
106 Correct 171 ms 189048 KB Output is correct
107 Correct 169 ms 189048 KB Output is correct
108 Correct 182 ms 189556 KB Output is correct
109 Correct 177 ms 189176 KB Output is correct
110 Correct 174 ms 188976 KB Output is correct
111 Correct 169 ms 189048 KB Output is correct
112 Correct 167 ms 189816 KB Output is correct
113 Correct 170 ms 189816 KB Output is correct
114 Correct 166 ms 189816 KB Output is correct
115 Correct 165 ms 189688 KB Output is correct
116 Correct 168 ms 189828 KB Output is correct
117 Correct 172 ms 189948 KB Output is correct
118 Correct 164 ms 189688 KB Output is correct
119 Correct 165 ms 189688 KB Output is correct
120 Correct 165 ms 189816 KB Output is correct
121 Correct 167 ms 189816 KB Output is correct
122 Correct 170 ms 190628 KB Output is correct
123 Correct 168 ms 190712 KB Output is correct
124 Correct 163 ms 189048 KB Output is correct
125 Correct 163 ms 188664 KB Output is correct
126 Correct 164 ms 188536 KB Output is correct
127 Correct 168 ms 189332 KB Output is correct
128 Correct 164 ms 188664 KB Output is correct
129 Correct 162 ms 188536 KB Output is correct
130 Correct 181 ms 189308 KB Output is correct
131 Correct 162 ms 188716 KB Output is correct
132 Correct 159 ms 188536 KB Output is correct
133 Correct 431 ms 195448 KB Output is correct
134 Correct 399 ms 192248 KB Output is correct
135 Correct 368 ms 191864 KB Output is correct
136 Correct 327 ms 191608 KB Output is correct
137 Correct 430 ms 194984 KB Output is correct
138 Correct 391 ms 192376 KB Output is correct
139 Correct 371 ms 191692 KB Output is correct
140 Correct 352 ms 191736 KB Output is correct
141 Correct 431 ms 197240 KB Output is correct
142 Correct 431 ms 196088 KB Output is correct
143 Correct 425 ms 195832 KB Output is correct
144 Correct 431 ms 195880 KB Output is correct
145 Correct 445 ms 198648 KB Output is correct
146 Correct 451 ms 198648 KB Output is correct
147 Correct 447 ms 198648 KB Output is correct
148 Correct 448 ms 198732 KB Output is correct
149 Correct 426 ms 194936 KB Output is correct
150 Correct 391 ms 192248 KB Output is correct
151 Correct 371 ms 191608 KB Output is correct
152 Correct 336 ms 191480 KB Output is correct
153 Correct 428 ms 195064 KB Output is correct
154 Correct 395 ms 192248 KB Output is correct
155 Correct 372 ms 191608 KB Output is correct
156 Correct 342 ms 191480 KB Output is correct
157 Correct 446 ms 197112 KB Output is correct
158 Correct 429 ms 196088 KB Output is correct
159 Correct 437 ms 195704 KB Output is correct
160 Correct 429 ms 195728 KB Output is correct
161 Correct 459 ms 198776 KB Output is correct
162 Correct 443 ms 198620 KB Output is correct
163 Correct 450 ms 198648 KB Output is correct
164 Correct 443 ms 198648 KB Output is correct
165 Correct 328 ms 191608 KB Output is correct
166 Correct 327 ms 191608 KB Output is correct
167 Correct 329 ms 191608 KB Output is correct
168 Correct 323 ms 191608 KB Output is correct
169 Correct 347 ms 191608 KB Output is correct
170 Correct 342 ms 191608 KB Output is correct
171 Correct 339 ms 191736 KB Output is correct
172 Correct 333 ms 191632 KB Output is correct
173 Correct 421 ms 194940 KB Output is correct
174 Correct 378 ms 192120 KB Output is correct
175 Correct 364 ms 191612 KB Output is correct
176 Correct 329 ms 191736 KB Output is correct
177 Correct 421 ms 194040 KB Output is correct
178 Correct 389 ms 191992 KB Output is correct
179 Correct 369 ms 191736 KB Output is correct
180 Correct 332 ms 191652 KB Output is correct
181 Correct 342 ms 194936 KB Output is correct
182 Correct 366 ms 194936 KB Output is correct
183 Correct 320 ms 194552 KB Output is correct
184 Correct 346 ms 194552 KB Output is correct
185 Correct 340 ms 194936 KB Output is correct
186 Correct 361 ms 194916 KB Output is correct
187 Correct 322 ms 194680 KB Output is correct
188 Correct 342 ms 194616 KB Output is correct
189 Correct 337 ms 195064 KB Output is correct
190 Correct 360 ms 195064 KB Output is correct
191 Correct 335 ms 198472 KB Output is correct
192 Correct 337 ms 198520 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 959 ms 226424 KB Output is correct
2 Correct 964 ms 228472 KB Output is correct
3 Correct 1833 ms 266700 KB Output is correct
4 Correct 1841 ms 266616 KB Output is correct
5 Correct 2222 ms 285556 KB Output is correct
6 Correct 2266 ms 285608 KB Output is correct
7 Correct 2652 ms 201028 KB Output is correct
8 Correct 2156 ms 193948 KB Output is correct
9 Correct 2085 ms 193324 KB Output is correct
10 Correct 2818 ms 204792 KB Output is correct
11 Correct 2148 ms 194040 KB Output is correct
12 Correct 2086 ms 193224 KB Output is correct
13 Correct 2845 ms 206200 KB Output is correct
14 Correct 2177 ms 193912 KB Output is correct
15 Correct 2099 ms 193240 KB Output is correct
16 Correct 2037 ms 205176 KB Output is correct
17 Correct 2033 ms 205104 KB Output is correct
18 Correct 2021 ms 205304 KB Output is correct
19 Correct 2047 ms 205304 KB Output is correct
20 Correct 2036 ms 205176 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 125 ms 188280 KB Output is correct
2 Correct 118 ms 188196 KB Output is correct
3 Correct 118 ms 188280 KB Output is correct
4 Correct 119 ms 188280 KB Output is correct
5 Correct 119 ms 188280 KB Output is correct
6 Correct 120 ms 188408 KB Output is correct
7 Correct 118 ms 188280 KB Output is correct
8 Correct 118 ms 188280 KB Output is correct
9 Correct 118 ms 188280 KB Output is correct
10 Correct 119 ms 188208 KB Output is correct
11 Correct 122 ms 188280 KB Output is correct
12 Correct 120 ms 188280 KB Output is correct
13 Correct 118 ms 188280 KB Output is correct
14 Correct 120 ms 188280 KB Output is correct
15 Correct 119 ms 188280 KB Output is correct
16 Correct 120 ms 188280 KB Output is correct
17 Correct 119 ms 188284 KB Output is correct
18 Correct 118 ms 188280 KB Output is correct
19 Correct 119 ms 188280 KB Output is correct
20 Correct 117 ms 188280 KB Output is correct
21 Correct 121 ms 188216 KB Output is correct
22 Correct 120 ms 188280 KB Output is correct
23 Correct 118 ms 188204 KB Output is correct
24 Correct 120 ms 188280 KB Output is correct
25 Correct 118 ms 188280 KB Output is correct
26 Correct 122 ms 188284 KB Output is correct
27 Correct 118 ms 188280 KB Output is correct
28 Correct 119 ms 188280 KB Output is correct
29 Correct 118 ms 188280 KB Output is correct
30 Correct 120 ms 188360 KB Output is correct
31 Correct 120 ms 188384 KB Output is correct
32 Correct 123 ms 188280 KB Output is correct
33 Correct 118 ms 188280 KB Output is correct
34 Correct 121 ms 188276 KB Output is correct
35 Correct 119 ms 188344 KB Output is correct
36 Correct 119 ms 188280 KB Output is correct
37 Correct 118 ms 188280 KB Output is correct
38 Correct 118 ms 188256 KB Output is correct
39 Correct 117 ms 188316 KB Output is correct
40 Correct 119 ms 188280 KB Output is correct
41 Correct 118 ms 188280 KB Output is correct
42 Correct 118 ms 188280 KB Output is correct
43 Correct 119 ms 188188 KB Output is correct
44 Correct 119 ms 188280 KB Output is correct
45 Correct 119 ms 188280 KB Output is correct
46 Correct 118 ms 188280 KB Output is correct
47 Correct 122 ms 188280 KB Output is correct
48 Correct 119 ms 188280 KB Output is correct
49 Correct 119 ms 188280 KB Output is correct
50 Correct 119 ms 188280 KB Output is correct
51 Correct 118 ms 188280 KB Output is correct
52 Correct 119 ms 188280 KB Output is correct
53 Correct 117 ms 188232 KB Output is correct
54 Correct 118 ms 188284 KB Output is correct
55 Correct 118 ms 188328 KB Output is correct
56 Correct 119 ms 188280 KB Output is correct
57 Correct 117 ms 188280 KB Output is correct
58 Correct 120 ms 188280 KB Output is correct
59 Correct 119 ms 188280 KB Output is correct
60 Correct 119 ms 188280 KB Output is correct
61 Correct 116 ms 188152 KB Output is correct
62 Correct 116 ms 188152 KB Output is correct
63 Correct 115 ms 188152 KB Output is correct
64 Correct 182 ms 189816 KB Output is correct
65 Correct 178 ms 189228 KB Output is correct
66 Correct 173 ms 189084 KB Output is correct
67 Correct 168 ms 189048 KB Output is correct
68 Correct 182 ms 189816 KB Output is correct
69 Correct 180 ms 189304 KB Output is correct
70 Correct 174 ms 189048 KB Output is correct
71 Correct 169 ms 189176 KB Output is correct
72 Correct 185 ms 190328 KB Output is correct
73 Correct 183 ms 190072 KB Output is correct
74 Correct 184 ms 190072 KB Output is correct
75 Correct 183 ms 189944 KB Output is correct
76 Correct 186 ms 190712 KB Output is correct
77 Correct 188 ms 190716 KB Output is correct
78 Correct 186 ms 190712 KB Output is correct
79 Correct 187 ms 190716 KB Output is correct
80 Correct 181 ms 189816 KB Output is correct
81 Correct 177 ms 189176 KB Output is correct
82 Correct 175 ms 188988 KB Output is correct
83 Correct 167 ms 189148 KB Output is correct
84 Correct 182 ms 189916 KB Output is correct
85 Correct 179 ms 189180 KB Output is correct
86 Correct 176 ms 189176 KB Output is correct
87 Correct 172 ms 189048 KB Output is correct
88 Correct 183 ms 190328 KB Output is correct
89 Correct 182 ms 190200 KB Output is correct
90 Correct 180 ms 190072 KB Output is correct
91 Correct 183 ms 189944 KB Output is correct
92 Correct 193 ms 190712 KB Output is correct
93 Correct 185 ms 190712 KB Output is correct
94 Correct 184 ms 190712 KB Output is correct
95 Correct 183 ms 190724 KB Output is correct
96 Correct 167 ms 189048 KB Output is correct
97 Correct 165 ms 189048 KB Output is correct
98 Correct 166 ms 189048 KB Output is correct
99 Correct 168 ms 189052 KB Output is correct
100 Correct 171 ms 189048 KB Output is correct
101 Correct 170 ms 189048 KB Output is correct
102 Correct 174 ms 189048 KB Output is correct
103 Correct 168 ms 189048 KB Output is correct
104 Correct 182 ms 189816 KB Output is correct
105 Correct 179 ms 189304 KB Output is correct
106 Correct 171 ms 189048 KB Output is correct
107 Correct 169 ms 189048 KB Output is correct
108 Correct 182 ms 189556 KB Output is correct
109 Correct 177 ms 189176 KB Output is correct
110 Correct 174 ms 188976 KB Output is correct
111 Correct 169 ms 189048 KB Output is correct
112 Correct 167 ms 189816 KB Output is correct
113 Correct 170 ms 189816 KB Output is correct
114 Correct 166 ms 189816 KB Output is correct
115 Correct 165 ms 189688 KB Output is correct
116 Correct 168 ms 189828 KB Output is correct
117 Correct 172 ms 189948 KB Output is correct
118 Correct 164 ms 189688 KB Output is correct
119 Correct 165 ms 189688 KB Output is correct
120 Correct 165 ms 189816 KB Output is correct
121 Correct 167 ms 189816 KB Output is correct
122 Correct 170 ms 190628 KB Output is correct
123 Correct 168 ms 190712 KB Output is correct
124 Correct 163 ms 189048 KB Output is correct
125 Correct 163 ms 188664 KB Output is correct
126 Correct 164 ms 188536 KB Output is correct
127 Correct 168 ms 189332 KB Output is correct
128 Correct 164 ms 188664 KB Output is correct
129 Correct 162 ms 188536 KB Output is correct
130 Correct 181 ms 189308 KB Output is correct
131 Correct 162 ms 188716 KB Output is correct
132 Correct 159 ms 188536 KB Output is correct
133 Correct 431 ms 195448 KB Output is correct
134 Correct 399 ms 192248 KB Output is correct
135 Correct 368 ms 191864 KB Output is correct
136 Correct 327 ms 191608 KB Output is correct
137 Correct 430 ms 194984 KB Output is correct
138 Correct 391 ms 192376 KB Output is correct
139 Correct 371 ms 191692 KB Output is correct
140 Correct 352 ms 191736 KB Output is correct
141 Correct 431 ms 197240 KB Output is correct
142 Correct 431 ms 196088 KB Output is correct
143 Correct 425 ms 195832 KB Output is correct
144 Correct 431 ms 195880 KB Output is correct
145 Correct 445 ms 198648 KB Output is correct
146 Correct 451 ms 198648 KB Output is correct
147 Correct 447 ms 198648 KB Output is correct
148 Correct 448 ms 198732 KB Output is correct
149 Correct 426 ms 194936 KB Output is correct
150 Correct 391 ms 192248 KB Output is correct
151 Correct 371 ms 191608 KB Output is correct
152 Correct 336 ms 191480 KB Output is correct
153 Correct 428 ms 195064 KB Output is correct
154 Correct 395 ms 192248 KB Output is correct
155 Correct 372 ms 191608 KB Output is correct
156 Correct 342 ms 191480 KB Output is correct
157 Correct 446 ms 197112 KB Output is correct
158 Correct 429 ms 196088 KB Output is correct
159 Correct 437 ms 195704 KB Output is correct
160 Correct 429 ms 195728 KB Output is correct
161 Correct 459 ms 198776 KB Output is correct
162 Correct 443 ms 198620 KB Output is correct
163 Correct 450 ms 198648 KB Output is correct
164 Correct 443 ms 198648 KB Output is correct
165 Correct 328 ms 191608 KB Output is correct
166 Correct 327 ms 191608 KB Output is correct
167 Correct 329 ms 191608 KB Output is correct
168 Correct 323 ms 191608 KB Output is correct
169 Correct 347 ms 191608 KB Output is correct
170 Correct 342 ms 191608 KB Output is correct
171 Correct 339 ms 191736 KB Output is correct
172 Correct 333 ms 191632 KB Output is correct
173 Correct 421 ms 194940 KB Output is correct
174 Correct 378 ms 192120 KB Output is correct
175 Correct 364 ms 191612 KB Output is correct
176 Correct 329 ms 191736 KB Output is correct
177 Correct 421 ms 194040 KB Output is correct
178 Correct 389 ms 191992 KB Output is correct
179 Correct 369 ms 191736 KB Output is correct
180 Correct 332 ms 191652 KB Output is correct
181 Correct 342 ms 194936 KB Output is correct
182 Correct 366 ms 194936 KB Output is correct
183 Correct 320 ms 194552 KB Output is correct
184 Correct 346 ms 194552 KB Output is correct
185 Correct 340 ms 194936 KB Output is correct
186 Correct 361 ms 194916 KB Output is correct
187 Correct 322 ms 194680 KB Output is correct
188 Correct 342 ms 194616 KB Output is correct
189 Correct 337 ms 195064 KB Output is correct
190 Correct 360 ms 195064 KB Output is correct
191 Correct 335 ms 198472 KB Output is correct
192 Correct 337 ms 198520 KB Output is correct
193 Correct 959 ms 226424 KB Output is correct
194 Correct 964 ms 228472 KB Output is correct
195 Correct 1833 ms 266700 KB Output is correct
196 Correct 1841 ms 266616 KB Output is correct
197 Correct 2222 ms 285556 KB Output is correct
198 Correct 2266 ms 285608 KB Output is correct
199 Correct 2652 ms 201028 KB Output is correct
200 Correct 2156 ms 193948 KB Output is correct
201 Correct 2085 ms 193324 KB Output is correct
202 Correct 2818 ms 204792 KB Output is correct
203 Correct 2148 ms 194040 KB Output is correct
204 Correct 2086 ms 193224 KB Output is correct
205 Correct 2845 ms 206200 KB Output is correct
206 Correct 2177 ms 193912 KB Output is correct
207 Correct 2099 ms 193240 KB Output is correct
208 Correct 2037 ms 205176 KB Output is correct
209 Correct 2033 ms 205104 KB Output is correct
210 Correct 2021 ms 205304 KB Output is correct
211 Correct 2047 ms 205304 KB Output is correct
212 Correct 2036 ms 205176 KB Output is correct
213 Correct 4025 ms 247032 KB Output is correct
214 Correct 3673 ms 219512 KB Output is correct
215 Correct 2997 ms 213268 KB Output is correct
216 Correct 2395 ms 212736 KB Output is correct
217 Correct 3980 ms 247112 KB Output is correct
218 Correct 3717 ms 219280 KB Output is correct
219 Correct 3061 ms 212920 KB Output is correct
220 Correct 2503 ms 212816 KB Output is correct
221 Correct 4067 ms 270712 KB Output is correct
222 Correct 4049 ms 258892 KB Output is correct
223 Correct 4035 ms 256504 KB Output is correct
224 Correct 4025 ms 256004 KB Output is correct
225 Correct 4140 ms 286488 KB Output is correct
226 Correct 4121 ms 286512 KB Output is correct
227 Correct 4168 ms 286152 KB Output is correct
228 Correct 4206 ms 285816 KB Output is correct
229 Correct 4051 ms 245872 KB Output is correct
230 Correct 3682 ms 217304 KB Output is correct
231 Correct 2996 ms 211192 KB Output is correct
232 Correct 2378 ms 211032 KB Output is correct
233 Correct 4093 ms 245752 KB Output is correct
234 Correct 3684 ms 217208 KB Output is correct
235 Correct 3139 ms 211192 KB Output is correct
236 Correct 2514 ms 210424 KB Output is correct
237 Correct 4142 ms 269560 KB Output is correct
238 Correct 4091 ms 257760 KB Output is correct
239 Correct 4091 ms 255532 KB Output is correct
240 Correct 4075 ms 254712 KB Output is correct
241 Correct 4232 ms 285652 KB Output is correct
242 Correct 4233 ms 285572 KB Output is correct
243 Correct 4239 ms 285560 KB Output is correct
244 Correct 4214 ms 285436 KB Output is correct
245 Correct 2248 ms 212084 KB Output is correct
246 Correct 2246 ms 211960 KB Output is correct
247 Correct 2240 ms 211960 KB Output is correct
248 Correct 2247 ms 212344 KB Output is correct
249 Correct 2489 ms 211828 KB Output is correct
250 Correct 2516 ms 211828 KB Output is correct
251 Correct 2557 ms 211820 KB Output is correct
252 Correct 2350 ms 212076 KB Output is correct
253 Correct 4017 ms 244728 KB Output is correct
254 Correct 3545 ms 218232 KB Output is correct
255 Correct 2939 ms 212128 KB Output is correct
256 Correct 2350 ms 212064 KB Output is correct
257 Correct 3853 ms 239064 KB Output is correct
258 Correct 3509 ms 217592 KB Output is correct
259 Correct 3000 ms 212088 KB Output is correct
260 Correct 2376 ms 212028 KB Output is correct
261 Correct 2625 ms 247824 KB Output is correct
262 Correct 3158 ms 246264 KB Output is correct
263 Correct 2077 ms 238712 KB Output is correct
264 Correct 2584 ms 238972 KB Output is correct
265 Correct 2619 ms 246236 KB Output is correct
266 Correct 3165 ms 246132 KB Output is correct
267 Correct 2095 ms 238840 KB Output is correct
268 Correct 2625 ms 238668 KB Output is correct
269 Correct 2222 ms 283196 KB Output is correct
270 Correct 2278 ms 283308 KB Output is correct
271 Correct 2731 ms 199624 KB Output is correct
272 Correct 2151 ms 191652 KB Output is correct
273 Correct 2874 ms 203768 KB Output is correct
274 Correct 2163 ms 191656 KB Output is correct
275 Correct 2061 ms 238712 KB Output is correct