답안 #476950

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
476950 2021-09-29T09:55:09 Z MetalPower Diversity (CEOI21_diversity) C++14
100 / 100
2626 ms 7988 KB
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define pii pair<int, int>
#define fi first
#define se second

const int MX = 3e5 + 10;
const int SQ = 605;

struct queries{
	int l, r, id;

	bool operator < (queries& b) const{
		int _a = l / SQ, _b = b.l / SQ;
		return (_a < _b) || (_a == _b && r < b.r);
	}
};

vector<queries> q;

int N, Q, arr[MX];
int cnt[MX]; // number of values with freq i
int freq[MX];

ll ans[MX];

void upd(int p, int v){
	if(freq[p] < SQ) cnt[freq[p]]--;
	freq[p] += v;
	if(freq[p] < SQ) cnt[freq[p]]++;
}

vector<int> lg;
vector<pii> val;

void init(){

	val.clear();

	for(int j = 1; j < SQ; j++)
		val.push_back({j, cnt[j]});

	vector<int> temp;

	for(auto j : lg){
		if(freq[j] >= SQ){
			cnt[freq[j]]++;
			temp.push_back(freq[j]);
		}
	}

	sort(temp.begin(), temp.end());
	temp.resize(unique(temp.begin(), temp.end()) - temp.begin());

	for(auto j : temp){
		val.push_back({j, cnt[j]});
		cnt[j] = 0;
	}
}

ll sum(ll a, ll r, ll n){ // a^2 + (a + r)^2 + (a + 2r)^2 + ... (a + nr)^2
	return a * a * (n + 1) + a * r * n * (n + 1) + r * r * (n * (n + 1) * (n + n + 1) / 6);
}

ll solve(){

	int st = 1, _N = 0, _K = 0;
	int suml = 0, sumr = 0; 

	ll curr = 0;

	for(auto p : val){
		_N += p.fi * p.se;
		_K += p.se;
	}

	for(auto p : val){

		int l = (p.se + st) >> 1;
		int r = (p.se + 1 - st) >> 1;

		curr += sum(suml, p.fi, l - 1);
		curr += sum(_N - suml - p.fi, -p.fi, l - 1);

		curr += sum(sumr, p.fi, r - 1);
		curr += sum(_N - sumr - p.fi, -p.fi, r - 1);

		suml += p.fi * l;
		sumr += p.fi * r;

		st ^= p.se & 1;
	}

	return ((ll) _K * _N * (_N + 1) - (ll) _N * (_K - 1) - curr) >> 1;
}

void answer(){

	int l = 0, r = -1;

	for(auto p : q){
		while(r < p.r) upd(arr[++r], 1);
		while(r > p.r) upd(arr[r--], -1);
		while(l < p.l) upd(arr[l++], -1);
		while(l > p.l) upd(arr[--l], 1);
		init();
		ans[p.id] = solve();
	}
}

int tfreq[MX];

int main(){
	scanf("%d %d", &N, &Q);

	vector<int> cd;

	for(int i = 0; i < N; i++){
		cin >> arr[i];
		cd.push_back(arr[i]);
	}

	sort(cd.begin(), cd.end());
	cd.resize(unique(cd.begin(), cd.end()) - cd.begin());

	for(int i = 0; i < N; i++){
		arr[i] = lower_bound(cd.begin(), cd.end(), arr[i]) - cd.begin();
		tfreq[arr[i]]++;
	}

	for(int i = 0; i < N; i++){
		if(tfreq[i] >= SQ) 
			lg.push_back(i);
	}

	for(int i = 0; i < Q; i++){
		int l, r; cin >> l >> r;
		l--; r--;
		q.push_back({l, r, i});
	}

	sort(q.begin(), q.end());

	answer();

	for(int i = 0; i < Q; i++)
		cout << ans[i] << '\n';
}

Compilation message

diversity.cpp: In function 'int main()':
diversity.cpp:116:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  116 |  scanf("%d %d", &N, &Q);
      |  ~~~~~^~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 332 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 2 ms 332 KB Output is correct
