# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
752654 |
2023-06-03T11:24:42 Z |
이동현(#9968) |
Diversity (CEOI21_diversity) |
C++17 |
|
7000 ms |
14900 KB |
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#define int long long
#define mi(x, y) (x = min(x, y))
#define ma(x, y) (x = max(x, y))
using namespace std;
const int NS = (int)3e5 + 4, TS = 150014, QS = 50004;
int n, q;
int t1[TS], t2[TS], t3[TS], t4[TS];
int a[NS];
int stkn;
int fir[NS], ed[NS], cnt[NS], pos[NS], stk[NS];
int B, out[QS];
struct Data{
int l, r, id;
Data(){}
bool operator<(const Data&R)const{
return (l / B < R.l / B) || (l / B == R.l / B && r < R.r);
}
}que[QS];
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
memset(ed, -1, sizeof(ed));
int n, q;
cin >> n >> q;
for(int i = 1; i <= n; ++i){
cin >> a[i];
}
for(int i = 1; i <= q; ++i){
cin >> que[i].l >> que[i].r;
que[i].id = i;
}
B = 1300;
sort(que + 1, que + q + 1);
int l = 1, r = 0;
int ans = 0, szans = 0;
auto upd = [&](int p, int v, int osz){
--p;
//cout << p << ' ' << v << ' ' << osz << endl;
//cout << fir[2] << ' ' << fir[3] << endl;
szans += (osz + (v > 0 ? v : 0)) * v;
ans += (osz + (v > 0 ? v : 0)) * v;
if(p % 2){
int t1a = 0, t2a = 0, t3a = 0, t4a = 0;
int t1p = 0, t2p = 0;
for(int i = TS - 1; i > 0; i -= (i & -i)){
t1a += t1[i], t2a += t2[i], t3a += t3[i], t4a += t4[i];
}
for(int i = p / 2 + 1; i > 0; i -= (i & -i)){
t1p += t1[i], t2p += t2[i];
}
t1a -= osz, t1p -= osz, t2a -= osz * (p / 2), t2p -= osz * (p / 2);
szans += v * (t3a + t1a);
//cout << ans << ' ' << szans << ' ' << t3a << ' ' << t4a << endl;
ans += 2 * v * t3a + (p / 2) * v * t3a + t4a * v;
ans += v * t1a + ((p / 2) * v * t1p - t2p * v) - ((p / 2) * v * (t1a - t1p) - (t2a - t2p) * v);
for(int i = p / 2 + 1; i < TS; i += (i & -i)){
t1[i] += v;
t2[i] += v * (p / 2);
}
}
else{
int t1a = 0, t2a = 0, t3a = 0, t4a = 0;
int t3p = 0, t4p = 0;
for(int i = TS - 1; i > 0; i -= (i & -i)){
t1a += t1[i], t2a += t2[i], t3a += t3[i], t4a += t4[i];
}
for(int i = p / 2 + 1; i > 0; i -= (i & -i)){
t3p += t3[i], t4p += t4[i];
}
t3a -= osz, t3p -= osz, t4a -= osz * (p / 2), t4p -= osz * (p / 2);
//cout << "SDF" << ' ' << t1a << ' ' << t2a << ' ' << t3a << ' ' << t4a << ' ' << t3p << ' ' << t4p << endl;
szans += v * (t1a + t3a);
ans += 2 * v * t1a + (p / 2) * v * t1a + t2a * v;
ans += v * t3a + ((p / 2) * v * t3p - t4p * v) - ((p / 2) * v * (t3a - t3p) - (t4a - t4p) * v);
for(int i = p / 2 + 1; i < TS; i += (i & -i)){
t3[i] += v;
t4[i] += v * (p / 2);
}
}
//cout << ans << ' ' << szans << endl;
};
auto add = [&](int val){
if(!cnt[val]) pos[val] = ++stkn, stk[stkn] = val;
int ch1 = pos[val], osz = cnt[val];
if(cnt[val] && stk[fir[cnt[val]]] != val){
int nxt = stk[fir[cnt[val]]];
ch1 = pos[nxt];
swap(stk[pos[val]], stk[pos[nxt]]);
swap(pos[val], pos[nxt]);
}
++fir[cnt[val]];
++cnt[val];
if(fir[cnt[val]] > ed[cnt[val]]) fir[cnt[val]] = ed[cnt[val]] = pos[val];
else ++ed[cnt[val]];
upd(ch1, 1, osz);
};
auto del = [&](int val){
int ch1 = pos[val], osz = cnt[val];
if(cnt[val] && stk[ed[cnt[val]]] != val){
int nxt = stk[ed[cnt[val]]];
ch1 = pos[nxt];
swap(stk[pos[val]], stk[pos[nxt]]);
swap(pos[val], pos[nxt]);
}
--ed[cnt[val]];
--cnt[val];
if(fir[cnt[val]] > ed[cnt[val]]) fir[cnt[val]] = ed[cnt[val]] = pos[val];
else --fir[cnt[val]];
upd(ch1, -1, osz);
if(!cnt[val]) stk[stkn] = 0, --stkn, pos[val] = 0;
};
for(int i = 1; i <= q; ++i){
while(r < que[i].r){
++r;
add(a[r]);
}
while(l > que[i].l){
--l;
add(a[l]);
}
while(r > que[i].r){
del(a[r]);
--r;
}
while(l < que[i].l){
del(a[l]);
++l;
}
out[que[i].id] = ans - szans * stkn + stkn * (que[i].r - que[i].l + 1) * (que[i].r - que[i].l + 2) / 2;
}
for(int i = 1; i <= q; ++i){
cout << out[i] << '\n';
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
2772 KB |
Output is correct |
2 |
Correct |
2 ms |
2772 KB |
Output is correct |
3 |
Correct |
1 ms |
2772 KB |
Output is correct |
4 |
Correct |
1 ms |
2772 KB |
Output is correct |
5 |
Correct |
2 ms |
2772 KB |
Output is correct |
6 |
Correct |
1 ms |
2772 KB |
Output is correct |
7 |
Correct |
2 ms |
2772 KB |
Output is correct |
8 |
Correct |
2 ms |
2772 KB |
Output is correct |
9 |
Correct |
2 ms |
2772 KB |
Output is correct |
10 |
Correct |
1 ms |
2772 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
2772 KB |
Output is correct |
2 |
Correct |
1 ms |
2900 KB |
Output is correct |
3 |
Correct |
4 ms |
2900 KB |
Output is correct |
4 |
Correct |
22 ms |
3828 KB |
Output is correct |
5 |
Correct |
39 ms |
5028 KB |
Output is correct |
6 |
Correct |
61 ms |
5652 KB |
Output is correct |
7 |
Correct |
70 ms |
6376 KB |
Output is correct |
8 |
Correct |
71 ms |
5592 KB |
Output is correct |
9 |
Correct |
61 ms |
5564 KB |
Output is correct |
10 |
Correct |
64 ms |
5876 KB |
Output is correct |
11 |
Correct |
74 ms |
5668 KB |
Output is correct |
12 |
Correct |
61 ms |
5580 KB |
Output is correct |
13 |
Correct |
59 ms |
5480 KB |
Output is correct |
14 |
Correct |
60 ms |
5760 KB |
Output is correct |
15 |
Correct |
64 ms |
5660 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
2772 KB |
Output is correct |
2 |
Correct |
1 ms |
2900 KB |
Output is correct |
3 |
Correct |
4 ms |
2900 KB |
Output is correct |
4 |
Correct |
22 ms |
3828 KB |
Output is correct |
5 |
Correct |
39 ms |
5028 KB |
Output is correct |
6 |
Correct |
61 ms |
5652 KB |
Output is correct |
7 |
Correct |
70 ms |
6376 KB |
Output is correct |
8 |
Correct |
71 ms |
5592 KB |
Output is correct |
9 |
Correct |
61 ms |
5564 KB |
Output is correct |
10 |
Correct |
64 ms |
5876 KB |
Output is correct |
11 |
Correct |
74 ms |
5668 KB |
Output is correct |
12 |
Correct |
61 ms |
5580 KB |
Output is correct |
13 |
Correct |
59 ms |
5480 KB |
Output is correct |
14 |
Correct |
60 ms |
5760 KB |
Output is correct |
15 |
Correct |
64 ms |
5660 KB |
Output is correct |
16 |
Correct |
2 ms |
2772 KB |
Output is correct |
17 |
Correct |
2 ms |
2900 KB |
Output is correct |
18 |
Correct |
3 ms |
2900 KB |
Output is correct |
19 |
Correct |
23 ms |
3772 KB |
Output is correct |
20 |
Correct |
44 ms |
4580 KB |
Output is correct |
21 |
Correct |
65 ms |
5624 KB |
Output is correct |
22 |
Correct |
65 ms |
5452 KB |
Output is correct |
23 |
Correct |
62 ms |
5664 KB |
Output is correct |
24 |
Correct |
68 ms |
5396 KB |
Output is correct |
25 |
Correct |
61 ms |
5452 KB |
Output is correct |
26 |
Correct |
62 ms |
5416 KB |
Output is correct |
27 |
Correct |
63 ms |
5580 KB |
Output is correct |
28 |
Correct |
63 ms |
5816 KB |
Output is correct |
29 |
Correct |
62 ms |
5432 KB |
Output is correct |
30 |
Correct |
57 ms |
5452 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
2772 KB |
Output is correct |
2 |
Correct |
1 ms |
2900 KB |
Output is correct |
3 |
Correct |
4 ms |
2900 KB |
Output is correct |
4 |
Correct |
22 ms |
3828 KB |
Output is correct |
5 |
Correct |
39 ms |
5028 KB |
Output is correct |
6 |
Correct |
61 ms |
5652 KB |
Output is correct |
7 |
Correct |
70 ms |
6376 KB |
Output is correct |
8 |
Correct |
71 ms |
5592 KB |
Output is correct |
9 |
Correct |
61 ms |
5564 KB |
Output is correct |
10 |
Correct |
64 ms |
5876 KB |
Output is correct |
11 |
Correct |
74 ms |
5668 KB |
Output is correct |
12 |
Correct |
61 ms |
5580 KB |
Output is correct |
13 |
Correct |
59 ms |
5480 KB |
Output is correct |
14 |
Correct |
60 ms |
5760 KB |
Output is correct |
15 |
Correct |
64 ms |
5660 KB |
Output is correct |
16 |
Correct |
2 ms |
2772 KB |
Output is correct |
17 |
Correct |
2 ms |
2900 KB |
Output is correct |
18 |
Correct |
3 ms |
2900 KB |
Output is correct |
19 |
Correct |
23 ms |
3772 KB |
Output is correct |
20 |
Correct |
44 ms |
4580 KB |
Output is correct |
21 |
Correct |
65 ms |
5624 KB |
Output is correct |
22 |
Correct |
65 ms |
5452 KB |
Output is correct |
23 |
Correct |
62 ms |
5664 KB |
Output is correct |
24 |
Correct |
68 ms |
5396 KB |
Output is correct |
25 |
Correct |
61 ms |
5452 KB |
Output is correct |
26 |
Correct |
62 ms |
5416 KB |
Output is correct |
27 |
Correct |
63 ms |
5580 KB |
Output is correct |
28 |
Correct |
63 ms |
5816 KB |
Output is correct |
29 |
Correct |
62 ms |
5432 KB |
Output is correct |
30 |
Correct |
57 ms |
5452 KB |
Output is correct |
31 |
Correct |
1 ms |
2900 KB |
Output is correct |
32 |
Correct |
2 ms |
2900 KB |
Output is correct |
33 |
Correct |
1 ms |
2900 KB |
Output is correct |
34 |
Correct |
3 ms |
2900 KB |
Output is correct |
35 |
Correct |
3 ms |
2900 KB |
Output is correct |
36 |
Correct |
4 ms |
2988 KB |
Output is correct |
37 |
Correct |
11 ms |
3284 KB |
Output is correct |
38 |
Correct |
11 ms |
3284 KB |
Output is correct |
39 |
Correct |
28 ms |
3668 KB |
Output is correct |
40 |
Correct |
45 ms |
4476 KB |
Output is correct |
41 |
Correct |
58 ms |
5240 KB |
Output is correct |
42 |
Correct |
65 ms |
5176 KB |
Output is correct |
43 |
Correct |
67 ms |
5236 KB |
Output is correct |
44 |
Correct |
61 ms |
5256 KB |
Output is correct |
45 |
Correct |
60 ms |
5256 KB |
Output is correct |
46 |
Correct |
61 ms |
5252 KB |
Output is correct |
47 |
Correct |
67 ms |
5204 KB |
Output is correct |
48 |
Correct |
64 ms |
5240 KB |
Output is correct |
49 |
Correct |
59 ms |
5240 KB |
Output is correct |
50 |
Correct |
59 ms |
5204 KB |
Output is correct |
51 |
Correct |
61 ms |
5240 KB |
Output is correct |
52 |
Correct |
62 ms |
5196 KB |
Output is correct |
53 |
Correct |
65 ms |
5252 KB |
Output is correct |
54 |
Correct |
62 ms |
5232 KB |
Output is correct |
55 |
Correct |
64 ms |
5204 KB |
Output is correct |
56 |
Correct |
60 ms |
5248 KB |
Output is correct |
57 |
Correct |
63 ms |
5252 KB |
Output is correct |
58 |
Correct |
66 ms |
5228 KB |
Output is correct |
59 |
Correct |
64 ms |
5244 KB |
Output is correct |
60 |
Correct |
59 ms |
5248 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
2772 KB |
Output is correct |
2 |
Correct |
2 ms |
2772 KB |
Output is correct |
3 |
Correct |
1 ms |
2772 KB |
Output is correct |
4 |
Correct |
1 ms |
2772 KB |
Output is correct |
5 |
Correct |
2 ms |
2772 KB |
Output is correct |
6 |
Correct |
1 ms |
2772 KB |
Output is correct |
7 |
Correct |
2 ms |
2772 KB |
Output is correct |
8 |
Correct |
2 ms |
2772 KB |
Output is correct |
9 |
Correct |
2 ms |
2772 KB |
Output is correct |
10 |
Correct |
1 ms |
2772 KB |
Output is correct |
11 |
Correct |
2 ms |
2772 KB |
Output is correct |
12 |
Correct |
1 ms |
2900 KB |
Output is correct |
13 |
Correct |
4 ms |
2900 KB |
Output is correct |
14 |
Correct |
22 ms |
3828 KB |
Output is correct |
15 |
Correct |
39 ms |
5028 KB |
Output is correct |
16 |
Correct |
61 ms |
5652 KB |
Output is correct |
17 |
Correct |
70 ms |
6376 KB |
Output is correct |
18 |
Correct |
71 ms |
5592 KB |
Output is correct |
19 |
Correct |
61 ms |
5564 KB |
Output is correct |
20 |
Correct |
64 ms |
5876 KB |
Output is correct |
21 |
Correct |
74 ms |
5668 KB |
Output is correct |
22 |
Correct |
61 ms |
5580 KB |
Output is correct |
23 |
Correct |
59 ms |
5480 KB |
Output is correct |
24 |
Correct |
60 ms |
5760 KB |
Output is correct |
25 |
Correct |
64 ms |
5660 KB |
Output is correct |
26 |
Correct |
2 ms |
2772 KB |
Output is correct |
27 |
Correct |
2 ms |
2900 KB |
Output is correct |
28 |
Correct |
3 ms |
2900 KB |
Output is correct |
29 |
Correct |
23 ms |
3772 KB |
Output is correct |
30 |
Correct |
44 ms |
4580 KB |
Output is correct |
31 |
Correct |
65 ms |
5624 KB |
Output is correct |
32 |
Correct |
65 ms |
5452 KB |
Output is correct |
33 |
Correct |
62 ms |
5664 KB |
Output is correct |
34 |
Correct |
68 ms |
5396 KB |
Output is correct |
35 |
Correct |
61 ms |
5452 KB |
Output is correct |
36 |
Correct |
62 ms |
5416 KB |
Output is correct |
37 |
Correct |
63 ms |
5580 KB |
Output is correct |
38 |
Correct |
63 ms |
5816 KB |
Output is correct |
39 |
Correct |
62 ms |
5432 KB |
Output is correct |
40 |
Correct |
57 ms |
5452 KB |
Output is correct |
41 |
Correct |
1 ms |
2900 KB |
Output is correct |
42 |
Correct |
2 ms |
2900 KB |
Output is correct |
43 |
Correct |
1 ms |
2900 KB |
Output is correct |
44 |
Correct |
3 ms |
2900 KB |
Output is correct |
45 |
Correct |
3 ms |
2900 KB |
Output is correct |
46 |
Correct |
4 ms |
2988 KB |
Output is correct |
47 |
Correct |
11 ms |
3284 KB |
Output is correct |
48 |
Correct |
11 ms |
3284 KB |
Output is correct |
49 |
Correct |
28 ms |
3668 KB |
Output is correct |
50 |
Correct |
45 ms |
4476 KB |
Output is correct |
51 |
Correct |
58 ms |
5240 KB |
Output is correct |
52 |
Correct |
65 ms |
5176 KB |
Output is correct |
53 |
Correct |
67 ms |
5236 KB |
Output is correct |
54 |
Correct |
61 ms |
5256 KB |
Output is correct |
55 |
Correct |
60 ms |
5256 KB |
Output is correct |
56 |
Correct |
61 ms |
5252 KB |
Output is correct |
57 |
Correct |
67 ms |
5204 KB |
Output is correct |
58 |
Correct |
64 ms |
5240 KB |
Output is correct |
59 |
Correct |
59 ms |
5240 KB |
Output is correct |
60 |
Correct |
59 ms |
5204 KB |
Output is correct |
61 |
Correct |
61 ms |
5240 KB |
Output is correct |
62 |
Correct |
62 ms |
5196 KB |
Output is correct |
63 |
Correct |
65 ms |
5252 KB |
Output is correct |
64 |
Correct |
62 ms |
5232 KB |
Output is correct |
65 |
Correct |
64 ms |
5204 KB |
Output is correct |
66 |
Correct |
60 ms |
5248 KB |
Output is correct |
67 |
Correct |
63 ms |
5252 KB |
Output is correct |
68 |
Correct |
66 ms |
5228 KB |
Output is correct |
69 |
Correct |
64 ms |
5244 KB |
Output is correct |
70 |
Correct |
59 ms |
5248 KB |
Output is correct |
71 |
Correct |
11 ms |
3284 KB |
Output is correct |
72 |
Correct |
13 ms |
3284 KB |
Output is correct |
73 |
Correct |
11 ms |
3324 KB |
Output is correct |
74 |
Correct |
11 ms |
3316 KB |
Output is correct |
75 |
Correct |
11 ms |
3284 KB |
Output is correct |
76 |
Correct |
21 ms |
3756 KB |
Output is correct |
77 |
Correct |
23 ms |
3844 KB |
Output is correct |
78 |
Correct |
27 ms |
3796 KB |
Output is correct |
79 |
Correct |
20 ms |
3796 KB |
Output is correct |
80 |
Correct |
21 ms |
3796 KB |
Output is correct |
81 |
Correct |
49 ms |
4744 KB |
Output is correct |
82 |
Correct |
41 ms |
4788 KB |
Output is correct |
83 |
Correct |
43 ms |
4772 KB |
Output is correct |
84 |
Correct |
39 ms |
4692 KB |
Output is correct |
85 |
Correct |
40 ms |
4796 KB |
Output is correct |
86 |
Correct |
41 ms |
5092 KB |
Output is correct |
87 |
Correct |
43 ms |
5076 KB |
Output is correct |
88 |
Correct |
43 ms |
5164 KB |
Output is correct |
89 |
Correct |
41 ms |
5156 KB |
Output is correct |
90 |
Correct |
47 ms |
5224 KB |
Output is correct |
91 |
Correct |
63 ms |
8968 KB |
Output is correct |
92 |
Correct |
63 ms |
9016 KB |
Output is correct |
93 |
Correct |
72 ms |
8980 KB |
Output is correct |
94 |
Correct |
64 ms |
9068 KB |
Output is correct |
95 |
Correct |
63 ms |
9052 KB |
Output is correct |
96 |
Correct |
66 ms |
12876 KB |
Output is correct |
97 |
Correct |
77 ms |
12900 KB |
Output is correct |
98 |
Correct |
67 ms |
12856 KB |
Output is correct |
99 |
Correct |
75 ms |
13072 KB |
Output is correct |
100 |
Correct |
73 ms |
12876 KB |
Output is correct |
101 |
Correct |
75 ms |
12932 KB |
Output is correct |
102 |
Correct |
64 ms |
12864 KB |
Output is correct |
103 |
Correct |
79 ms |
12856 KB |
Output is correct |
104 |
Correct |
67 ms |
12924 KB |
Output is correct |
105 |
Correct |
64 ms |
12964 KB |
Output is correct |
106 |
Correct |
73 ms |
14796 KB |
Output is correct |
107 |
Correct |
68 ms |
14836 KB |
Output is correct |
108 |
Correct |
65 ms |
14880 KB |
Output is correct |
109 |
Correct |
64 ms |
14796 KB |
Output is correct |
110 |
Correct |
89 ms |
14852 KB |
Output is correct |
111 |
Correct |
66 ms |
14840 KB |
Output is correct |
112 |
Correct |
74 ms |
14900 KB |
Output is correct |
113 |
Correct |
82 ms |
14832 KB |
Output is correct |
114 |
Correct |
71 ms |
14792 KB |
Output is correct |
115 |
Correct |
105 ms |
14792 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
2772 KB |
Output is correct |
2 |
Correct |
2 ms |
2772 KB |
Output is correct |
3 |
Correct |
1 ms |
2772 KB |
Output is correct |
4 |
Correct |
1 ms |
2772 KB |
Output is correct |
5 |
Correct |
2 ms |
2772 KB |
Output is correct |
6 |
Correct |
1 ms |
2772 KB |
Output is correct |
7 |
Correct |
2 ms |
2772 KB |
Output is correct |
8 |
Correct |
2 ms |
2772 KB |
Output is correct |
9 |
Correct |
2 ms |
2772 KB |
Output is correct |
10 |
Correct |
1 ms |
2772 KB |
Output is correct |
11 |
Correct |
2 ms |
2772 KB |
Output is correct |
12 |
Correct |
1 ms |
2900 KB |
Output is correct |
13 |
Correct |
4 ms |
2900 KB |
Output is correct |
14 |
Correct |
22 ms |
3828 KB |
Output is correct |
15 |
Correct |
39 ms |
5028 KB |
Output is correct |
16 |
Correct |
61 ms |
5652 KB |
Output is correct |
17 |
Correct |
70 ms |
6376 KB |
Output is correct |
18 |
Correct |
71 ms |
5592 KB |
Output is correct |
19 |
Correct |
61 ms |
5564 KB |
Output is correct |
20 |
Correct |
64 ms |
5876 KB |
Output is correct |
21 |
Correct |
74 ms |
5668 KB |
Output is correct |
22 |
Correct |
61 ms |
5580 KB |
Output is correct |
23 |
Correct |
59 ms |
5480 KB |
Output is correct |
24 |
Correct |
60 ms |
5760 KB |
Output is correct |
25 |
Correct |
64 ms |
5660 KB |
Output is correct |
26 |
Correct |
2 ms |
2772 KB |
Output is correct |
27 |
Correct |
2 ms |
2900 KB |
Output is correct |
28 |
Correct |
3 ms |
2900 KB |
Output is correct |
29 |
Correct |
23 ms |
3772 KB |
Output is correct |
30 |
Correct |
44 ms |
4580 KB |
Output is correct |
31 |
Correct |
65 ms |
5624 KB |
Output is correct |
32 |
Correct |
65 ms |
5452 KB |
Output is correct |
33 |
Correct |
62 ms |
5664 KB |
Output is correct |
34 |
Correct |
68 ms |
5396 KB |
Output is correct |
35 |
Correct |
61 ms |
5452 KB |
Output is correct |
36 |
Correct |
62 ms |
5416 KB |
Output is correct |
37 |
Correct |
63 ms |
5580 KB |
Output is correct |
38 |
Correct |
63 ms |
5816 KB |
Output is correct |
39 |
Correct |
62 ms |
5432 KB |
Output is correct |
40 |
Correct |
57 ms |
5452 KB |
Output is correct |
41 |
Correct |
1 ms |
2900 KB |
Output is correct |
42 |
Correct |
2 ms |
2900 KB |
Output is correct |
43 |
Correct |
1 ms |
2900 KB |
Output is correct |
44 |
Correct |
3 ms |
2900 KB |
Output is correct |
45 |
Correct |
3 ms |
2900 KB |
Output is correct |
46 |
Correct |
4 ms |
2988 KB |
Output is correct |
47 |
Correct |
11 ms |
3284 KB |
Output is correct |
48 |
Correct |
11 ms |
3284 KB |
Output is correct |
49 |
Correct |
28 ms |
3668 KB |
Output is correct |
50 |
Correct |
45 ms |
4476 KB |
Output is correct |
51 |
Correct |
58 ms |
5240 KB |
Output is correct |
52 |
Correct |
65 ms |
5176 KB |
Output is correct |
53 |
Correct |
67 ms |
5236 KB |
Output is correct |
54 |
Correct |
61 ms |
5256 KB |
Output is correct |
55 |
Correct |
60 ms |
5256 KB |
Output is correct |
56 |
Correct |
61 ms |
5252 KB |
Output is correct |
57 |
Correct |
67 ms |
5204 KB |
Output is correct |
58 |
Correct |
64 ms |
5240 KB |
Output is correct |
59 |
Correct |
59 ms |
5240 KB |
Output is correct |
60 |
Correct |
59 ms |
5204 KB |
Output is correct |
61 |
Correct |
61 ms |
5240 KB |
Output is correct |
62 |
Correct |
62 ms |
5196 KB |
Output is correct |
63 |
Correct |
65 ms |
5252 KB |
Output is correct |
64 |
Correct |
62 ms |
5232 KB |
Output is correct |
65 |
Correct |
64 ms |
5204 KB |
Output is correct |
66 |
Correct |
60 ms |
5248 KB |
Output is correct |
67 |
Correct |
63 ms |
5252 KB |
Output is correct |
68 |
Correct |
66 ms |
5228 KB |
Output is correct |
69 |
Correct |
64 ms |
5244 KB |
Output is correct |
70 |
Correct |
59 ms |
5248 KB |
Output is correct |
71 |
Correct |
11 ms |
3284 KB |
Output is correct |
72 |
Correct |
13 ms |
3284 KB |
Output is correct |
73 |
Correct |
11 ms |
3324 KB |
Output is correct |
74 |
Correct |
11 ms |
3316 KB |
Output is correct |
75 |
Correct |
11 ms |
3284 KB |
Output is correct |
76 |
Correct |
21 ms |
3756 KB |
Output is correct |
77 |
Correct |
23 ms |
3844 KB |
Output is correct |
78 |
Correct |
27 ms |
3796 KB |
Output is correct |
79 |
Correct |
20 ms |
3796 KB |
Output is correct |
80 |
Correct |
21 ms |
3796 KB |
Output is correct |
81 |
Correct |
49 ms |
4744 KB |
Output is correct |
82 |
Correct |
41 ms |
4788 KB |
Output is correct |
83 |
Correct |
43 ms |
4772 KB |
Output is correct |
84 |
Correct |
39 ms |
4692 KB |
Output is correct |
85 |
Correct |
40 ms |
4796 KB |
Output is correct |
86 |
Correct |
41 ms |
5092 KB |
Output is correct |
87 |
Correct |
43 ms |
5076 KB |
Output is correct |
88 |
Correct |
43 ms |
5164 KB |
Output is correct |
89 |
Correct |
41 ms |
5156 KB |
Output is correct |
90 |
Correct |
47 ms |
5224 KB |
Output is correct |
91 |
Correct |
63 ms |
8968 KB |
Output is correct |
92 |
Correct |
63 ms |
9016 KB |
Output is correct |
93 |
Correct |
72 ms |
8980 KB |
Output is correct |
94 |
Correct |
64 ms |
9068 KB |
Output is correct |
95 |
Correct |
63 ms |
9052 KB |
Output is correct |
96 |
Correct |
66 ms |
12876 KB |
Output is correct |
97 |
Correct |
77 ms |
12900 KB |
Output is correct |
98 |
Correct |
67 ms |
12856 KB |
Output is correct |
99 |
Correct |
75 ms |
13072 KB |
Output is correct |
100 |
Correct |
73 ms |
12876 KB |
Output is correct |
101 |
Correct |
75 ms |
12932 KB |
Output is correct |
102 |
Correct |
64 ms |
12864 KB |
Output is correct |
103 |
Correct |
79 ms |
12856 KB |
Output is correct |
104 |
Correct |
67 ms |
12924 KB |
Output is correct |
105 |
Correct |
64 ms |
12964 KB |
Output is correct |
106 |
Correct |
73 ms |
14796 KB |
Output is correct |
107 |
Correct |
68 ms |
14836 KB |
Output is correct |
108 |
Correct |
65 ms |
14880 KB |
Output is correct |
109 |
Correct |
64 ms |
14796 KB |
Output is correct |
110 |
Correct |
89 ms |
14852 KB |
Output is correct |
111 |
Correct |
66 ms |
14840 KB |
Output is correct |
112 |
Correct |
74 ms |
14900 KB |
Output is correct |
113 |
Correct |
82 ms |
14832 KB |
Output is correct |
114 |
Correct |
71 ms |
14792 KB |
Output is correct |
115 |
Correct |
105 ms |
14792 KB |
Output is correct |
116 |
Correct |
3065 ms |
4904 KB |
Output is correct |
117 |
Correct |
3086 ms |
5412 KB |
Output is correct |
118 |
Correct |
3441 ms |
6068 KB |
Output is correct |
119 |
Correct |
3290 ms |
6104 KB |
Output is correct |
120 |
Correct |
3369 ms |
6112 KB |
Output is correct |
121 |
Correct |
4211 ms |
6716 KB |
Output is correct |
122 |
Correct |
4286 ms |
6784 KB |
Output is correct |
123 |
Execution timed out |
7020 ms |
7428 KB |
Time limit exceeded |
124 |
Halted |
0 ms |
0 KB |
- |