Submission #789767

# Submission time Handle Problem Language Result Execution time Memory
789767 2023-07-22T01:50:59 Z math_rabbit_1028 Diversity (CEOI21_diversity) C++14
100 / 100
2591 ms 3732 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long lint;
typedef pair<int, lint> pi;
#define all(v) (v).begin(), (v).end()
#define sz(v) ((int)(v).size())
const int MAXN = 300005;

int n, q;
int a[MAXN];

lint DCF(lint x, lint y, lint L, lint s){
	lint ret = 
	s * (x*x + x + y*y + y) + 
	(s * (s - 1) / 2) * L * (2 * x + 2 + 2 * y) +
	2 * L * L * ((s - 1) * s * (2 * s - 1) / 6);
	ret /= 2;
	return ret;
}

const int B = 1000;

struct query{
	int l, r, idx;
	bool operator<(const query &q)const{
		if((l / B) != (q.l / B)) return l < q.l;
		if((l / B) % 2) return r > q.r;
		return r < q.r;
	}
}qr[MAXN];

int tNew;
int cnt[MAXN];
int mp[MAXN];
unordered_set<int> tracker;

void add(int x, int v){
	if(cnt[a[x]] > 0){
		mp[cnt[a[x]]]--;
		if(mp[cnt[a[x]]] == 0) tracker.erase(cnt[a[x]]);
		tNew--;
	}
	cnt[a[x]] += v;
	if(cnt[a[x]] > 0){
		mp[cnt[a[x]]]++;
		if(mp[cnt[a[x]]] == 1) tracker.insert(cnt[a[x]]);
		tNew++;
	}
}

lint dap[MAXN];

int main(){
	scanf("%d %d",&n,&q);
	for(int i = 1; i <= n; i++){
	//	a[i] = (int)sqrt(i);
		scanf("%d",&a[i]);
	}
	for(int i = 0; i < q; i++){
	//	qr[i].l = rand() % n + 1;
	//	qr[i].r = rand() % n + 1;
//		if(qr[i].l > qr[i].r) swap(qr[i].l, qr[i].r);
		scanf("%d %d",&qr[i].l,&qr[i].r);
		qr[i].idx = i;
	}
	sort(qr, qr + q);
	int l = 1, r = 0;
	for(int i = 0; i < q; i++){
		while(l > qr[i].l) add(--l, 1);
		while(r < qr[i].r) add(++r, 1);
		while(l < qr[i].l) add(l++, -1);
		while(r > qr[i].r) add(r--, -1);
		int N = qr[i].r - qr[i].l + 1;
		lint ret = 1ll * N * (N + 1) / 2 * tNew;
		int L = 0, R = 0;
		vector<pi> v;
		for(auto &i : tracker){
			v.emplace_back(i, mp[i]);
		}
		sort(all(v));
		for(auto &[i, j] : v){
			int ost = (j + 1) / 2;
			int est = j / 2;
			ret -= DCF(L, N - L - ost * i, i, ost);
			L += ost * i;
			ret -= DCF(R, N - R - est * i, i, est);
			R += est * i;
			if(j & 1) swap(L, R);
		}
		dap[qr[i].idx] = ret;
	}
	for(int i = 0; i < q; i++) printf("%lld\n", dap[i]);
}

Compilation message