4 Correct 0 ms 332 KB Output is correct
5 Correct 0 ms 332 KB Output is correct
6 Correct 0 ms 332 KB Output is correct
7 Correct 0 ms 332 KB Output is correct
8 Correct 1 ms 332 KB Output is correct
9 Correct 0 ms 332 KB Output is correct
10 Correct 0 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 332 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 3 ms 460 KB Output is correct
4 Correct 24 ms 1224 KB Output is correct
5 Correct 40 ms 1936 KB Output is correct
6 Correct 68 ms 3412 KB Output is correct
7 Correct 64 ms 3624 KB Output is correct
8 Correct 68 ms 3500 KB Output is correct
9 Correct 70 ms 3512 KB Output is correct
10 Correct 67 ms 3424 KB Output is correct
11 Correct 71 ms 3512 KB Output is correct
12 Correct 67 ms 3424 KB Output is correct
13 Correct 65 ms 3500 KB Output is correct
14 Correct 73 ms 3432 KB Output is correct
15 Correct 62 ms 3512 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 332 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 3 ms 460 KB Output is correct
4 Correct 24 ms 1224 KB Output is correct
5 Correct 40 ms 1936 KB Output is correct
6 Correct 68 ms 3412 KB Output is correct
7 Correct 64 ms 3624 KB Output is correct
8 Correct 68 ms 3500 KB Output is correct
9 Correct 70 ms 3512 KB Output is correct
10 Correct 67 ms 3424 KB Output is correct
11 Correct 71 ms 3512 KB Output is correct
12 Correct 67 ms 3424 KB Output is correct
13 Correct 65 ms 3500 KB Output is correct
14 Correct 73 ms 3432 KB Output is correct
15 Correct 62 ms 3512 KB Output is correct
16 Correct 0 ms 332 KB Output is correct
17 Correct 1 ms 332 KB Output is correct
18 Correct 3 ms 460 KB Output is correct
19 Correct 28 ms 1196 KB Output is correct
20 Correct 48 ms 2008 KB Output is correct
21 Correct 72 ms 3420 KB Output is correct
22 Correct 81 ms 3500 KB Output is correct
23 Correct 70 ms 3424 KB Output is correct
24 Correct 76 ms 3440 KB Output is correct
25 Correct 79 ms 3512 KB Output is correct
26 Correct 80 ms 3512 KB Output is correct
27 Correct 80 ms 3520 KB Output is correct
28 Correct 77 ms 3516 KB Output is correct
29 Correct 73 ms 3484 KB Output is correct
30 Correct 84 ms 3512 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 332 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 3 ms 460 KB Output is correct
4 Correct 24 ms 1224 KB Output is correct
5 Correct 40 ms 1936 KB Output is correct
6 Correct 68 ms 3412 KB Output is correct
7 Correct 64 ms 3624 KB Output is correct
8 Correct 68 ms 3500 KB Output is correct
9 Correct 70 ms 3512 KB Output is correct
10 Correct 67 ms 3424 KB Output is correct
11 Correct 71 ms 3512 KB Output is correct
12 Correct 67 ms 3424 KB Output is correct
13 Correct 65 ms 3500 KB Output is correct
14 Correct 73 ms 3432 KB Output is correct
15 Correct 62 ms 3512 KB Output is correct
16 Correct 0 ms 332 KB Output is correct
17 Correct 1 ms 332 KB Output is correct
18 Correct 3 ms 460 KB Output is correct
19 Correct 28 ms 1196 KB Output is correct
20 Correct 48 ms 2008 KB Output is correct
21 Correct 72 ms 3420 KB Output is correct
22 Correct 81 ms 3500 KB Output is correct
23 Correct 70 ms 3424 KB Output is correct
24 Correct 76 ms 3440 KB Output is correct
25 Correct 79 ms 3512 KB Output is correct
26 Correct 80 ms 3512 KB Output is correct
27 Correct 80 ms 3520 KB Output is correct
28 Correct 77 ms 3516 KB Output is correct
29 Correct 73 ms 3484 KB Output is correct
30 Correct 84 ms 3512 KB Output is correct
31 Correct 1 ms 332 KB Output is correct
32 Correct 1 ms 332 KB Output is correct
33 Correct 1 ms 332 KB Output is correct
34 Correct 3 ms 460 KB Output is correct
35 Correct 5 ms 460 KB Output is correct
36 Correct 4 ms 460 KB Output is correct
37 Correct 19 ms 764 KB Output is correct
38 Correct 20 ms 840 KB Output is correct
39 Correct 38 ms 1212 KB Output is correct
40 Correct 81 ms 1940 KB Output is correct
41 Correct 110 ms 3456 KB Output is correct
42 Correct 110 ms 3504 KB Output is correct
43 Correct 107 ms 3512 KB Output is correct
44 Correct 113 ms 3428 KB Output is correct
45 Correct 114 ms 3524 KB Output is correct
46 Correct 107 ms 3456 KB Output is correct
47 Correct 108 ms 3512 KB Output is correct
48 Correct 110 ms 3440 KB Output is correct
49 Correct 112 ms 3428 KB Output is correct
50 Correct 109 ms 3480 KB Output is correct
51 Correct 107 ms 3508 KB Output is correct
52 Correct 109 ms 3416 KB Output is correct
53 Correct 106 ms 3448 KB Output is correct
54 Correct 116 ms 3480 KB Output is correct
55 Correct 116 ms 3500 KB Output is correct
56 Correct 107 ms 3508 KB Output is correct
57 Correct 120 ms 3480 KB Output is correct
58 Correct 113 ms 3480 KB Output is correct
59 Correct 116 ms 3636 KB Output is correct
60 Correct 112 ms 3512 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 332 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 2 ms 332 KB Output is correct
4 Correct 0 ms 332 KB Output is correct
5 Correct 0 ms 332 KB Output is correct
6 Correct 0 ms 332 KB Output is correct
7 Correct 0 ms 332 KB Output is correct
8 Correct 1 ms 332 KB Output is correct
9 Correct 0 ms 332 KB Output is correct
10 Correct 0 ms 332 KB Output is correct
11 Correct 0 ms 332 KB Output is correct
12 Correct 1 ms 332 KB Output is correct
13 Correct 3 ms 460 KB Output is correct
14 Correct 24 ms 1224 KB Output is correct
15 Correct 40 ms 1936 KB Output is correct
16 Correct 68 ms 3412 KB Output is correct
17 Correct 64 ms 3624 KB Output is correct
18 Correct 68 ms 3500 KB Output is correct
19 Correct 70 ms 3512 KB Output is correct
20 Correct 67 ms 3424 KB Output is correct
21 Correct 71 ms 3512 KB Output is correct
22 Correct 67 ms 3424 KB Output is correct
23 Correct 65 ms 3500 KB Output is correct
24 Correct 73 ms 3432 KB Output is correct
25 Correct 62 ms 3512 KB Output is correct
26 Correct 0 ms 332 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
28 Correct 3 ms 460 KB Output is correct
29 Correct 28 ms 1196 KB Output is correct
30 Correct 48 ms 2008 KB Output is correct
31 Correct 72 ms 3420 KB Output is correct
32 Correct 81 ms 3500 KB Output is correct
33 Correct 70 ms 3424 KB Output is correct
34 Correct 76 ms 3440 KB Output is correct
35 Correct 79 ms 3512 KB Output is correct
36 Correct 80 ms 3512 KB Output is correct
37 Correct 80 ms 3520 KB Output is correct
38 Correct 77 ms 3516 KB Output is correct
39 Correct 73 ms 3484 KB Output is correct
40 Correct 84 ms 3512 KB Output is correct
41 Correct 1 ms 332 KB Output is correct
42 Correct 1 ms 332 KB Output is correct
43 Correct 1 ms 332 KB Output is correct
44 Correct 3 ms 460 KB Output is correct
45 Correct 5 ms 460 KB Output is correct
46 Correct 4 ms 460 KB Output is correct
47 Correct 19 ms 764 KB Output is correct
48 Correct 20 ms 840 KB Output is correct
49 Correct 38 ms 1212 KB Output is correct
50 Correct 81 ms 1940 KB Output is correct
51 Correct 110 ms 3456 KB Output is correct
52 Correct 110 ms 3504 KB Output is correct
53 Correct 107 ms 3512 KB Output is correct
54 Correct 113 ms 3428 KB Output is correct
55 Correct 114 ms 3524 KB Output is correct
56 Correct 107 ms 3456 KB Output is correct
57 Correct 108 ms 3512 KB Output is correct
58 Correct 110 ms 3440 KB Output is correct
59 Correct 112 ms 3428 KB Output is correct
60 Correct 109 ms 3480 KB Output is correct
61 Correct 107 ms 3508 KB Output is correct
62 Correct 109 ms 3416 KB Output is correct
63 Correct 106 ms 3448 KB Output is correct
64 Correct 116 ms 3480 KB Output is correct
65 Correct 116 ms 3500 KB Output is correct
66 Correct 107 ms 3508 KB Output is correct
67 Correct 120 ms 3480 KB Output is correct
68 Correct 113 ms 3480 KB Output is correct
69 Correct 116 ms 3636 KB Output is correct
70 Correct 112 ms 3512 KB Output is correct
71 Correct 20 ms 836 KB Output is correct
72 Correct 20 ms 844 KB Output is correct
73 Correct 20 ms 844 KB Output is correct
74 Correct 20 ms 852 KB Output is correct
75 Correct 21 ms 852 KB Output is correct
76 Correct 42 ms 1232 KB Output is correct
77 Correct 42 ms 1724 KB Output is correct
78 Correct 42 ms 1688 KB Output is correct
79 Correct 43 ms 1608 KB Output is correct
80 Correct 42 ms 1704 KB Output is correct
81 Correct 90 ms 3080 KB Output is correct
82 Correct 91 ms 3020 KB Output is correct
83 Correct 89 ms 3008 KB Output is correct
84 Correct 95 ms 2920 KB Output is correct
85 Correct 89 ms 2996 KB Output is correct
86 Correct 99 ms 3116 KB Output is correct
87 Correct 100 ms 3216 KB Output is correct
88 Correct 97 ms 3148 KB Output is correct
89 Correct 94 ms 3180 KB Output is correct
90 Correct 93 ms 3164 KB Output is correct
91 Correct 161 ms 5260 KB Output is correct
92 Correct 165 ms 5200 KB Output is correct
93 Correct 164 ms 5352 KB Output is correct
94 Correct 162 ms 5268 KB Output is correct
95 Correct 158 ms 5168 KB Output is correct
96 Correct 173 ms 6156 KB Output is correct
97 Correct 176 ms 6172 KB Output is correct
98 Correct 178 ms 6192 KB Output is correct
99 Correct 176 ms 6264 KB Output is correct
100 Correct 179 ms 6216 KB Output is correct
101 Correct 174 ms 6248 KB Output is correct
102 Correct 184 ms 6188 KB Output is correct
103 Correct 181 ms 6280 KB Output is correct
104 Correct 177 ms 6204 KB Output is correct
105 Correct 175 ms 6340 KB Output is correct
106 Correct 180 ms 6748 KB Output is correct
107 Correct 179 ms 6548 KB Output is correct
108 Correct 183 ms 6560 KB Output is correct
109 Correct 176 ms 6592 KB Output is correct
110 Correct 177 ms 6576 KB Output is correct
111 Correct 177 ms 6636 KB Output is correct
112 Correct 177 ms 6564 KB Output is correct
113 Correct 176 ms 6576 KB Output is correct
114 Correct 180 ms 6564 KB Output is correct
115 Correct 180 ms 6608 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 332 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 2 ms 332 KB Output is correct
4 Correct 0 ms 332 KB Output is correct
5 Correct 0 ms 332 KB Output is correct
6 Correct 0 ms 332 KB Output is correct
7 Correct 0 ms 332 KB Output is correct
8 Correct 1 ms 332 KB Output is correct
9 Correct 0 ms 332 KB Output is correct
10 Correct 0 ms 332 KB Output is correct
11 Correct 0 ms 332 KB Output is correct
12 Correct 1 ms 332 KB Output is correct
13 Correct 3 ms 460 KB Output is correct
14 Correct 24 ms 1224 KB Output is correct
15 Correct 40 ms 1936 KB Output is correct
16 Correct 68 ms 3412 KB Output is correct
17 Correct 64 ms 3624 KB Output is correct
18 Correct 68 ms 3500 KB Output is correct
19 Correct 70 ms 3512 KB Output is correct
20 Correct 67 ms 3424 KB Output is correct
21 Correct 71 ms 3512 KB Output is correct
22 Correct 67 ms 3424 KB Output is correct
23 Correct 65 ms 3500 KB Output is correct
24 Correct 73 ms 3432 KB Output is correct
25 Correct 62 ms 3512 KB Output is correct
26 Correct 0 ms 332 KB Output is correct
27 Correct 1 ms 332 KB Output is correct
28 Correct 3 ms 460 KB Output is correct
29 Correct 28 ms 1196 KB Output is correct
30 Correct 48 ms 2008 KB Output is correct
31 Correct 72 ms 3420 KB Output is correct
32 Correct 81 ms 3500 KB Output is correct
33 Correct 70 ms 3424 KB Output is correct
34 Correct 76 ms 3440 KB Output is correct
35 Correct 79 ms 3512 KB Output is correct
36 Correct 80 ms 3512 KB Output is correct
37 Correct 80 ms 3520 KB Output is correct
38 Correct 77 ms 3516 KB Output is correct
39 Correct 73 ms 3484 KB Output is correct
40 Correct 84 ms 3512 KB Output is correct
41 Correct 1 ms 332 KB Output is correct
42 Correct 1 ms 332 KB Output is correct
43 Correct 1 ms 332 KB Output is correct
44 Correct 3 ms 460 KB Output is correct
45 Correct 5 ms 460 KB Output is correct
46 Correct 4 ms 460 KB Output is correct
47 Correct 19 ms 764 KB Output is correct
48 Correct 20 ms 840 KB Output is correct
49 Correct 38 ms 1212 KB Output is correct
50 Correct 81 ms 1940 KB Output is correct
51 Correct 110 ms 3456 KB Output is correct
52 Correct 110 ms 3504 KB Output is correct
53 Correct 107 ms 3512 KB Output is correct
54 Correct 113 ms 3428 KB Output is correct
55 Correct 114 ms 3524 KB Output is correct
56 Correct 107 ms 3456 KB Output is correct
57 Correct 108 ms 3512 KB Output is correct
58 Correct 110 ms 3440 KB Output is correct
59 Correct 112 ms 3428 KB Output is correct
60 Correct 109 ms 3480 KB Output is correct
61 Correct 107 ms 3508 KB Output is correct
62 Correct 109 ms 3416 KB Output is correct
63 Correct 106 ms 3448 KB Output is correct
64 Correct 116 ms 3480 KB Output is correct
65 Correct 116 ms 3500 KB Output is correct
66 Correct 107 ms 3508 KB Output is correct
67 Correct 120 ms 3480 KB Output is correct
68 Correct 113 ms 3480 KB Output is correct
69 Correct 116 ms 3636 KB Output is correct
70 Correct 112 ms 3512 KB Output is correct
71 Correct 20 ms 836 KB Output is correct
72 Correct 20 ms 844 KB Output is correct
73 Correct 20 ms 844 KB Output is correct
74 Correct 20 ms 852 KB Output is correct
75 Correct 21 ms 852 KB Output is correct
76 Correct 42 ms 1232 KB Output is correct
77 Correct 42 ms 1724 KB Output is correct
78 Correct 42 ms 1688 KB Output is correct
79 Correct 43 ms 1608 KB Output is correct
80 Correct 42 ms 1704 KB Output is correct
81 Correct 90 ms 3080 KB Output is correct
82 Correct 91 ms 3020 KB Output is correct
83 Correct 89 ms 3008 KB Output is correct
84 Correct 95 ms 2920 KB Output is correct
85 Correct 89 ms 2996 KB Output is correct
86 Correct 99 ms 3116 KB Output is correct
87 Correct 100 ms 3216 KB Output is correct
88 Correct 97 ms 3148 KB Output is correct
89 Correct 94 ms 3180 KB Output is correct
90 Correct 93 ms 3164 KB Output is correct
91 Correct 161 ms 5260 KB Output is correct
92 Correct 165 ms 5200 KB Output is correct
93 Correct 164 ms 5352 KB Output is correct
94 Correct 162 ms 5268 KB Output is correct
95 Correct 158 ms 5168 KB Output is correct
96 Correct 173 ms 6156 KB Output is correct
97 Correct 176 ms 6172 KB Output is correct
98 Correct 178 ms 6192 KB Output is correct
99 Correct 176 ms 6264 KB Output is correct
100 Correct 179 ms 6216 KB Output is correct
101 Correct 174 ms 6248 KB Output is correct
102 Correct 184 ms 6188 KB Output is correct
103 Correct 181 ms 6280 KB Output is correct
104 Correct 177 ms 6204 KB Output is correct
105 Correct 175 ms 6340 KB Output is correct
106 Correct 180 ms 6748 KB Output is correct
107 Correct 179 ms 6548 KB Output is correct
108 Correct 183 ms 6560 KB Output is correct
109 Correct 176 ms 6592 KB Output is correct
110 Correct 177 ms 6576 KB Output is correct
111 Correct 177 ms 6636 KB Output is correct
112 Correct 177 ms 6564 KB Output is correct
113 Correct 176 ms 6576 KB Output is correct
114 Correct 180 ms 6564 KB Output is correct
115 Correct 180 ms 6608 KB Output is correct
116 Correct 875 ms 2544 KB Output is correct
117 Correct 853 ms 2412 KB Output is correct
118 Correct 927 ms 3040 KB Output is correct
119 Correct 892 ms 3124 KB Output is correct
120 Correct 900 ms 3128 KB Output is correct
121 Correct 999 ms 4024 KB Output is correct
122 Correct 1006 ms 4016 KB Output is correct
123 Correct 1368 ms 5556 KB Output is correct
124 Correct 1416 ms 5884 KB Output is correct
125 Correct 1465 ms 5948 KB Output is correct
126 Correct 2212 ms 6668 KB Output is correct
127 Correct 2197 ms 6736 KB Output is correct
128 Correct 2205 ms 6772 KB Output is correct
129 Correct 2195 ms 6656 KB Output is correct
130 Correct 2187 ms 6656 KB Output is correct
131 Correct 2181 ms 6820 KB Output is correct
132 Correct 2169 ms 6928 KB Output is correct
133 Correct 2220 ms 6884 KB Output is correct
134 Correct 2194 ms 6884 KB Output is correct
135 Correct 2237 ms 6932 KB Output is correct
136 Correct 2178 ms 6832 KB Output is correct
137 Correct 2184 ms 6832 KB Output is correct
138 Correct 2168 ms 7088 KB Output is correct
139 Correct 2183 ms 6704 KB Output is correct
140 Correct 2181 ms 6936 KB Output is correct
141 Correct 1984 ms 6856 KB Output is correct
142 Correct 2021 ms 6824 KB Output is correct
143 Correct 2009 ms 6852 KB Output is correct
144 Correct 2001 ms 6984 KB Output is correct
145 Correct 1985 ms 6852 KB Output is correct
146 Correct 1984 ms 7216 KB Output is correct
147 Correct 1988 ms 7248 KB Output is correct
148 Correct 1987 ms 7140 KB Output is correct
149 Correct 1975 ms 7240 KB Output is correct
150 Correct 1990 ms 7132 KB Output is correct
151 Correct 2163 ms 7216 KB Output is correct
152 Correct 2155 ms 7208 KB Output is correct
153 Correct 2120 ms 7204 KB Output is correct
154 Correct 2123 ms 7204 KB Output is correct
155 Correct 2104 ms 7216 KB Output is correct
156 Correct 2384 ms 7988 KB Output is correct
157 Correct 2366 ms 7960 KB Output is correct
158 Correct 2373 ms 7864 KB Output is correct
159 Correct 2363 ms 7880 KB Output is correct
160 Correct 2363 ms 7868 KB Output is correct
161 Correct 2581 ms 7936 KB Output is correct
162 Correct 2626 ms 7876 KB Output is correct
163 Correct 2587 ms 7884 KB Output is correct
164 Correct 2611 ms 7860 KB Output is correct
165 Correct 2623 ms 7828 KB Output is correct
166 Correct 2289 ms 7368 KB Output is correct
167 Correct 2294 ms 7308 KB Output is correct
168 Correct 2286 ms 7344 KB Output is correct
169 Correct 2304 ms 7600 KB Output is correct
170 Correct 2296 ms 7472 KB Output is correct
171 Correct 2275 ms 7360 KB Output is correct
172 Correct 2255 ms 7280 KB Output is correct
173 Correct 2252 ms 7296 KB Output is correct
174 Correct 2252 ms 7368 KB Output is correct
175 Correct 2293 ms 7320 KB Output is correct