#include <bits/stdc++.h>
#define IO_OP std::ios::sync_with_stdio(0); std::cin.tie(0);
#define F first
#define S second
#define V vector
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define SZ(v) int((v).size())
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef V<int> vi;
string _reset = "\u001b[0m", _yellow = "\u001b[33m", _bold = "\u001b[1m";
void DBG() { cerr << "]" << _reset << endl; }
template<class H, class...T> void DBG(H h, T ...t) {
cerr << to_string(h);
if(sizeof ...(t)) cerr << ", ";
DBG(t...);
}
#ifdef CHEISSMART
#define debug(...) cerr << _yellow << _bold << "Line(" << __LINE__ << ") -> [" << #__VA_ARGS__ << "]: [", DBG(__VA_ARGS__)
#else
#define debug(...)
#endif
const int INF = 1e9 + 7, K = 500, N = 3e5 + 7;
namespace ds {
int cnt[N];
bool inhebe[N];
vi hebe;
void add(int x) {
if(x == 0) return;
cnt[x]++;
if(!inhebe[x]) {
inhebe[x] = true;
hebe.PB(x);
}
}
void del(int x) {
if(x == 0) return;
cnt[x]--;
}
ll qry() {
vi alive;
V<pi> aux;
for(int x:hebe) {
if(cnt[x] == 0) {
inhebe[x] = false;
} else {
alive.PB(x);
debug(x, cnt[x]);
aux.EB(x, cnt[x]);
}
}
hebe = alive;
sort(ALL(aux));
V<pi> even, odd;
bool f = 0;
for(auto[x, y]:aux) {
if(!f) {
even.EB(x, (y + 1) / 2);
if(y / 2) odd.EB(x, y / 2);
} else {
odd.EB(x, (y + 1) / 2);
if(y / 2) even.EB(x, y / 2);
}
f ^= y & 1;
}
reverse(ALL(odd));
even.insert(even.end(), ALL(odd));
ll ans = 0, ct = 0, sx = 0, ss = 0;
for(auto[x, y]:even) {
ans += 1LL * x * (x + 1) * y;
ll a = (x * (ct + 1) * sx - x * ss) * 2;
ll b = (x * sx + 1LL * x * x * (ct + 1)) * 2 - 1LL * x * x * (2 * ct - 1);
ll c = 1LL * x * x;
ans += a * y;
ans += b * y * (y - 1) / 2;
ans += c * (y - 1) * y * (2 * y - 1) / 6;
ss += x * (2 * ct + y - 1) * y / 2;
sx += x * y;
ct += y;
}
return ans / 2;
}
}
signed main()
{
IO_OP;
int n, q;
cin >> n >> q;
vi a(n);
for(int i = 0; i < n; i++)
cin >> a[i];
vi l(q), r(q);
for(int i = 0; i < q; i++) {
cin >> l[i] >> r[i];
l[i]--, r[i]--;
}
vi order(q); iota(ALL(order), 0);
sort(ALL(order), [&] (int i, int j) {
return MP(l[i] / K, r[i]) < MP(l[j] / K, r[j]);
});
V<ll> ans(q);
int cnt[N] = {};
auto add = [&] (int x) {
ds::del(cnt[x]);
cnt[x]++;
ds::add(cnt[x]);
};
auto del = [&] (int x) {
ds::del(cnt[x]);
cnt[x]--;
ds::add(cnt[x]);
};
int L = 0, R = 0;
add(a[0]);
for(int qi:order) {
while(R < r[qi]) add(a[++R]);
while(L > l[qi]) add(a[--L]);
while(R > r[qi]) del(a[R--]);
while(L < l[qi]) del(a[L++]);
ans[qi] = ds::qry();
}
for(int i = 0; i < q; i++)
cout << ans[i] << '\n';
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1624 KB |
Output is correct |
2 |
Correct |
1 ms |
1624 KB |
Output is correct |
3 |
Correct |
1 ms |
1628 KB |
Output is correct |
4 |
Correct |
1 ms |
1624 KB |
Output is correct |
5 |
Correct |
1 ms |
1628 KB |
Output is correct |
6 |
Correct |
1 ms |
1628 KB |
Output is correct |
7 |
Correct |
1 ms |
1628 KB |
Output is correct |
8 |
Correct |
1 ms |
1628 KB |
Output is correct |
9 |
Correct |
1 ms |
1628 KB |
Output is correct |
10 |
Correct |
1 ms |
1628 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1624 KB |
Output is correct |
2 |
Correct |
1 ms |
1628 KB |
Output is correct |
3 |
Correct |
2 ms |
1628 KB |
Output is correct |
4 |
Correct |
6 ms |
2400 KB |
Output is correct |
5 |
Correct |
10 ms |
3548 KB |
Output is correct |
6 |
Correct |
16 ms |
3804 KB |
Output is correct |
7 |
Correct |
16 ms |
5104 KB |
Output is correct |
8 |
Correct |
15 ms |
3808 KB |
Output is correct |
9 |
Correct |
15 ms |
3832 KB |
Output is correct |
10 |
Correct |
16 ms |
4312 KB |
Output is correct |
11 |
Correct |
16 ms |
4064 KB |
Output is correct |
12 |
Correct |
15 ms |
3824 KB |
Output is correct |
13 |
Correct |
14 ms |
3804 KB |
Output is correct |
14 |
Correct |
15 ms |
4060 KB |
Output is correct |
15 |
Correct |
15 ms |
4064 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1624 KB |
Output is correct |
2 |
Correct |
1 ms |
1628 KB |
Output is correct |
3 |
Correct |
2 ms |
1628 KB |
Output is correct |
4 |
Correct |
6 ms |
2400 KB |
Output is correct |
5 |
Correct |
10 ms |
3548 KB |
Output is correct |
6 |
Correct |
16 ms |
3804 KB |
Output is correct |
7 |
Correct |
16 ms |
5104 KB |
Output is correct |
8 |
Correct |
15 ms |
3808 KB |
Output is correct |
9 |
Correct |
15 ms |
3832 KB |
Output is correct |
10 |
Correct |
16 ms |
4312 KB |
Output is correct |
11 |
Correct |
16 ms |
4064 KB |
Output is correct |
12 |
Correct |
15 ms |
3824 KB |
Output is correct |
13 |
Correct |
14 ms |
3804 KB |
Output is correct |
14 |
Correct |
15 ms |
4060 KB |
Output is correct |
15 |
Correct |
15 ms |
4064 KB |
Output is correct |
16 |
Correct |
2 ms |
1628 KB |
Output is correct |
17 |
Correct |
1 ms |
1628 KB |
Output is correct |
18 |
Correct |
1 ms |
1628 KB |
Output is correct |
19 |
Correct |
6 ms |
2396 KB |
Output is correct |
20 |
Correct |
12 ms |
3296 KB |
Output is correct |
21 |
Correct |
20 ms |
4052 KB |
Output is correct |
22 |
Correct |
16 ms |
4060 KB |
Output is correct |
23 |
Correct |
15 ms |
4060 KB |
Output is correct |
24 |
Correct |
16 ms |
3932 KB |
Output is correct |
25 |
Correct |
16 ms |
4088 KB |
Output is correct |
26 |
Correct |
16 ms |
3816 KB |
Output is correct |
27 |
Correct |
16 ms |
4100 KB |
Output is correct |
28 |
Correct |
18 ms |
4060 KB |
Output is correct |
29 |
Correct |
16 ms |
3808 KB |
Output is correct |
30 |
Correct |
16 ms |
4052 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1624 KB |
Output is correct |
2 |
Correct |
1 ms |
1628 KB |
Output is correct |
3 |
Correct |
2 ms |
1628 KB |
Output is correct |
4 |
Correct |
6 ms |
2400 KB |
Output is correct |
5 |
Correct |
10 ms |
3548 KB |
Output is correct |
6 |
Correct |
16 ms |
3804 KB |
Output is correct |
7 |
Correct |
16 ms |
5104 KB |
Output is correct |
8 |
Correct |
15 ms |
3808 KB |
Output is correct |
9 |
Correct |
15 ms |
3832 KB |
Output is correct |
10 |
Correct |
16 ms |
4312 KB |
Output is correct |
11 |
Correct |
16 ms |
4064 KB |
Output is correct |
12 |
Correct |
15 ms |
3824 KB |
Output is correct |
13 |
Correct |
14 ms |
3804 KB |
Output is correct |
14 |
Correct |
15 ms |
4060 KB |
Output is correct |
15 |
Correct |
15 ms |
4064 KB |
Output is correct |
16 |
Correct |
2 ms |
1628 KB |
Output is correct |
17 |
Correct |
1 ms |
1628 KB |
Output is correct |
18 |
Correct |
1 ms |
1628 KB |
Output is correct |
19 |
Correct |
6 ms |
2396 KB |
Output is correct |
20 |
Correct |
12 ms |
3296 KB |
Output is correct |
21 |
Correct |
20 ms |
4052 KB |
Output is correct |
22 |
Correct |
16 ms |
4060 KB |
Output is correct |
23 |
Correct |
15 ms |
4060 KB |
Output is correct |
24 |
Correct |
16 ms |
3932 KB |
Output is correct |
25 |
Correct |
16 ms |
4088 KB |
Output is correct |
26 |
Correct |
16 ms |
3816 KB |
Output is correct |
27 |
Correct |
16 ms |
4100 KB |
Output is correct |
28 |
Correct |
18 ms |
4060 KB |
Output is correct |
29 |
Correct |
16 ms |
3808 KB |
Output is correct |
30 |
Correct |
16 ms |
4052 KB |
Output is correct |
31 |
Correct |
1 ms |
1628 KB |
Output is correct |
32 |
Correct |
1 ms |
1628 KB |
Output is correct |
33 |
Correct |
1 ms |
1628 KB |
Output is correct |
34 |
Correct |
2 ms |
1624 KB |
Output is correct |
35 |
Correct |
2 ms |
1628 KB |
Output is correct |
36 |
Correct |
1 ms |
1628 KB |
Output is correct |
37 |
Correct |
3 ms |
1904 KB |
Output is correct |
38 |
Correct |
3 ms |
1884 KB |
Output is correct |
39 |
Correct |
8 ms |
2648 KB |
Output is correct |
40 |
Correct |
11 ms |
2908 KB |
Output is correct |
41 |
Correct |
16 ms |
3580 KB |
Output is correct |
42 |
Correct |
16 ms |
3580 KB |
Output is correct |
43 |
Correct |
17 ms |
3416 KB |
Output is correct |
44 |
Correct |
16 ms |
3420 KB |
Output is correct |
45 |
Correct |
16 ms |
3416 KB |
Output is correct |
46 |
Correct |
16 ms |
3416 KB |
Output is correct |
47 |
Correct |
16 ms |
3420 KB |
Output is correct |
48 |
Correct |
16 ms |
3420 KB |
Output is correct |
49 |
Correct |
16 ms |
3576 KB |
Output is correct |
50 |
Correct |
16 ms |
3420 KB |
Output is correct |
51 |
Correct |
16 ms |
3420 KB |
Output is correct |
52 |
Correct |
16 ms |
3420 KB |
Output is correct |
53 |
Correct |
16 ms |
3584 KB |
Output is correct |
54 |
Correct |
16 ms |
3416 KB |
Output is correct |
55 |
Correct |
16 ms |
3416 KB |
Output is correct |
56 |
Correct |
16 ms |
3420 KB |
Output is correct |
57 |
Correct |
16 ms |
3416 KB |
Output is correct |
58 |
Correct |
17 ms |
3420 KB |
Output is correct |
59 |
Correct |
16 ms |
3560 KB |
Output is correct |
60 |
Correct |
16 ms |
3420 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1624 KB |
Output is correct |
2 |
Correct |
1 ms |
1624 KB |
Output is correct |
3 |
Correct |
1 ms |
1628 KB |
Output is correct |
4 |
Correct |
1 ms |
1624 KB |
Output is correct |
5 |
Correct |
1 ms |
1628 KB |
Output is correct |
6 |
Correct |
1 ms |
1628 KB |
Output is correct |
7 |
Correct |
1 ms |
1628 KB |
Output is correct |
8 |
Correct |
1 ms |
1628 KB |
Output is correct |
9 |
Correct |
1 ms |
1628 KB |
Output is correct |
10 |
Correct |
1 ms |
1628 KB |
Output is correct |
11 |
Correct |
1 ms |
1624 KB |
Output is correct |
12 |
Correct |
1 ms |
1628 KB |
Output is correct |
13 |
Correct |
2 ms |
1628 KB |
Output is correct |
14 |
Correct |
6 ms |
2400 KB |
Output is correct |
15 |
Correct |
10 ms |
3548 KB |
Output is correct |
16 |
Correct |
16 ms |
3804 KB |
Output is correct |
17 |
Correct |
16 ms |
5104 KB |
Output is correct |
18 |
Correct |
15 ms |
3808 KB |
Output is correct |
19 |
Correct |
15 ms |
3832 KB |
Output is correct |
20 |
Correct |
16 ms |
4312 KB |
Output is correct |
21 |
Correct |
16 ms |
4064 KB |
Output is correct |
22 |
Correct |
15 ms |
3824 KB |
Output is correct |
23 |
Correct |
14 ms |
3804 KB |
Output is correct |
24 |
Correct |
15 ms |
4060 KB |
Output is correct |
25 |
Correct |
15 ms |
4064 KB |
Output is correct |
26 |
Correct |
2 ms |
1628 KB |
Output is correct |
27 |
Correct |
1 ms |
1628 KB |
Output is correct |
28 |
Correct |
1 ms |
1628 KB |
Output is correct |
29 |
Correct |
6 ms |
2396 KB |
Output is correct |
30 |
Correct |
12 ms |
3296 KB |
Output is correct |
31 |
Correct |
20 ms |
4052 KB |
Output is correct |
32 |
Correct |
16 ms |
4060 KB |
Output is correct |
33 |
Correct |
15 ms |
4060 KB |
Output is correct |
34 |
Correct |
16 ms |
3932 KB |
Output is correct |
35 |
Correct |
16 ms |
4088 KB |
Output is correct |
36 |
Correct |
16 ms |
3816 KB |
Output is correct |
37 |
Correct |
16 ms |
4100 KB |
Output is correct |
38 |
Correct |
18 ms |
4060 KB |
Output is correct |
39 |
Correct |
16 ms |
3808 KB |
Output is correct |
40 |
Correct |
16 ms |
4052 KB |
Output is correct |
41 |
Correct |
1 ms |
1628 KB |
Output is correct |
42 |
Correct |
1 ms |
1628 KB |
Output is correct |
43 |
Correct |
1 ms |
1628 KB |
Output is correct |
44 |
Correct |
2 ms |
1624 KB |
Output is correct |
45 |
Correct |
2 ms |
1628 KB |
Output is correct |
46 |
Correct |
1 ms |
1628 KB |
Output is correct |
47 |
Correct |
3 ms |
1904 KB |
Output is correct |
48 |
Correct |
3 ms |
1884 KB |
Output is correct |
49 |
Correct |
8 ms |
2648 KB |
Output is correct |
50 |
Correct |
11 ms |
2908 KB |
Output is correct |
51 |
Correct |
16 ms |
3580 KB |
Output is correct |
52 |
Correct |
16 ms |
3580 KB |
Output is correct |
53 |
Correct |
17 ms |
3416 KB |
Output is correct |
54 |
Correct |
16 ms |
3420 KB |
Output is correct |
55 |
Correct |
16 ms |
3416 KB |
Output is correct |
56 |
Correct |
16 ms |
3416 KB |
Output is correct |
57 |
Correct |
16 ms |
3420 KB |
Output is correct |
58 |
Correct |
16 ms |
3420 KB |
Output is correct |
59 |
Correct |
16 ms |
3576 KB |
Output is correct |
60 |
Correct |
16 ms |
3420 KB |
Output is correct |
61 |
Correct |
16 ms |
3420 KB |
Output is correct |
62 |
Correct |
16 ms |
3420 KB |
Output is correct |
63 |
Correct |
16 ms |
3584 KB |
Output is correct |
64 |
Correct |
16 ms |
3416 KB |
Output is correct |
65 |
Correct |
16 ms |
3416 KB |
Output is correct |
66 |
Correct |
16 ms |
3420 KB |
Output is correct |
67 |
Correct |
16 ms |
3416 KB |
Output is correct |
68 |
Correct |
17 ms |
3420 KB |
Output is correct |
69 |
Correct |
16 ms |
3560 KB |
Output is correct |
70 |
Correct |
16 ms |
3420 KB |
Output is correct |
71 |
Correct |
4 ms |
1880 KB |
Output is correct |
72 |
Correct |
4 ms |
1884 KB |
Output is correct |
73 |
Correct |
4 ms |
1908 KB |
Output is correct |
74 |
Correct |
4 ms |
1884 KB |
Output is correct |
75 |
Correct |
4 ms |
1884 KB |
Output is correct |
76 |
Correct |
7 ms |
2408 KB |
Output is correct |
77 |
Correct |
6 ms |
2396 KB |
Output is correct |
78 |
Correct |
7 ms |
2396 KB |
Output is correct |
79 |
Correct |
7 ms |
2412 KB |
Output is correct |
80 |
Correct |
7 ms |
2396 KB |
Output is correct |
81 |
Correct |
12 ms |
3180 KB |
Output is correct |
82 |
Correct |
12 ms |
3164 KB |
Output is correct |
83 |
Correct |
13 ms |
3164 KB |
Output is correct |
84 |
Correct |
14 ms |
3164 KB |
Output is correct |
85 |
Correct |
12 ms |
3164 KB |
Output is correct |
86 |
Correct |
14 ms |
3160 KB |
Output is correct |
87 |
Correct |
17 ms |
3164 KB |
Output is correct |
88 |
Correct |
13 ms |
3160 KB |
Output is correct |
89 |
Correct |
14 ms |
3164 KB |
Output is correct |
90 |
Correct |
13 ms |
3164 KB |
Output is correct |
91 |
Correct |
19 ms |
3696 KB |
Output is correct |
92 |
Correct |
20 ms |
3672 KB |
Output is correct |
93 |
Correct |
19 ms |
3692 KB |
Output is correct |
94 |
Correct |
19 ms |
3676 KB |
Output is correct |
95 |
Correct |
20 ms |
3692 KB |
Output is correct |
96 |
Correct |
22 ms |
3932 KB |
Output is correct |
97 |
Correct |
22 ms |
3928 KB |
Output is correct |
98 |
Correct |
23 ms |
3932 KB |
Output is correct |
99 |
Correct |
22 ms |
3932 KB |
Output is correct |
100 |
Correct |
22 ms |
4084 KB |
Output is correct |
101 |
Correct |
23 ms |
3960 KB |
Output is correct |
102 |
Correct |
23 ms |
4076 KB |
Output is correct |
103 |
Correct |
23 ms |
3932 KB |
Output is correct |
104 |
Correct |
24 ms |
3932 KB |
Output is correct |
105 |
Correct |
22 ms |
3964 KB |
Output is correct |
106 |
Correct |
22 ms |
3956 KB |
Output is correct |
107 |
Correct |
27 ms |
3868 KB |
Output is correct |
108 |
Correct |
26 ms |
3932 KB |
Output is correct |
109 |
Correct |
22 ms |
3928 KB |
Output is correct |
110 |
Correct |
21 ms |
3932 KB |
Output is correct |
111 |
Correct |
26 ms |
4180 KB |
Output is correct |
112 |
Correct |
21 ms |
3932 KB |
Output is correct |
113 |
Correct |
22 ms |
4108 KB |
Output is correct |
114 |
Correct |
21 ms |
3932 KB |
Output is correct |
115 |
Correct |
22 ms |
3932 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1624 KB |
Output is correct |
2 |
Correct |
1 ms |
1624 KB |
Output is correct |
3 |
Correct |
1 ms |
1628 KB |
Output is correct |
4 |
Correct |
1 ms |
1624 KB |
Output is correct |
5 |
Correct |
1 ms |
1628 KB |
Output is correct |
6 |
Correct |
1 ms |
1628 KB |
Output is correct |
7 |
Correct |
1 ms |
1628 KB |
Output is correct |
8 |
Correct |
1 ms |
1628 KB |
Output is correct |
9 |
Correct |
1 ms |
1628 KB |
Output is correct |
10 |
Correct |
1 ms |
1628 KB |
Output is correct |
11 |
Correct |
1 ms |
1624 KB |
Output is correct |
12 |
Correct |
1 ms |
1628 KB |
Output is correct |
13 |
Correct |
2 ms |
1628 KB |
Output is correct |
14 |
Correct |
6 ms |
2400 KB |
Output is correct |
15 |
Correct |
10 ms |
3548 KB |
Output is correct |
16 |
Correct |
16 ms |
3804 KB |
Output is correct |
17 |
Correct |
16 ms |
5104 KB |
Output is correct |
18 |
Correct |
15 ms |
3808 KB |
Output is correct |
19 |
Correct |
15 ms |
3832 KB |
Output is correct |
20 |
Correct |
16 ms |
4312 KB |
Output is correct |
21 |
Correct |
16 ms |
4064 KB |
Output is correct |
22 |
Correct |
15 ms |
3824 KB |
Output is correct |
23 |
Correct |
14 ms |
3804 KB |
Output is correct |
24 |
Correct |
15 ms |
4060 KB |
Output is correct |
25 |
Correct |
15 ms |
4064 KB |
Output is correct |
26 |
Correct |
2 ms |
1628 KB |
Output is correct |
27 |
Correct |
1 ms |
1628 KB |
Output is correct |
28 |
Correct |
1 ms |
1628 KB |
Output is correct |
29 |
Correct |
6 ms |
2396 KB |
Output is correct |
30 |
Correct |
12 ms |
3296 KB |
Output is correct |
31 |
Correct |
20 ms |
4052 KB |
Output is correct |
32 |
Correct |
16 ms |
4060 KB |
Output is correct |
33 |
Correct |
15 ms |
4060 KB |
Output is correct |
34 |
Correct |
16 ms |
3932 KB |
Output is correct |
35 |
Correct |
16 ms |
4088 KB |
Output is correct |
36 |
Correct |
16 ms |
3816 KB |
Output is correct |
37 |
Correct |
16 ms |
4100 KB |
Output is correct |
38 |
Correct |
18 ms |
4060 KB |
Output is correct |
39 |
Correct |
16 ms |
3808 KB |
Output is correct |
40 |
Correct |
16 ms |
4052 KB |
Output is correct |
41 |
Correct |
1 ms |
1628 KB |
Output is correct |
42 |
Correct |
1 ms |
1628 KB |
Output is correct |
43 |
Correct |
1 ms |
1628 KB |
Output is correct |
44 |
Correct |
2 ms |
1624 KB |
Output is correct |
45 |
Correct |
2 ms |
1628 KB |
Output is correct |
46 |
Correct |
1 ms |
1628 KB |
Output is correct |
47 |
Correct |
3 ms |
1904 KB |
Output is correct |
48 |
Correct |
3 ms |
1884 KB |
Output is correct |
49 |
Correct |
8 ms |
2648 KB |
Output is correct |
50 |
Correct |
11 ms |
2908 KB |
Output is correct |
51 |
Correct |
16 ms |
3580 KB |
Output is correct |
52 |
Correct |
16 ms |
3580 KB |
Output is correct |
53 |
Correct |
17 ms |
3416 KB |
Output is correct |
54 |
Correct |
16 ms |
3420 KB |
Output is correct |
55 |
Correct |
16 ms |
3416 KB |
Output is correct |
56 |
Correct |
16 ms |
3416 KB |
Output is correct |
57 |
Correct |
16 ms |
3420 KB |
Output is correct |
58 |
Correct |
16 ms |
3420 KB |
Output is correct |
59 |
Correct |
16 ms |
3576 KB |
Output is correct |
60 |
Correct |
16 ms |
3420 KB |
Output is correct |
61 |
Correct |
16 ms |
3420 KB |
Output is correct |
62 |
Correct |
16 ms |
3420 KB |
Output is correct |
63 |
Correct |
16 ms |
3584 KB |
Output is correct |
64 |
Correct |
16 ms |
3416 KB |
Output is correct |
65 |
Correct |
16 ms |
3416 KB |
Output is correct |
66 |
Correct |
16 ms |
3420 KB |
Output is correct |
67 |
Correct |
16 ms |
3416 KB |
Output is correct |
68 |
Correct |
17 ms |
3420 KB |
Output is correct |
69 |
Correct |
16 ms |
3560 KB |
Output is correct |
70 |
Correct |
16 ms |
3420 KB |
Output is correct |
71 |
Correct |
4 ms |
1880 KB |
Output is correct |
72 |
Correct |
4 ms |
1884 KB |
Output is correct |
73 |
Correct |
4 ms |
1908 KB |
Output is correct |
74 |
Correct |
4 ms |
1884 KB |
Output is correct |
75 |
Correct |
4 ms |
1884 KB |
Output is correct |
76 |
Correct |
7 ms |
2408 KB |
Output is correct |
77 |
Correct |
6 ms |
2396 KB |
Output is correct |
78 |
Correct |
7 ms |
2396 KB |
Output is correct |
79 |
Correct |
7 ms |
2412 KB |
Output is correct |
80 |
Correct |
7 ms |
2396 KB |
Output is correct |
81 |
Correct |
12 ms |
3180 KB |
Output is correct |
82 |
Correct |
12 ms |
3164 KB |
Output is correct |
83 |
Correct |
13 ms |
3164 KB |
Output is correct |
84 |
Correct |
14 ms |
3164 KB |
Output is correct |
85 |
Correct |
12 ms |
3164 KB |
Output is correct |
86 |
Correct |
14 ms |
3160 KB |
Output is correct |
87 |
Correct |
17 ms |
3164 KB |
Output is correct |
88 |
Correct |
13 ms |
3160 KB |
Output is correct |
89 |
Correct |
14 ms |
3164 KB |
Output is correct |
90 |
Correct |
13 ms |
3164 KB |
Output is correct |
91 |
Correct |
19 ms |
3696 KB |
Output is correct |
92 |
Correct |
20 ms |
3672 KB |
Output is correct |
93 |
Correct |
19 ms |
3692 KB |
Output is correct |
94 |
Correct |
19 ms |
3676 KB |
Output is correct |
95 |
Correct |
20 ms |
3692 KB |
Output is correct |
96 |
Correct |
22 ms |
3932 KB |
Output is correct |
97 |
Correct |
22 ms |
3928 KB |
Output is correct |
98 |
Correct |
23 ms |
3932 KB |
Output is correct |
99 |
Correct |
22 ms |
3932 KB |
Output is correct |
100 |
Correct |
22 ms |
4084 KB |
Output is correct |
101 |
Correct |
23 ms |
3960 KB |
Output is correct |
102 |
Correct |
23 ms |
4076 KB |
Output is correct |
103 |
Correct |
23 ms |
3932 KB |
Output is correct |
104 |
Correct |
24 ms |
3932 KB |
Output is correct |
105 |
Correct |
22 ms |
3964 KB |
Output is correct |
106 |
Correct |
22 ms |
3956 KB |
Output is correct |
107 |
Correct |
27 ms |
3868 KB |
Output is correct |
108 |
Correct |
26 ms |
3932 KB |
Output is correct |
109 |
Correct |
22 ms |
3928 KB |
Output is correct |
110 |
Correct |
21 ms |
3932 KB |
Output is correct |
111 |
Correct |
26 ms |
4180 KB |
Output is correct |
112 |
Correct |
21 ms |
3932 KB |
Output is correct |
113 |
Correct |
22 ms |
4108 KB |
Output is correct |
114 |
Correct |
21 ms |
3932 KB |
Output is correct |
115 |
Correct |
22 ms |
3932 KB |
Output is correct |
116 |
Correct |
192 ms |
3412 KB |
Output is correct |
117 |
Correct |
244 ms |
3412 KB |
Output is correct |
118 |
Correct |
325 ms |
3920 KB |
Output is correct |
119 |
Correct |
348 ms |
4132 KB |
Output is correct |
120 |
Correct |
252 ms |
4180 KB |
Output is correct |
121 |
Correct |
469 ms |
4688 KB |
Output is correct |
122 |
Correct |
342 ms |
4584 KB |
Output is correct |
123 |
Correct |
925 ms |
5380 KB |
Output is correct |
124 |
Correct |
561 ms |
5524 KB |
Output is correct |
125 |
Correct |
476 ms |
5692 KB |
Output is correct |
126 |
Correct |
1573 ms |
6144 KB |
Output is correct |
127 |
Correct |
1563 ms |
6144 KB |
Output is correct |
128 |
Correct |
1591 ms |
6164 KB |
Output is correct |
129 |
Correct |
1562 ms |
6124 KB |
Output is correct |
130 |
Correct |
1553 ms |
6216 KB |
Output is correct |
131 |
Correct |
1633 ms |
6144 KB |
Output is correct |
132 |
Correct |
1655 ms |
6164 KB |
Output is correct |
133 |
Correct |
1635 ms |
6136 KB |
Output is correct |
134 |
Correct |
1649 ms |
6136 KB |
Output is correct |
135 |
Correct |
1659 ms |
6152 KB |
Output is correct |
136 |
Correct |
1648 ms |
6168 KB |
Output is correct |
137 |
Correct |
1636 ms |
6164 KB |
Output is correct |
138 |
Correct |
1666 ms |
6168 KB |
Output is correct |
139 |
Correct |
1650 ms |
6224 KB |
Output is correct |
140 |
Correct |
1661 ms |
6392 KB |
Output is correct |
141 |
Correct |
1457 ms |
6176 KB |
Output is correct |
142 |
Correct |
1454 ms |
6164 KB |
Output is correct |
143 |
Correct |
1452 ms |
6228 KB |
Output is correct |
144 |
Correct |
1463 ms |
6232 KB |
Output is correct |
145 |
Correct |
1457 ms |
6180 KB |
Output is correct |
146 |
Correct |
904 ms |
6660 KB |
Output is correct |
147 |
Correct |
931 ms |
6412 KB |
Output is correct |
148 |
Correct |
922 ms |
6420 KB |
Output is correct |
149 |
Correct |
923 ms |
6428 KB |
Output is correct |
150 |
Correct |
918 ms |
6484 KB |
Output is correct |
151 |
Correct |
844 ms |
6436 KB |
Output is correct |
152 |
Correct |
846 ms |
6444 KB |
Output is correct |
153 |
Correct |
877 ms |
6432 KB |
Output is correct |
154 |
Correct |
857 ms |
6432 KB |
Output is correct |
155 |
Correct |
847 ms |
6432 KB |
Output is correct |
156 |
Correct |
1879 ms |
7248 KB |
Output is correct |
157 |
Correct |
1893 ms |
7100 KB |
Output is correct |
158 |
Correct |
1805 ms |
6876 KB |
Output is correct |
159 |
Correct |
1823 ms |
6964 KB |
Output is correct |
160 |
Correct |
1808 ms |
6952 KB |
Output is correct |
161 |
Correct |
1609 ms |
7364 KB |
Output is correct |
162 |
Correct |
1536 ms |
7192 KB |
Output is correct |
163 |
Correct |
1428 ms |
7256 KB |
Output is correct |
164 |
Correct |
1538 ms |
7172 KB |
Output is correct |
165 |
Correct |
1487 ms |
7116 KB |
Output is correct |
166 |
Correct |
1740 ms |
6844 KB |
Output is correct |
167 |
Correct |
1628 ms |
6700 KB |
Output is correct |
168 |
Correct |
1627 ms |
6740 KB |
Output is correct |
169 |
Correct |
1717 ms |
6844 KB |
Output is correct |
170 |
Correct |
1659 ms |
6748 KB |
Output is correct |
171 |
Correct |
1659 ms |
6812 KB |
Output is correct |
172 |
Correct |
1671 ms |
6816 KB |
Output is correct |
173 |
Correct |
1640 ms |
6812 KB |
Output is correct |
174 |
Correct |
1660 ms |
6832 KB |
Output is correct |
175 |
Correct |
1723 ms |
7032 KB |
Output is correct |