답안 #896580

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
896580 2024-01-01T17:14:28 Z tsumondai Diversity (CEOI21_diversity) C++14
100 / 100
872 ms 17348 KB
#include<bits/stdc++.h>
using namespace std;
 
#define int long long
#define fi first
#define se second
#define pb push_back
 
typedef pair<int, int> ii;
typedef pair<ii, int> iii;
typedef pair<ii, ii> iiii;
 
const int N = 4e5 + 5;
 
const int oo = 1e18 + 7, mod = 1e9 + 7;
 
int n, q, a[N];
 
int cnt[N];
 
int cntt[N];
 
int S = 500;
 
bool cmp(iii a, iii b){
    if(a.fi.fi / S != b.fi.fi / S) return (a.fi.fi / S < b.fi.fi / S);
    else{
        if(!((a.fi.fi / S) & 1)) return (a.fi.se < b.fi.se);
        else return (a.fi.se > b.fi.se);
    }
}
 
vector<iii> queries;
vector<int> big;
set<int> se;
 
void ins(int pos){
    cntt[cnt[a[pos]]]--;
    cnt[a[pos]]++;
    //cout << a[pos] << " " << cnt[a[pos]] << "\n";
    cntt[cnt[a[pos]]]++;
}
 
void er(int pos){
    cntt[cnt[a[pos]]]--;
    cnt[a[pos]]--;
    //cout << a[pos] << " " << cnt[a[pos]] << "\n";
    cntt[cnt[a[pos]]]++;
}
 
int answer[N];
 
void process(){
    cin >> n >> q;
    for(int i = 1; i <= n; i++){
        cin >> a[i];
        cnt[a[i]]++;
        //cnt[a[i]].fi++;
    }
    for(int i = 1; i <= 300000; i++) if(cnt[i] >= S) big.pb(i);
    for(int i = 1; i <= 300000; i++) cnt[i] = 0;
    for(int i = 1; i <= q; i++){
        int l, r;
        cin >> l >> r;
        queries.pb({{l, r}, i});
    }   
    sort(queries.begin(), queries.end(), cmp);
    int lstl = 0, lstr = 0;
    bool ck = 1;
    for(int i = 0; i < q; i++){
        //sort(cnt + 1, cnt + 300000 + 1, greater<ii>());
        while(lstr < queries[i].fi.se){
            //ins(a[lstr]);
            lstr++;
            ins(lstr);
        }
        while(lstl > queries[i].fi.fi){
            lstl--;
            ins(lstl);
        }
        while(lstl < queries[i].fi.fi){
            if(lstl) er(lstl);
            lstl++;
        }
        while(lstr > queries[i].fi.se){
            er(lstr);
            lstr--;
        }
        if(!ck) continue;
        //cout << lstl << " " << lstr << "\n";
        vector<ii> vc1, vc2;
        int total = 0;
        for(int it = 1; it < S; it++){
            if(!cntt[it]) continue;
            int temp1 = (cntt[it] + 1) / 2, temp2 = cntt[it] / 2;
            if(!(total & 1)){
                if(temp1) vc1.pb({it, temp1});
                if(temp2) vc2.pb({it, temp2});
            }
            else{
                if(temp2) vc1.pb({it, temp2});
                if(temp1) vc2.pb({it, temp1});
            }
            total += cntt[it];
        }
        set<int> uos;
        for(auto it : big){
            if(cnt[it] < S) continue;
            //if(uos.find(cnt[it]) != uos.end()) continue;
            uos.insert(cnt[it]);
        }
        for(auto it : uos){
            int temp1 = (cntt[it] + 1) / 2, temp2 = cntt[it] / 2;
            if(!(total & 1)){
                if(temp1) vc1.pb({it, temp1});
                if(temp2) vc2.pb({it, temp2});
            }
            else{
                if(temp2) vc1.pb({it, temp2});
                if(temp1) vc2.pb({it, temp1});
            }
            total += cntt[it];
		}
        //sort(vc1.begin(), vc1.end()), sort(vc2.begin(), vc2.end());
        //for(int j = 1; j <= 5; j++) cout << j << " " << cnt[j] << "\n";
        for(int j = vc2.size() - 1; j >= 0; j--) vc1.pb(vc2[j]);
        //for(auto it : vc1) if(lstl == 1 && lstr == 8) cout << it.fi << " " << it.se << "\n";
        int tol = 0, tol2 = 0, toll = 1;
        for(auto it : vc1){
            //cout << lstl << " " << lstr << " " << it.fi << " " << it.se << "\n";
            int temp = ((it.se * (it.se + 1) * (2 * it.se + 1)) / 6 + (it.se * (it.se + 1)) / 2) / 2 - it.se;
            temp = temp * it.fi * it.fi + toll * it.fi * it.se;
            temp += it.se * (it.fi * (it.fi - 1) / 2);
            temp += tol * ((it.se * (it.se - 1)) / 2) * it.fi;
            toll += ((it.se * (it.se + 1)) / 2) * it.fi + tol * (it.se - 1);
            tol += it.fi * it.se;
            toll += tol;
            tol2 += temp;
        }
        answer[queries[i].se] = tol2;
        //if(!(i % 1000) && (long double)clock() / (long double)CLOCKS_PER_SEC >= 3.0) ck = 0;
    }
    for(int i = 1; i <= q; i++) cout << answer[i] << "\n";
}
 
