Submission #576875

# Submission time Handle Problem Language Result Execution time Memory
576875 2022-06-13T16:56:42 Z amunduzbaev Diversity (CEOI21_diversity) C++17
100 / 100
6821 ms 10444 KB
#include "bits/stdc++.h"
using namespace std;
 
#define ar array
#define ll int64_t
 
const int N = 3e5 + 5;
const int Q = 5e4 + 5;
const int B = 1350;
int a[N], l[Q], r[Q], cnt[N];
int is[N], mm[N];
ll res[Q], dp[N];
 
signed main(){
	ios::sync_with_stdio(0); cin.tie(0);
	
	int n, q; cin>>n>>q;
	vector<int> p;
	for(int i=0;i<n;i++){
		cin>>a[i];
	}
	for(int i=1;i<N;i++){
		dp[i] = dp[i-1] + (i * 1ll * (i - 1) / 2);
	}
	for(int i=0;i<q;i++){
		cin>>l[i]>>r[i];
		l[i]--;
		p.push_back(i);
	}
	sort(p.begin(), p.end(), [&](int i, int j){
		if(l[i] / B != l[j] / B){
			return l[i] < l[j];
		} 
		return r[i] < r[j];
	});
	
	set<int> ss;
	auto add = [&](int i){
		if(cnt[a[i]]){
			mm[cnt[a[i]]]--;
			if(!mm[cnt[a[i]]]) ss.erase(cnt[a[i]]);
		} 
		cnt[a[i]]++;
		if(!mm[cnt[a[i]]]) ss.insert(cnt[a[i]]);
		mm[cnt[a[i]]]++;
	};
	auto del = [&](int i){
		//~ assert(cnt[a[i]]);
		mm[cnt[a[i]]]--;
		if(!mm[cnt[a[i]]]) ss.erase(cnt[a[i]]);
		cnt[a[i]]--;
		if(cnt[a[i]]){
			if(!mm[cnt[a[i]]]) ss.insert(cnt[a[i]]);
			mm[cnt[a[i]]]++;
		}
	};
	
	int lx = 0, rx = 0;
	for(auto i : p){
		if(rx > r[i]){ 
			ss.clear();
			lx = rx = l[i];
			memset(cnt, 0, sizeof cnt);
			memset(mm, 0, sizeof mm);
		}
		while(rx < r[i]){
			add(rx++);
		}
		while(lx > l[i]){
			add(--lx);
		}
		while(lx < l[i]){
			del(lx++);
		}
		
		int ls = 0, rs = 0;
		vector<ar<ll, 2>> L, R;
		for(auto v : ss){
			int c = mm[v];
			int b = (c + 1) / 2, s = c / 2;
			if(ls > rs) swap(b, s);
			if(b) L.push_back({v, b}), ls += b;
			if(s) R.push_back({v, s}), rs += s;
		}
		reverse(R.begin(), R.end());
		L.insert(L.end(), R.begin(), R.end());
		ll sum = 0, sumj = 0, p = 0;
		for(auto [v, c] : L){
			ll C = p * c + c * (c - 1) / 2;
			res[i] = res[i] + v * C * sum - v * c * sumj;
			res[i] += dp[c] * v * v;
			sumj += v * C;
			sum += v * c;
			p += c;
		}
		
		res[i] += sum * (sum + 1) / 2;
	}
	
	for(int i=0;i<q;i++) cout<<res[i]<<"\n";
}
 
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2772 KB Output is correct
2 Correct 2 ms 2644 KB Output is correct
3 Correct 3 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 2 ms 2644 KB Output is correct
6 Correct 2 ms 2644 KB Output is correct
7 Correct 3 ms 2644 KB Output is correct
8 Correct 2 ms 2644 KB Output is correct
9 Correct 3 ms 2644 KB Output is correct
10 Correct 2 ms 2644 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 2608 KB Output is correct
2 Correct 3 ms 2644 KB Output is correct
3 Correct 4 ms 2644 KB Output is correct
4 Correct 20 ms 3180 KB Output is correct
5 Correct 29 ms 3680 KB Output is correct
6 Correct 52 ms 4060 KB Output is correct
7 Correct 44 ms 4372 KB Output is correct
8 Correct 55 ms 4036 KB Output is correct
9 Correct 54 ms 4004 KB Output is correct
10 Correct 51 ms 4172 KB Output is correct
11 Correct 47 ms 4016 KB Output is correct
12 Correct 49 ms 4044 KB Output is correct
13 Correct 44 ms 4032 KB Output is correct
14 Correct 57 ms 4048 KB Output is correct
15 Correct 57 ms 4108 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 2608 KB Output is correct
2 Correct 3 ms 2644 KB Output is correct
3 Correct 4 ms 2644 KB Output is correct
4 Correct 20 ms 3180 KB Output is correct
5 Correct 29 ms 3680 KB Output is correct
6 Correct 52 ms 4060 KB Output is correct
7 Correct 44 ms 4372 KB Output is correct
8 Correct 55 ms 4036 KB Output is correct
9 Correct 54 ms 4004 KB Output is correct
10 Correct 51 ms 4172 KB Output is correct
11 Correct 47 ms 4016 KB Output is correct
12 Correct 49 ms 4044 KB Output is correct
13 Correct 44 ms 4032 KB Output is correct
14 Correct 57 ms 4048 KB Output is correct
15 Correct 57 ms 4108 KB Output is correct
16 Correct 2 ms 2644 KB Output is correct
17 Correct 3 ms 2644 KB Output is correct
18 Correct 4 ms 2644 KB Output is correct
19 Correct 22 ms 3140 KB Output is correct
20 Correct 36 ms 3600 KB Output is correct
21 Correct 52 ms 4008 KB Output is correct
22 Correct 57 ms 3924 KB Output is correct
23 Correct 52 ms 3948 KB Output is correct
24 Correct 58 ms 3976 KB Output is correct
25 Correct 55 ms 4044 KB Output is correct
26 Correct 53 ms 3900 KB Output is correct
27 Correct 56 ms 3920 KB Output is correct
28 Correct 55 ms 4112 KB Output is correct
29 Correct 49 ms 4096 KB Output is correct
30 Correct 55 ms 3996 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 2608 KB Output is correct
2 Correct 3 ms 2644 KB Output is correct
3 Correct 4 ms 2644 KB Output is correct
4 Correct 20 ms 3180 KB Output is correct
5 Correct 29 ms 3680 KB Output is correct
6 Correct 52 ms 4060 KB Output is correct
7 Correct 44 ms 4372 KB Output is correct
8 Correct 55 ms 4036 KB Output is correct
9 Correct 54 ms 4004 KB Output is correct
10 Correct 51 ms 4172 KB Output is correct
11 Correct 47 ms 4016 KB Output is correct
12 Correct 49 ms 4044 KB Output is correct
13 Correct 44 ms 4032 KB Output is correct
14 Correct 57 ms 4048 KB Output is correct
15 Correct 57 ms 4108 KB Output is correct
16 Correct 2 ms 2644 KB Output is correct
17 Correct 3 ms 2644 KB Output is correct
18 Correct 4 ms 2644 KB Output is correct
19 Correct 22 ms 3140 KB Output is correct
20 Correct 36 ms 3600 KB Output is correct
21 Correct 52 ms 4008 KB Output is correct
22 Correct 57 ms 3924 KB Output is correct
23 Correct 52 ms 3948 KB Output is correct
24 Correct 58 ms 3976 KB Output is correct
25 Correct 55 ms 4044 KB Output is correct
26 Correct 53 ms 3900 KB Output is correct
27 Correct 56 ms 3920 KB Output is correct
28 Correct 55 ms 4112 KB Output is correct
29 Correct 49 ms 4096 KB Output is correct
30 Correct 55 ms 3996 KB Output is correct
31 Correct 2 ms 2644 KB Output is correct
32 Correct 2 ms 2644 KB Output is correct
33 Correct 2 ms 2644 KB Output is correct
34 Correct 4 ms 2644 KB Output is correct
35 Correct 3 ms 2644 KB Output is correct
36 Correct 4 ms 2644 KB Output is correct
37 Correct 10 ms 2908 KB Output is correct
38 Correct 7 ms 2896 KB Output is correct
39 Correct 17 ms 3072 KB Output is correct
40 Correct 30 ms 3508 KB Output is correct
41 Correct 47 ms 3808 KB Output is correct
42 Correct 38 ms 3896 KB Output is correct
43 Correct 48 ms 3856 KB Output is correct
44 Correct 40 ms 3884 KB Output is correct
45 Correct 49 ms 3884 KB Output is correct
46 Correct 48 ms 3888 KB Output is correct
47 Correct 46 ms 3868 KB Output is correct
48 Correct 51 ms 3892 KB Output is correct
49 Correct 45 ms 3884 KB Output is correct
50 Correct 40 ms 3892 KB Output is correct
51 Correct 44 ms 3904 KB Output is correct
52 Correct 38 ms 3924 KB Output is correct
53 Correct 44 ms 3888 KB Output is correct
54 Correct 43 ms 3876 KB Output is correct
55 Correct 43 ms 3888 KB Output is correct
56 Correct 40 ms 3892 KB Output is correct
57 Correct 42 ms 3868 KB Output is correct
58 Correct 40 ms 3916 KB Output is correct
59 Correct 43 ms 3892 KB Output is correct
60 Correct 38 ms 3844 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2772 KB Output is correct
2 Correct 2 ms 2644 KB Output is correct
3 Correct 3 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 2 ms 2644 KB Output is correct
6 Correct 2 ms 2644 KB Output is correct
7 Correct 3 ms 2644 KB Output is correct
8 Correct 2 ms 2644 KB Output is correct
9 Correct 3 ms 2644 KB Output is correct
10 Correct 2 ms 2644 KB Output is correct
11 Correct 3 ms 2608 KB Output is correct
12 Correct 3 ms 2644 KB Output is correct
13 Correct 4 ms 2644 KB Output is correct
14 Correct 20 ms 3180 KB Output is correct
15 Correct 29 ms 3680 KB Output is correct
16 Correct 52 ms 4060 KB Output is correct
17 Correct 44 ms 4372 KB Output is correct
18 Correct 55 ms 4036 KB Output is correct
19 Correct 54 ms 4004 KB Output is correct
20 Correct 51 ms 4172 KB Output is correct
21 Correct 47 ms 4016 KB Output is correct
22 Correct 49 ms 4044 KB Output is correct
23 Correct 44 ms 4032 KB Output is correct
24 Correct 57 ms 4048 KB Output is correct
25 Correct 57 ms 4108 KB Output is correct
26 Correct 2 ms 2644 KB Output is correct
27 Correct 3 ms 2644 KB Output is correct
28 Correct 4 ms 2644 KB Output is correct
29 Correct 22 ms 3140 KB Output is correct
30 Correct 36 ms 3600 KB Output is correct
31 Correct 52 ms 4008 KB Output is correct
32 Correct 57 ms 3924 KB Output is correct
33 Correct 52 ms 3948 KB Output is correct
34 Correct 58 ms 3976 KB Output is correct
35 Correct 55 ms 4044 KB Output is correct
36 Correct 53 ms 3900 KB Output is correct
37 Correct 56 ms 3920 KB Output is correct
38 Correct 55 ms 4112 KB Output is correct
39 Correct 49 ms 4096 KB Output is correct
40 Correct 55 ms 3996 KB Output is correct
41 Correct 2 ms 2644 KB Output is correct
42 Correct 2 ms 2644 KB Output is correct
43 Correct 2 ms 2644 KB Output is correct
44 Correct 4 ms 2644 KB Output is correct
45 Correct 3 ms 2644 KB Output is correct
46 Correct 4 ms 2644 KB Output is correct
47 Correct 10 ms 2908 KB Output is correct
48 Correct 7 ms 2896 KB Output is correct
49 Correct 17 ms 3072 KB Output is correct
50 Correct 30 ms 3508 KB Output is correct
51 Correct 47 ms 3808 KB Output is correct
52 Correct 38 ms 3896 KB Output is correct
53 Correct 48 ms 3856 KB Output is correct
54 Correct 40 ms 3884 KB Output is correct
55 Correct 49 ms 3884 KB Output is correct
56 Correct 48 ms 3888 KB Output is correct
57 Correct 46 ms 3868 KB Output is correct
58 Correct 51 ms 3892 KB Output is correct
59 Correct 45 ms 3884 KB Output is correct
60 Correct 40 ms 3892 KB Output is correct
61 Correct 44 ms 3904 KB Output is correct
62 Correct 38 ms 3924 KB Output is correct
63 Correct 44 ms 3888 KB Output is correct
64 Correct 43 ms 3876 KB Output is correct
65 Correct 43 ms 3888 KB Output is correct
66 Correct 40 ms 3892 KB Output is correct
67 Correct 42 ms 3868 KB Output is correct
68 Correct 40 ms 3916 KB Output is correct
69 Correct 43 ms 3892 KB Output is correct
70 Correct 38 ms 3844 KB Output is correct
71 Correct 6 ms 2896 KB Output is correct
72 Correct 8 ms 2916 KB Output is correct
73 Correct 7 ms 2904 KB Output is correct
74 Correct 6 ms 2900 KB Output is correct
75 Correct 6 ms 2868 KB Output is correct
76 Correct 9 ms 3012 KB Output is correct
77 Correct 10 ms 3028 KB Output is correct
78 Correct 13 ms 3008 KB Output is correct
79 Correct 9 ms 3112 KB Output is correct
80 Correct 14 ms 3068 KB Output is correct
81 Correct 18 ms 3528 KB Output is correct
82 Correct 19 ms 3520 KB Output is correct
83 Correct 19 ms 3456 KB Output is correct
84 Correct 18 ms 3492 KB Output is correct
85 Correct 20 ms 3496 KB Output is correct
86 Correct 18 ms 3540 KB Output is correct
87 Correct 19 ms 3660 KB Output is correct
88 Correct 18 ms 3532 KB Output is correct
89 Correct 19 ms 3464 KB Output is correct
90 Correct 20 ms 3616 KB Output is correct
91 Correct 29 ms 4144 KB Output is correct
92 Correct 30 ms 4244 KB Output is correct
93 Correct 29 ms 4252 KB Output is correct
94 Correct 35 ms 4132 KB Output is correct
95 Correct 27 ms 4204 KB Output is correct
96 Correct 31 ms 4696 KB Output is correct
97 Correct 30 ms 4572 KB Output is correct
98 Correct 33 ms 4556 KB Output is correct
99 Correct 33 ms 4564 KB Output is correct
100 Correct 37 ms 4680 KB Output is correct
101 Correct 34 ms 4636 KB Output is correct
102 Correct 33 ms 4756 KB Output is correct
103 Correct 37 ms 4648 KB Output is correct
104 Correct 32 ms 4548 KB Output is correct
105 Correct 38 ms 4680 KB Output is correct
106 Correct 35 ms 4832 KB Output is correct
107 Correct 44 ms 4752 KB Output is correct
108 Correct 37 ms 4852 KB Output is correct
109 Correct 31 ms 4864 KB Output is correct
110 Correct 33 ms 4928 KB Output is correct
111 Correct 35 ms 4936 KB Output is correct
112 Correct 32 ms 4960 KB Output is correct
113 Correct 35 ms 4796 KB Output is correct
114 Correct 38 ms 4956 KB Output is correct
115 Correct 38 ms 4960 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2772 KB Output is correct
2 Correct 2 ms 2644 KB Output is correct
3 Correct 3 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 2 ms 2644 KB Output is correct
6 Correct 2 ms 2644 KB Output is correct
7 Correct 3 ms 2644 KB Output is correct
8 Correct 2 ms 2644 KB Output is correct
9 Correct 3 ms 2644 KB Output is correct
10 Correct 2 ms 2644 KB Output is correct
11 Correct 3 ms 2608 KB Output is correct
12 Correct 3 ms 2644 KB Output is correct
13 Correct 4 ms 2644 KB Output is correct
14 Correct 20 ms 3180 KB Output is correct
15 Correct 29 ms 3680 KB Output is correct
16 Correct 52 ms 4060 KB Output is correct
17 Correct 44 ms 4372 KB Output is correct
18 Correct 55 ms 4036 KB Output is correct
19 Correct 54 ms 4004 KB Output is correct
20 Correct 51 ms 4172 KB Output is correct
21 Correct 47 ms 4016 KB Output is correct
22 Correct 49 ms 4044 KB Output is correct
23 Correct 44 ms 4032 KB Output is correct
24 Correct 57 ms 4048 KB Output is correct
25 Correct 57 ms 4108 KB Output is correct
26 Correct 2 ms 2644 KB Output is correct
27 Correct 3 ms 2644 KB Output is correct
28 Correct 4 ms 2644 KB Output is correct
29 Correct 22 ms 3140 KB Output is correct
30 Correct 36 ms 3600 KB Output is correct
31 Correct 52 ms 4008 KB Output is correct
32 Correct 57 ms 3924 KB Output is correct
33 Correct 52 ms 3948 KB Output is correct
34 Correct 58 ms 3976 KB Output is correct
35 Correct 55 ms 4044 KB Output is correct
36 Correct 53 ms 3900 KB Output is correct
37 Correct 56 ms 3920 KB Output is correct
38 Correct 55 ms 4112 KB Output is correct
39 Correct 49 ms 4096 KB Output is correct
40 Correct 55 ms 3996 KB Output is correct
41 Correct 2 ms 2644 KB Output is correct
42 Correct 2 ms 2644 KB Output is correct
43 Correct 2 ms 2644 KB Output is correct
44 Correct 4 ms 2644 KB Output is correct
45 Correct 3 ms 2644 KB Output is correct
46 Correct 4 ms 2644 KB Output is correct
47 Correct 10 ms 2908 KB Output is correct
48 Correct 7 ms 2896 KB Output is correct
49 Correct 17 ms 3072 KB Output is correct
50 Correct 30 ms 3508 KB Output is correct
51 Correct 47 ms 3808 KB Output is correct
52 Correct 38 ms 3896 KB Output is correct
53 Correct 48 ms 3856 KB Output is correct
54 Correct 40 ms 3884 KB Output is correct
55 Correct 49 ms 3884 KB Output is correct
56 Correct 48 ms 3888 KB Output is correct
57 Correct 46 ms 3868 KB Output is correct
58 Correct 51 ms 3892 KB Output is correct
59 Correct 45 ms 3884 KB Output is correct
60 Correct 40 ms 3892 KB Output is correct
61 Correct 44 ms 3904 KB Output is correct
62 Correct 38 ms 3924 KB Output is correct
63 Correct 44 ms 3888 KB Output is correct
64 Correct 43 ms 3876 KB Output is correct
65 Correct 43 ms 3888 KB Output is correct
66 Correct 40 ms 3892 KB Output is correct
67 Correct 42 ms 3868 KB Output is correct
68 Correct 40 ms 3916 KB Output is correct
69 Correct 43 ms 3892 KB Output is correct
70 Correct 38 ms 3844 KB Output is correct
71 Correct 6 ms 2896 KB Output is correct
72 Correct 8 ms 2916 KB Output is correct
73 Correct 7 ms 2904 KB Output is correct
74 Correct 6 ms 2900 KB Output is correct
75 Correct 6 ms 2868 KB Output is correct
76 Correct 9 ms 3012 KB Output is correct
77 Correct 10 ms 3028 KB Output is correct
78 Correct 13 ms 3008 KB Output is correct
79 Correct 9 ms 3112 KB Output is correct
80 Correct 14 ms 3068 KB Output is correct
81 Correct 18 ms 3528 KB Output is correct
82 Correct 19 ms 3520 KB Output is correct
83 Correct 19 ms 3456 KB Output is correct
84 Correct 18 ms 3492 KB Output is correct
85 Correct 20 ms 3496 KB Output is correct
86 Correct 18 ms 3540 KB Output is correct
87 Correct 19 ms 3660 KB Output is correct
88 Correct 18 ms 3532 KB Output is correct
89 Correct 19 ms 3464 KB Output is correct
90 Correct 20 ms 3616 KB Output is correct
91 Correct 29 ms 4144 KB Output is correct
92 Correct 30 ms 4244 KB Output is correct
93 Correct 29 ms 4252 KB Output is correct
94 Correct 35 ms 4132 KB Output is correct
95 Correct 27 ms 4204 KB Output is correct
96 Correct 31 ms 4696 KB Output is correct
97 Correct 30 ms 4572 KB Output is correct
98 Correct 33 ms 4556 KB Output is correct
99 Correct 33 ms 4564 KB Output is correct
100 Correct 37 ms 4680 KB Output is correct
101 Correct 34 ms 4636 KB Output is correct
102 Correct 33 ms 4756 KB Output is correct
103 Correct 37 ms 4648 KB Output is correct
104 Correct 32 ms 4548 KB Output is correct
105 Correct 38 ms 4680 KB Output is correct
106 Correct 35 ms 4832 KB Output is correct
107 Correct 44 ms 4752 KB Output is correct
108 Correct 37 ms 4852 KB Output is correct
109 Correct 31 ms 4864 KB Output is correct
110 Correct 33 ms 4928 KB Output is correct
111 Correct 35 ms 4936 KB Output is correct
112 Correct 32 ms 4960 KB Output is correct
113 Correct 35 ms 4796 KB Output is correct
114 Correct 38 ms 4956 KB Output is correct
115 Correct 38 ms 4960 KB Output is correct
116 Correct 2325 ms 6680 KB Output is correct
117 Correct 1761 ms 6684 KB Output is correct
118 Correct 2811 ms 6968 KB Output is correct
119 Correct 1035 ms 6968 KB Output is correct
120 Correct 566 ms 6836 KB Output is correct
121 Correct 960 ms 7160 KB Output is correct
122 Correct 533 ms 7136 KB Output is correct
123 Correct 1956 ms 7552 KB Output is correct
124 Correct 563 ms 7556 KB Output is correct
125 Correct 436 ms 7548 KB Output is correct
126 Correct 6740 ms 7808 KB Output is correct
127 Correct 6821 ms 9556 KB Output is correct
128 Correct 6726 ms 9524 KB Output is correct
129 Correct 6681 ms 9532 KB Output is correct
130 Correct 6671 ms 9528 KB Output is correct
131 Correct 5497 ms 9704 KB Output is correct
132 Correct 5496 ms 9700 KB Output is correct
133 Correct 5828 ms 9696 KB Output is correct
134 Correct 5692 ms 9696 KB Output is correct
135 Correct 5672 ms 9704 KB Output is correct
136 Correct 5282 ms 9700 KB Output is correct
137 Correct 5524 ms 9712 KB Output is correct
138 Correct 5220 ms 9692 KB Output is correct
139 Correct 5400 ms 9700 KB Output is correct
140 Correct 5353 ms 9692 KB Output is correct
141 Correct 3074 ms 9724 KB Output is correct
142 Correct 3242 ms 9728 KB Output is correct
143 Correct 3207 ms 9644 KB Output is correct
144 Correct 3157 ms 9732 KB Output is correct
145 Correct 3188 ms 9808 KB Output is correct
146 Correct 801 ms 9992 KB Output is correct
147 Correct 772 ms 9996 KB Output is correct
148 Correct 847 ms 10064 KB Output is correct
149 Correct 794 ms 9992 KB Output is correct
150 Correct 798 ms 10000 KB Output is correct
151 Correct 648 ms 9980 KB Output is correct
152 Correct 634 ms 10020 KB Output is correct
153 Correct 658 ms 10060 KB Output is correct
154 Correct 635 ms 10016 KB Output is correct
155 Correct 621 ms 10020 KB Output is correct
156 Correct 2706 ms 10388 KB Output is correct
157 Correct 2679 ms 10304 KB Output is correct
158 Correct 2818 ms 10296 KB Output is correct
159 Correct 2675 ms 10300 KB Output is correct
160 Correct 2722 ms 10300 KB Output is correct
161 Correct 2690 ms 10400 KB Output is correct
162 Correct 2775 ms 10404 KB Output is correct
163 Correct 2790 ms 10404 KB Output is correct
164 Correct 2777 ms 10444 KB Output is correct
165 Correct 2833 ms 10396 KB Output is correct
166 Correct 4808 ms 10192 KB Output is correct
167 Correct 4918 ms 10184 KB Output is correct
168 Correct 4970 ms 10188 KB Output is correct
169 Correct 4942 ms 10188 KB Output is correct
170 Correct 5038 ms 10180 KB Output is correct
171 Correct 6364 ms 10120 KB Output is correct
172 Correct 6254 ms 10136 KB Output is correct
173 Correct 6257 ms 10128 KB Output is correct
174 Correct 6171 ms 10120 KB Output is correct
175 Correct 6161 ms 10144 KB Output is correct