diversity.cpp: In function 'int main()':
diversity.cpp:81:13: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   81 |   for(auto &[i, j] : v){
      |             ^
diversity.cpp:54:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   54 |  scanf("%d %d",&n,&q);
      |  ~~~~~^~~~~~~~~~~~~~~
diversity.cpp:57:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   57 |   scanf("%d",&a[i]);
      |   ~~~~~^~~~~~~~~~~~
diversity.cpp:63:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   63 |   scanf("%d %d",&qr[i].l,&qr[i].r);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 316 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 2 ms 332 KB Output is correct
4 Correct 11 ms 944 KB Output is correct
5 Correct 24 ms 1752 KB Output is correct
6 Correct 40 ms 2180 KB Output is correct
7 Correct 34 ms 2600 KB Output is correct
8 Correct 34 ms 2172 KB Output is correct
9 Correct 34 ms 2200 KB Output is correct
10 Correct 35 ms 2328 KB Output is correct
11 Correct 35 ms 2196 KB Output is correct
12 Correct 35 ms 2228 KB Output is correct
13 Correct 35 ms 2084 KB Output is correct
14 Correct 37 ms 2316 KB Output is correct
15 Correct 35 ms 2232 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 2 ms 332 KB Output is correct
4 Correct 11 ms 944 KB Output is correct
5 Correct 24 ms 1752 KB Output is correct
6 Correct 40 ms 2180 KB Output is correct
7 Correct 34 ms 2600 KB Output is correct
8 Correct 34 ms 2172 KB Output is correct
9 Correct 34 ms 2200 KB Output is correct
10 Correct 35 ms 2328 KB Output is correct
11 Correct 35 ms 2196 KB Output is correct
12 Correct 35 ms 2228 KB Output is correct
13 Correct 35 ms 2084 KB Output is correct
14 Correct 37 ms 2316 KB Output is correct
15 Correct 35 ms 2232 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 320 KB Output is correct
18 Correct 2 ms 340 KB Output is correct
19 Correct 12 ms 948 KB Output is correct
20 Correct 23 ms 1600 KB Output is correct
21 Correct 35 ms 2308 KB Output is correct
22 Correct 35 ms 2252 KB Output is correct
23 Correct 36 ms 2320 KB Output is correct
24 Correct 35 ms 2252 KB Output is correct
25 Correct 36 ms 2212 KB Output is correct
26 Correct 35 ms 2260 KB Output is correct
27 Correct 40 ms 2256 KB Output is correct
28 Correct 35 ms 2292 KB Output is correct
29 Correct 35 ms 2240 KB Output is correct
30 Correct 35 ms 2236 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 2 ms 332 KB Output is correct
4 Correct 11 ms 944 KB Output is correct
5 Correct 24 ms 1752 KB Output is correct
6 Correct 40 ms 2180 KB Output is correct
7 Correct 34 ms 2600 KB Output is correct
8 Correct 34 ms 2172 KB Output is correct
9 Correct 34 ms 2200 KB Output is correct
10 Correct 35 ms 2328 KB Output is correct
11 Correct 35 ms 2196 KB Output is correct
12 Correct 35 ms 2228 KB Output is correct
13 Correct 35 ms 2084 KB Output is correct
14 Correct 37 ms 2316 KB Output is correct
15 Correct 35 ms 2232 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 320 KB Output is correct
18 Correct 2 ms 340 KB Output is correct
19 Correct 12 ms 948 KB Output is correct
20 Correct 23 ms 1600 KB Output is correct
21 Correct 35 ms 2308 KB Output is correct
22 Correct 35 ms 2252 KB Output is correct
23 Correct 36 ms 2320 KB Output is correct
24 Correct 35 ms 2252 KB Output is correct
25 Correct 36 ms 2212 KB Output is correct
26 Correct 35 ms 2260 KB Output is correct
27 Correct 40 ms 2256 KB Output is correct
28 Correct 35 ms 2292 KB Output is correct
29 Correct 35 ms 2240 KB Output is correct
30 Correct 35 ms 2236 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 1 ms 316 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 2 ms 340 KB Output is correct
35 Correct 2 ms 340 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 5 ms 724 KB Output is correct
38 Correct 4 ms 620 KB Output is correct
39 Correct 8 ms 1100 KB Output is correct
40 Correct 16 ms 1736 KB Output is correct
41 Correct 26 ms 2124 KB Output is correct
42 Correct 26 ms 2176 KB Output is correct
43 Correct 27 ms 2108 KB Output is correct
44 Correct 27 ms 2124 KB Output is correct
45 Correct 26 ms 2144 KB Output is correct
46 Correct 26 ms 2176 KB Output is correct
47 Correct 26 ms 2132 KB Output is correct
48 Correct 26 ms 2160 KB Output is correct
49 Correct 26 ms 2172 KB Output is correct
50 Correct 26 ms 2144 KB Output is correct
51 Correct 26 ms 2144 KB Output is correct
52 Correct 26 ms 2156 KB Output is correct
53 Correct 26 ms 2148 KB Output is correct
54 Correct 27 ms 2068 KB Output is correct
55 Correct 31 ms 2176 KB Output is correct
56 Correct 27 ms 2124 KB Output is correct
57 Correct 26 ms 2076 KB Output is correct
58 Correct 26 ms 2188 KB Output is correct
59 Correct 26 ms 2092 KB Output is correct
60 Correct 26 ms 2176 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 316 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 2 ms 332 KB Output is correct
14 Correct 11 ms 944 KB Output is correct
15 Correct 24 ms 1752 KB Output is correct
16 Correct 40 ms 2180 KB Output is correct
17 Correct 34 ms 2600 KB Output is correct
18 Correct 34 ms 2172 KB Output is correct
19 Correct 34 ms 2200 KB Output is correct
20 Correct 35 ms 2328 KB Output is correct
21 Correct 35 ms 2196 KB Output is correct
22 Correct 35 ms 2228 KB Output is correct
23 Correct 35 ms 2084 KB Output is correct
24 Correct 37 ms 2316 KB Output is correct
25 Correct 35 ms 2232 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 1 ms 320 KB Output is correct
28 Correct 2 ms 340 KB Output is correct
29 Correct 12 ms 948 KB Output is correct
30 Correct 23 ms 1600 KB Output is correct
31 Correct 35 ms 2308 KB Output is correct
32 Correct 35 ms 2252 KB Output is correct
33 Correct 36 ms 2320 KB Output is correct
34 Correct 35 ms 2252 KB Output is correct
35 Correct 36 ms 2212 KB Output is correct
36 Correct 35 ms 2260 KB Output is correct
37 Correct 40 ms 2256 KB Output is correct
38 Correct 35 ms 2292 KB Output is correct
39 Correct 35 ms 2240 KB Output is correct
40 Correct 35 ms 2236 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 316 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 2 ms 340 KB Output is correct
45 Correct 2 ms 340 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 5 ms 724 KB Output is correct
48 Correct 4 ms 620 KB Output is correct
49 Correct 8 ms 1100 KB Output is correct
50 Correct 16 ms 1736 KB Output is correct
51 Correct 26 ms 2124 KB Output is correct
52 Correct 26 ms 2176 KB Output is correct
53 Correct 27 ms 2108 KB Output is correct
54 Correct 27 ms 2124 KB Output is correct
55 Correct 26 ms 2144 KB Output is correct
56 Correct 26 ms 2176 KB Output is correct
57 Correct 26 ms 2132 KB Output is correct
58 Correct 26 ms 2160 KB Output is correct
59 Correct 26 ms 2172 KB Output is correct
60 Correct 26 ms 2144 KB Output is correct
61 Correct 26 ms 2144 KB Output is correct
62 Correct 26 ms 2156 KB Output is correct
63 Correct 26 ms 2148 KB Output is correct
64 Correct 27 ms 2068 KB Output is correct
65 Correct 31 ms 2176 KB Output is correct
66 Correct 27 ms 2124 KB Output is correct
67 Correct 26 ms 2076 KB Output is correct
68 Correct 26 ms 2188 KB Output is correct
69 Correct 26 ms 2092 KB Output is correct
70 Correct 26 ms 2176 KB Output is correct
71 Correct 4 ms 724 KB Output is correct
72 Correct 4 ms 724 KB Output is correct
73 Correct 5 ms 712 KB Output is correct
74 Correct 4 ms 696 KB Output is correct
75 Correct 4 ms 724 KB Output is correct
76 Correct 8 ms 1108 KB Output is correct
77 Correct 9 ms 1108 KB Output is correct
78 Correct 8 ms 1112 KB Output is correct
79 Correct 8 ms 1108 KB Output is correct
80 Correct 8 ms 1128 KB Output is correct
81 Correct 15 ms 1708 KB Output is correct
82 Correct 15 ms 1700 KB Output is correct
83 Correct 18 ms 1752 KB Output is correct
84 Correct 15 ms 1744 KB Output is correct
85 Correct 15 ms 1668 KB Output is correct
86 Correct 17 ms 1740 KB Output is correct
87 Correct 16 ms 1716 KB Output is correct
88 Correct 16 ms 1708 KB Output is correct
89 Correct 16 ms 1776 KB Output is correct
90 Correct 16 ms 1740 KB Output is correct
91 Correct 25 ms 2472 KB Output is correct
92 Correct 26 ms 2688 KB Output is correct
93 Correct 24 ms 2452 KB Output is correct
94 Correct 24 ms 2500 KB Output is correct
95 Correct 24 ms 2476 KB Output is correct
96 Correct 28 ms 2832 KB Output is correct
97 Correct 26 ms 2864 KB Output is correct
98 Correct 26 ms 2860 KB Output is correct
99 Correct 27 ms 3024 KB Output is correct
100 Correct 27 ms 2900 KB Output is correct
101 Correct 25 ms 2824 KB Output is correct
102 Correct 27 ms 2792 KB Output is correct
103 Correct 27 ms 2868 KB Output is correct
104 Correct 26 ms 2892 KB Output is correct
105 Correct 26 ms 2876 KB Output is correct
106 Correct 25 ms 3068 KB Output is correct
107 Correct 28 ms 3148 KB Output is correct
108 Correct 26 ms 3020 KB Output is correct
109 Correct 26 ms 3092 KB Output is correct
110 Correct 25 ms 3004 KB Output is correct
111 Correct 27 ms 3008 KB Output is correct
112 Correct 25 ms 2988 KB Output is correct
113 Correct 26 ms 3016 KB Output is correct
114 Correct 25 ms 2992 KB Output is correct
115 Correct 26 ms 2988 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 316 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 2 ms 332 KB Output is correct
14 Correct 11 ms 944 KB Output is correct
15 Correct 24 ms 1752 KB Output is correct
16 Correct 40 ms 2180 KB Output is correct
17 Correct 34 ms 2600 KB Output is correct
18 Correct 34 ms 2172 KB Output is correct
19 Correct 34 ms 2200 KB Output is correct
20 Correct 35 ms 2328 KB Output is correct
21 Correct 35 ms 2196 KB Output is correct
22 Correct 35 ms 2228 KB Output is correct
23 Correct 35 ms 2084 KB Output is correct
24 Correct 37 ms 2316 KB Output is correct
25 Correct 35 ms 2232 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 1 ms 320 KB Output is correct
28 Correct 2 ms 340 KB Output is correct
29 Correct 12 ms 948 KB Output is correct
30 Correct 23 ms 1600 KB Output is correct
31 Correct 35 ms 2308 KB Output is correct
32 Correct 35 ms 2252 KB Output is correct
33 Correct 36 ms 2320 KB Output is correct
34 Correct 35 ms 2252 KB Output is correct
35 Correct 36 ms 2212 KB Output is correct
36 Correct 35 ms 2260 KB Output is correct
37 Correct 40 ms 2256 KB Output is correct
38 Correct 35 ms 2292 KB Output is correct
39 Correct 35 ms 2240 KB Output is correct
40 Correct 35 ms 2236 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 316 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 2 ms 340 KB Output is correct
45 Correct 2 ms 340 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 5 ms 724 KB Output is correct
48 Correct 4 ms 620 KB Output is correct
49 Correct 8 ms 1100 KB Output is correct
50 Correct 16 ms 1736 KB Output is correct
51 Correct 26 ms 2124 KB Output is correct
52 Correct 26 ms 2176 KB Output is correct
53 Correct 27 ms 2108 KB Output is correct
54 Correct 27 ms 2124 KB Output is correct
55 Correct 26 ms 2144 KB Output is correct
56 Correct 26 ms 2176 KB Output is correct
57 Correct 26 ms 2132 KB Output is correct
58 Correct 26 ms 2160 KB Output is correct
59 Correct 26 ms 2172 KB Output is correct
60 Correct 26 ms 2144 KB Output is correct
61 Correct 26 ms 2144 KB Output is correct
62 Correct 26 ms 2156 KB Output is correct
63 Correct 26 ms 2148 KB Output is correct
64 Correct 27 ms 2068 KB Output is correct
65 Correct 31 ms 2176 KB Output is correct
66 Correct 27 ms 2124 KB Output is correct
67 Correct 26 ms 2076 KB Output is correct
68 Correct 26 ms 2188 KB Output is correct
69 Correct 26 ms 2092 KB Output is correct
70 Correct 26 ms 2176 KB Output is correct
71 Correct 4 ms 724 KB Output is correct
72 Correct 4 ms 724 KB Output is correct
73 Correct 5 ms 712 KB Output is correct
74 Correct 4 ms 696 KB Output is correct
75 Correct 4 ms 724 KB Output is correct
76 Correct 8 ms 1108 KB Output is correct
77 Correct 9 ms 1108 KB Output is correct
78 Correct 8 ms 1112 KB Output is correct
79 Correct 8 ms 1108 KB Output is correct
80 Correct 8 ms 1128 KB Output is correct
81 Correct 15 ms 1708 KB Output is correct
82 Correct 15 ms 1700 KB Output is correct
83 Correct 18 ms 1752 KB Output is correct
84 Correct 15 ms 1744 KB Output is correct
85 Correct 15 ms 1668 KB Output is correct
86 Correct 17 ms 1740 KB Output is correct
87 Correct 16 ms 1716 KB Output is correct
88 Correct 16 ms 1708 KB Output is correct
89 Correct 16 ms 1776 KB Output is correct
90 Correct 16 ms 1740 KB Output is correct
91 Correct 25 ms 2472 KB Output is correct
92 Correct 26 ms 2688 KB Output is correct
93 Correct 24 ms 2452 KB Output is correct
94 Correct 24 ms 2500 KB Output is correct
95 Correct 24 ms 2476 KB Output is correct
96 Correct 28 ms 2832 KB Output is correct
97 Correct 26 ms 2864 KB Output is correct
98 Correct 26 ms 2860 KB Output is correct
99 Correct 27 ms 3024 KB Output is correct
100 Correct 27 ms 2900 KB Output is correct
101 Correct 25 ms 2824 KB Output is correct
102 Correct 27 ms 2792 KB Output is correct
103 Correct 27 ms 2868 KB Output is correct
104 Correct 26 ms 2892 KB Output is correct
105 Correct 26 ms 2876 KB Output is correct
106 Correct 25 ms 3068 KB Output is correct
107 Correct 28 ms 3148 KB Output is correct
108 Correct 26 ms 3020 KB Output is correct
109 Correct 26 ms 3092 KB Output is correct
110 Correct 25 ms 3004 KB Output is correct
111 Correct 27 ms 3008 KB Output is correct
112 Correct 25 ms 2988 KB Output is correct
113 Correct 26 ms 3016 KB Output is correct
114 Correct 25 ms 2992 KB Output is correct
115 Correct 26 ms 2988 KB Output is correct
116 Correct 707 ms 2104 KB Output is correct
117 Correct 495 ms 2100 KB Output is correct
118 Correct 885 ms 2720 KB Output is correct
119 Correct 460 ms 2644 KB Output is correct
120 Correct 280 ms 2656 KB Output is correct
121 Correct 496 ms 2868 KB Output is correct
122 Correct 317 ms 2636 KB Output is correct
123 Correct 1035 ms 3136 KB Output is correct
124 Correct 381 ms 3004 KB Output is correct
125 Correct 296 ms 3020 KB Output is correct
126 Correct 2553 ms 3220 KB Output is correct
127 Correct 2537 ms 3160 KB Output is correct
128 Correct 2530 ms 3164 KB Output is correct
129 Correct 2590 ms 3152 KB Output is correct
130 Correct 2546 ms 3256 KB Output is correct
131 Correct 2432 ms 3148 KB Output is correct
132 Correct 2416 ms 3148 KB Output is correct
133 Correct 2509 ms 3148 KB Output is correct
134 Correct 2438 ms 3148 KB Output is correct
135 Correct 2448 ms 3148 KB Output is correct
136 Correct 2387 ms 3164 KB Output is correct
137 Correct 2488 ms 3028 KB Output is correct
138 Correct 2353 ms 3160 KB Output is correct
139 Correct 2440 ms 3144 KB Output is correct
140 Correct 2400 ms 3156 KB Output is correct
141 Correct 1626 ms 3168 KB Output is correct
142 Correct 1661 ms 3164 KB Output is correct
143 Correct 1630 ms 3172 KB Output is correct
144 Correct 1641 ms 3172 KB Output is correct
145 Correct 1624 ms 3300 KB Output is correct
146 Correct 605 ms 3152 KB Output is correct
147 Correct 604 ms 3152 KB Output is correct
148 Correct 620 ms 3156 KB Output is correct
149 Correct 686 ms 3152 KB Output is correct
150 Correct 626 ms 3148 KB Output is correct
151 Correct 496 ms 3276 KB Output is correct
152 Correct 478 ms 3156 KB Output is correct
153 Correct 492 ms 3144 KB Output is correct
154 Correct 490 ms 3156 KB Output is correct
155 Correct 496 ms 3160 KB Output is correct
156 Correct 1618 ms 3448 KB Output is correct
157 Correct 1607 ms 3720 KB Output is correct
158 Correct 1560 ms 3656 KB Output is correct
159 Correct 1530 ms 3696 KB Output is correct
160 Correct 1556 ms 3652 KB Output is correct
161 Correct 1553 ms 3672 KB Output is correct
162 Correct 1532 ms 3636 KB Output is correct
163 Correct 1613 ms 3580 KB Output is correct
164 Correct 1533 ms 3732 KB Output is correct
165 Correct 1507 ms 3564 KB Output is correct
166 Correct 2187 ms 3408 KB Output is correct
167 Correct 2218 ms 3376 KB Output is correct
168 Correct 2177 ms 3384 KB Output is correct
169 Correct 2205 ms 3416 KB Output is correct
170 Correct 2190 ms 3392 KB Output is correct
171 Correct 2588 ms 3320 KB Output is correct
172 Correct 2578 ms 3320 KB Output is correct
173 Correct 2562 ms 3316 KB Output is correct
174 Correct 2591 ms 3328 KB Output is correct
175 Correct 2588 ms 3348 KB Output is correct