signed main(){
    ios_base::sync_with_stdio(0);
    //freopen("diverse.inp", "r", stdin);
    //freopen("diverse.out", "w", stdout);
    process();
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 8540 KB Output is correct
2 Correct 2 ms 8540 KB Output is correct
3 Correct 2 ms 8540 KB Output is correct
4 Correct 2 ms 8660 KB Output is correct
5 Correct 2 ms 8540 KB Output is correct
6 Correct 2 ms 8540 KB Output is correct
7 Correct 2 ms 8540 KB Output is correct
8 Correct 2 ms 8540 KB Output is correct
9 Correct 2 ms 8660 KB Output is correct
10 Correct 2 ms 8540 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 8540 KB Output is correct
2 Correct 2 ms 8536 KB Output is correct
3 Correct 2 ms 8540 KB Output is correct
4 Correct 6 ms 8796 KB Output is correct
5 Correct 11 ms 11096 KB Output is correct
6 Correct 20 ms 11356 KB Output is correct
7 Correct 19 ms 11080 KB Output is correct
8 Correct 20 ms 11088 KB Output is correct
9 Correct 15 ms 11096 KB Output is correct
10 Correct 16 ms 11356 KB Output is correct
11 Correct 16 ms 11356 KB Output is correct
12 Correct 16 ms 11128 KB Output is correct
13 Correct 16 ms 11356 KB Output is correct
14 Correct 18 ms 11352 KB Output is correct
15 Correct 16 ms 11356 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 8540 KB Output is correct
2 Correct 2 ms 8536 KB Output is correct
3 Correct 2 ms 8540 KB Output is correct
4 Correct 6 ms 8796 KB Output is correct
5 Correct 11 ms 11096 KB Output is correct
6 Correct 20 ms 11356 KB Output is correct
7 Correct 19 ms 11080 KB Output is correct
8 Correct 20 ms 11088 KB Output is correct
9 Correct 15 ms 11096 KB Output is correct
10 Correct 16 ms 11356 KB Output is correct
11 Correct 16 ms 11356 KB Output is correct
12 Correct 16 ms 11128 KB Output is correct
13 Correct 16 ms 11356 KB Output is correct
14 Correct 18 ms 11352 KB Output is correct
15 Correct 16 ms 11356 KB Output is correct
16 Correct 2 ms 8540 KB Output is correct
17 Correct 2 ms 8540 KB Output is correct
18 Correct 3 ms 8540 KB Output is correct
19 Correct 7 ms 8796 KB Output is correct
20 Correct 13 ms 11100 KB Output is correct
21 Correct 17 ms 11468 KB Output is correct
22 Correct 18 ms 11356 KB Output is correct
23 Correct 16 ms 11356 KB Output is correct
24 Correct 16 ms 11472 KB Output is correct
25 Correct 17 ms 11484 KB Output is correct
26 Correct 17 ms 11356 KB Output is correct
27 Correct 17 ms 11488 KB Output is correct
28 Correct 17 ms 11208 KB Output is correct
29 Correct 17 ms 11356 KB Output is correct
30 Correct 16 ms 11356 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 8540 KB Output is correct
2 Correct 2 ms 8536 KB Output is correct
3 Correct 2 ms 8540 KB Output is correct
4 Correct 6 ms 8796 KB Output is correct
5 Correct 11 ms 11096 KB Output is correct
6 Correct 20 ms 11356 KB Output is correct
7 Correct 19 ms 11080 KB Output is correct
8 Correct 20 ms 11088 KB Output is correct
9 Correct 15 ms 11096 KB Output is correct
10 Correct 16 ms 11356 KB Output is correct
11 Correct 16 ms 11356 KB Output is correct
12 Correct 16 ms 11128 KB Output is correct
13 Correct 16 ms 11356 KB Output is correct
14 Correct 18 ms 11352 KB Output is correct
15 Correct 16 ms 11356 KB Output is correct
16 Correct 2 ms 8540 KB Output is correct
17 Correct 2 ms 8540 KB Output is correct
18 Correct 3 ms 8540 KB Output is correct
19 Correct 7 ms 8796 KB Output is correct
20 Correct 13 ms 11100 KB Output is correct
21 Correct 17 ms 11468 KB Output is correct
22 Correct 18 ms 11356 KB Output is correct
23 Correct 16 ms 11356 KB Output is correct
24 Correct 16 ms 11472 KB Output is correct
25 Correct 17 ms 11484 KB Output is correct
26 Correct 17 ms 11356 KB Output is correct
27 Correct 17 ms 11488 KB Output is correct
28 Correct 17 ms 11208 KB Output is correct
29 Correct 17 ms 11356 KB Output is correct
30 Correct 16 ms 11356 KB Output is correct
31 Correct 2 ms 8540 KB Output is correct
32 Correct 3 ms 8540 KB Output is correct
33 Correct 2 ms 8540 KB Output is correct
34 Correct 3 ms 8696 KB Output is correct
35 Correct 2 ms 8536 KB Output is correct
36 Correct 3 ms 8540 KB Output is correct
37 Correct 5 ms 8796 KB Output is correct
38 Correct 5 ms 8780 KB Output is correct
39 Correct 8 ms 9032 KB Output is correct
40 Correct 14 ms 11484 KB Output is correct
41 Correct 19 ms 11744 KB Output is correct
42 Correct 18 ms 11868 KB Output is correct
43 Correct 22 ms 11868 KB Output is correct
44 Correct 25 ms 11868 KB Output is correct
45 Correct 18 ms 11868 KB Output is correct
46 Correct 18 ms 11868 KB Output is correct
47 Correct 18 ms 11852 KB Output is correct
48 Correct 18 ms 11856 KB Output is correct
49 Correct 18 ms 11868 KB Output is correct
50 Correct 20 ms 11852 KB Output is correct
51 Correct 18 ms 11864 KB Output is correct
52 Correct 18 ms 12112 KB Output is correct
53 Correct 18 ms 11868 KB Output is correct
54 Correct 23 ms 12116 KB Output is correct
55 Correct 18 ms 11868 KB Output is correct
56 Correct 18 ms 11868 KB Output is correct
57 Correct 18 ms 11860 KB Output is correct
58 Correct 18 ms 11844 KB Output is correct
59 Correct 18 ms 11864 KB Output is correct
60 Correct 18 ms 11868 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 8540 KB Output is correct
2 Correct 2 ms 8540 KB Output is correct
3 Correct 2 ms 8540 KB Output is correct
4 Correct 2 ms 8660 KB Output is correct
5 Correct 2 ms 8540 KB Output is correct
6 Correct 2 ms 8540 KB Output is correct
7 Correct 2 ms 8540 KB Output is correct
8 Correct 2 ms 8540 KB Output is correct
9 Correct 2 ms 8660 KB Output is correct
10 Correct 2 ms 8540 KB Output is correct
11 Correct 2 ms 8540 KB Output is correct
12 Correct 2 ms 8536 KB Output is correct
13 Correct 2 ms 8540 KB Output is correct
14 Correct 6 ms 8796 KB Output is correct
15 Correct 11 ms 11096 KB Output is correct
16 Correct 20 ms 11356 KB Output is correct
17 Correct 19 ms 11080 KB Output is correct
18 Correct 20 ms 11088 KB Output is correct
19 Correct 15 ms 11096 KB Output is correct
20 Correct 16 ms 11356 KB Output is correct
21 Correct 16 ms 11356 KB Output is correct
22 Correct 16 ms 11128 KB Output is correct
23 Correct 16 ms 11356 KB Output is correct
24 Correct 18 ms 11352 KB Output is correct
25 Correct 16 ms 11356 KB Output is correct
26 Correct 2 ms 8540 KB Output is correct
27 Correct 2 ms 8540 KB Output is correct
28 Correct 3 ms 8540 KB Output is correct
29 Correct 7 ms 8796 KB Output is correct
30 Correct 13 ms 11100 KB Output is correct
31 Correct 17 ms 11468 KB Output is correct
32 Correct 18 ms 11356 KB Output is correct
33 Correct 16 ms 11356 KB Output is correct
34 Correct 16 ms 11472 KB Output is correct
35 Correct 17 ms 11484 KB Output is correct
36 Correct 17 ms 11356 KB Output is correct
37 Correct 17 ms 11488 KB Output is correct
38 Correct 17 ms 11208 KB Output is correct
39 Correct 17 ms 11356 KB Output is correct
40 Correct 16 ms 11356 KB Output is correct
41 Correct 2 ms 8540 KB Output is correct
42 Correct 3 ms 8540 KB Output is correct
43 Correct 2 ms 8540 KB Output is correct
44 Correct 3 ms 8696 KB Output is correct
45 Correct 2 ms 8536 KB Output is correct
46 Correct 3 ms 8540 KB Output is correct
47 Correct 5 ms 8796 KB Output is correct
48 Correct 5 ms 8780 KB Output is correct
49 Correct 8 ms 9032 KB Output is correct
50 Correct 14 ms 11484 KB Output is correct
51 Correct 19 ms 11744 KB Output is correct
52 Correct 18 ms 11868 KB Output is correct
53 Correct 22 ms 11868 KB Output is correct
54 Correct 25 ms 11868 KB Output is correct
55 Correct 18 ms 11868 KB Output is correct
56 Correct 18 ms 11868 KB Output is correct
57 Correct 18 ms 11852 KB Output is correct
58 Correct 18 ms 11856 KB Output is correct
59 Correct 18 ms 11868 KB Output is correct
60 Correct 20 ms 11852 KB Output is correct
61 Correct 18 ms 11864 KB Output is correct
62 Correct 18 ms 12112 KB Output is correct
63 Correct 18 ms 11868 KB Output is correct
64 Correct 23 ms 12116 KB Output is correct
65 Correct 18 ms 11868 KB Output is correct
66 Correct 18 ms 11868 KB Output is correct
67 Correct 18 ms 11860 KB Output is correct
68 Correct 18 ms 11844 KB Output is correct
69 Correct 18 ms 11864 KB Output is correct
70 Correct 18 ms 11868 KB Output is correct
71 Correct 5 ms 8796 KB Output is correct
72 Correct 5 ms 8796 KB Output is correct
73 Correct 7 ms 8796 KB Output is correct
74 Correct 5 ms 8796 KB Output is correct
75 Correct 5 ms 8796 KB Output is correct
76 Correct 8 ms 9052 KB Output is correct
77 Correct 8 ms 9052 KB Output is correct
78 Correct 8 ms 9048 KB Output is correct
79 Correct 9 ms 9048 KB Output is correct
80 Correct 8 ms 9136 KB Output is correct
81 Correct 14 ms 11480 KB Output is correct
82 Correct 13 ms 11612 KB Output is correct
83 Correct 13 ms 11612 KB Output is correct
84 Correct 15 ms 11604 KB Output is correct
85 Correct 15 ms 11676 KB Output is correct
86 Correct 15 ms 11604 KB Output is correct
87 Correct 15 ms 11608 KB Output is correct
88 Correct 17 ms 11600 KB Output is correct
89 Correct 16 ms 11612 KB Output is correct
90 Correct 15 ms 11728 KB Output is correct
91 Correct 21 ms 12368 KB Output is correct
92 Correct 26 ms 12380 KB Output is correct
93 Correct 21 ms 12372 KB Output is correct
94 Correct 21 ms 12380 KB Output is correct
95 Correct 26 ms 12492 KB Output is correct
96 Correct 23 ms 12368 KB Output is correct
97 Correct 24 ms 12380 KB Output is correct
98 Correct 24 ms 12380 KB Output is correct
99 Correct 24 ms 12380 KB Output is correct
100 Correct 23 ms 12368 KB Output is correct
101 Correct 23 ms 12372 KB Output is correct
102 Correct 23 ms 12360 KB Output is correct
103 Correct 28 ms 12376 KB Output is correct
104 Correct 25 ms 12488 KB Output is correct
105 Correct 24 ms 12488 KB Output is correct
106 Correct 24 ms 12636 KB Output is correct
107 Correct 24 ms 12636 KB Output is correct
108 Correct 24 ms 12636 KB Output is correct
109 Correct 28 ms 12496 KB Output is correct
110 Correct 24 ms 12628 KB Output is correct
111 Correct 24 ms 12636 KB Output is correct
112 Correct 35 ms 12612 KB Output is correct
113 Correct 26 ms 12624 KB Output is correct
114 Correct 24 ms 12624 KB Output is correct
115 Correct 24 ms 12888 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 8540 KB Output is correct
2 Correct 2 ms 8540 KB Output is correct
3 Correct 2 ms 8540 KB Output is correct
4 Correct 2 ms 8660 KB Output is correct
5 Correct 2 ms 8540 KB Output is correct
6 Correct 2 ms 8540 KB Output is correct
7 Correct 2 ms 8540 KB Output is correct
8 Correct 2 ms 8540 KB Output is correct
9 Correct 2 ms 8660 KB Output is correct
10 Correct 2 ms 8540 KB Output is correct
11 Correct 2 ms 8540 KB Output is correct
12 Correct 2 ms 8536 KB Output is correct
13 Correct 2 ms 8540 KB Output is correct
14 Correct 6 ms 8796 KB Output is correct
15 Correct 11 ms 11096 KB Output is correct
16 Correct 20 ms 11356 KB Output is correct
17 Correct 19 ms 11080 KB Output is correct
18 Correct 20 ms 11088 KB Output is correct
19 Correct 15 ms 11096 KB Output is correct
20 Correct 16 ms 11356 KB Output is correct
21 Correct 16 ms 11356 KB Output is correct
22 Correct 16 ms 11128 KB Output is correct
23 Correct 16 ms 11356 KB Output is correct
24 Correct 18 ms 11352 KB Output is correct
25 Correct 16 ms 11356 KB Output is correct
26 Correct 2 ms 8540 KB Output is correct
27 Correct 2 ms 8540 KB Output is correct
28 Correct 3 ms 8540 KB Output is correct
29 Correct 7 ms 8796 KB Output is correct
30 Correct 13 ms 11100 KB Output is correct
31 Correct 17 ms 11468 KB Output is correct
32 Correct 18 ms 11356 KB Output is correct
33 Correct 16 ms 11356 KB Output is correct
34 Correct 16 ms 11472 KB Output is correct
35 Correct 17 ms 11484 KB Output is correct
36 Correct 17 ms 11356 KB Output is correct
37 Correct 17 ms 11488 KB Output is correct
38 Correct 17 ms 11208 KB Output is correct
39 Correct 17 ms 11356 KB Output is correct
40 Correct 16 ms 11356 KB Output is correct
41 Correct 2 ms 8540 KB Output is correct
42 Correct 3 ms 8540 KB Output is correct
43 Correct 2 ms 8540 KB Output is correct
44 Correct 3 ms 8696 KB Output is correct
45 Correct 2 ms 8536 KB Output is correct
46 Correct 3 ms 8540 KB Output is correct
47 Correct 5 ms 8796 KB Output is correct
48 Correct 5 ms 8780 KB Output is correct
49 Correct 8 ms 9032 KB Output is correct
50 Correct 14 ms 11484 KB Output is correct
51 Correct 19 ms 11744 KB Output is correct
52 Correct 18 ms 11868 KB Output is correct
53 Correct 22 ms 11868 KB Output is correct
54 Correct 25 ms 11868 KB Output is correct
55 Correct 18 ms 11868 KB Output is correct
56 Correct 18 ms 11868 KB Output is correct
57 Correct 18 ms 11852 KB Output is correct
58 Correct 18 ms 11856 KB Output is correct
59 Correct 18 ms 11868 KB Output is correct
60 Correct 20 ms 11852 KB Output is correct
61 Correct 18 ms 11864 KB Output is correct
62 Correct 18 ms 12112 KB Output is correct
63 Correct 18 ms 11868 KB Output is correct
64 Correct 23 ms 12116 KB Output is correct
65 Correct 18 ms 11868 KB Output is correct
66 Correct 18 ms 11868 KB Output is correct
67 Correct 18 ms 11860 KB Output is correct
68 Correct 18 ms 11844 KB Output is correct
69 Correct 18 ms 11864 KB Output is correct
70 Correct 18 ms 11868 KB Output is correct
71 Correct 5 ms 8796 KB Output is correct
72 Correct 5 ms 8796 KB Output is correct
73 Correct 7 ms 8796 KB Output is correct
74 Correct 5 ms 8796 KB Output is correct
75 Correct 5 ms 8796 KB Output is correct
76 Correct 8 ms 9052 KB Output is correct
77 Correct 8 ms 9052 KB Output is correct
78 Correct 8 ms 9048 KB Output is correct
79 Correct 9 ms 9048 KB Output is correct
80 Correct 8 ms 9136 KB Output is correct
81 Correct 14 ms 11480 KB Output is correct
82 Correct 13 ms 11612 KB Output is correct
83 Correct 13 ms 11612 KB Output is correct
84 Correct 15 ms 11604 KB Output is correct
85 Correct 15 ms 11676 KB Output is correct
86 Correct 15 ms 11604 KB Output is correct
87 Correct 15 ms 11608 KB Output is correct
88 Correct 17 ms 11600 KB Output is correct
89 Correct 16 ms 11612 KB Output is correct
90 Correct 15 ms 11728 KB Output is correct
91 Correct 21 ms 12368 KB Output is correct
92 Correct 26 ms 12380 KB Output is correct
93 Correct 21 ms 12372 KB Output is correct
94 Correct 21 ms 12380 KB Output is correct
95 Correct 26 ms 12492 KB Output is correct
96 Correct 23 ms 12368 KB Output is correct
97 Correct 24 ms 12380 KB Output is correct
98 Correct 24 ms 12380 KB Output is correct
99 Correct 24 ms 12380 KB Output is correct
100 Correct 23 ms 12368 KB Output is correct
101 Correct 23 ms 12372 KB Output is correct
102 Correct 23 ms 12360 KB Output is correct
103 Correct 28 ms 12376 KB Output is correct
104 Correct 25 ms 12488 KB Output is correct
105 Correct 24 ms 12488 KB Output is correct
106 Correct 24 ms 12636 KB Output is correct
107 Correct 24 ms 12636 KB Output is correct
108 Correct 24 ms 12636 KB Output is correct
109 Correct 28 ms 12496 KB Output is correct
110 Correct 24 ms 12628 KB Output is correct
111 Correct 24 ms 12636 KB Output is correct
112 Correct 35 ms 12612 KB Output is correct
113 Correct 26 ms 12624 KB Output is correct
114 Correct 24 ms 12624 KB Output is correct
115 Correct 24 ms 12888 KB Output is correct
116 Correct 111 ms 12996 KB Output is correct
117 Correct 124 ms 12952 KB Output is correct
118 Correct 192 ms 13628 KB Output is correct
119 Correct 207 ms 13448 KB Output is correct
120 Correct 180 ms 13480 KB Output is correct
121 Correct 263 ms 13656 KB Output is correct
122 Correct 213 ms 13764 KB Output is correct
123 Correct 470 ms 16144 KB Output is correct
124 Correct 302 ms 16316 KB Output is correct
125 Correct 243 ms 16336 KB Output is correct
126 Correct 803 ms 16476 KB Output is correct
127 Correct 830 ms 16472 KB Output is correct
128 Correct 815 ms 16468 KB Output is correct
129 Correct 846 ms 16740 KB Output is correct
130 Correct 852 ms 16464 KB Output is correct
131 Correct 850 ms 16576 KB Output is correct
132 Correct 855 ms 16576 KB Output is correct
133 Correct 838 ms 16576 KB Output is correct
134 Correct 836 ms 16504 KB Output is correct
135 Correct 828 ms 16528 KB Output is correct
136 Correct 847 ms 16508 KB Output is correct
137 Correct 858 ms 16524 KB Output is correct
138 Correct 872 ms 16516 KB Output is correct
139 Correct 857 ms 16580 KB Output is correct
140 Correct 831 ms 16504 KB Output is correct
141 Correct 723 ms 16548 KB Output is correct
142 Correct 780 ms 16540 KB Output is correct
143 Correct 725 ms 16540 KB Output is correct
144 Correct 731 ms 16552 KB Output is correct
145 Correct 769 ms 16532 KB Output is correct
146 Correct 448 ms 16796 KB Output is correct
147 Correct 441 ms 16800 KB Output is correct
148 Correct 469 ms 16796 KB Output is correct
149 Correct 441 ms 16800 KB Output is correct
150 Correct 455 ms 16884 KB Output is correct
151 Correct 455 ms 16928 KB Output is correct
152 Correct 399 ms 16832 KB Output is correct
153 Correct 410 ms 16832 KB Output is correct
154 Correct 389 ms 16836 KB Output is correct
155 Correct 440 ms 16840 KB Output is correct
156 Correct 611 ms 17120 KB Output is correct
157 Correct 609 ms 17124 KB Output is correct
158 Correct 579 ms 17124 KB Output is correct
159 Correct 568 ms 17272 KB Output is correct
160 Correct 613 ms 17116 KB Output is correct
161 Correct 408 ms 17348 KB Output is correct
162 Correct 414 ms 17220 KB Output is correct
163 Correct 419 ms 17348 KB Output is correct
164 Correct 440 ms 17220 KB Output is correct
165 Correct 425 ms 17216 KB Output is correct
166 Correct 660 ms 17004 KB Output is correct
167 Correct 671 ms 16964 KB Output is correct
168 Correct 657 ms 17148 KB Output is correct
169 Correct 674 ms 17004 KB Output is correct
170 Correct 677 ms 17000 KB Output is correct
171 Correct 697 ms 17068 KB Output is correct
172 Correct 674 ms 16956 KB Output is correct
173 Correct 694 ms 16976 KB Output is correct
174 Correct 656 ms 17152 KB Output is correct
175 Correct 677 ms 17080 KB Output is correct