답안 #725333

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
725333 2023-04-17T09:49:32 Z Rafi22 Diversity (CEOI21_diversity) C++14
100 / 100
3096 ms 10088 KB
#include <bits/stdc++.h>
 
using namespace std;
 
#define endl '\n'
#define st first
#define nd second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define ll long long
#define ld long double
ll mod=1000000007;
int inf=1000000007;
ll infl=1000000000000000007;
 
const int N=300007;
 
int a[N];
int ile[N];
int cnt[N];
 
struct qry
{
    int l,r,i;
};
 
const int S=sqrt(300000);
 
bool cmp(qry l,qry r)
{
    if(l.l/S==r.l/S) return l.r<r.r;
    return l.l/S<r.l/S;
}
 
 
ll ans[N];
bool was[N];
 
ll pref[N];
 
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n,q;
    cin>>n>>q;
    for(int i=1;i<=n;i++) pref[i]=pref[i-1]+(ll)i*(ll)(i+1)/2;
    for(int i=1;i<=n;i++) cin>>a[i];
    vector<qry>Q;
    for(int i=1;i<=q;i++)
    {
        int l,r;
        cin>>l>>r;
        Q.pb({l,r,i});
    }
    sort(all(Q),cmp);
    vector<int>is;
    int l=1,r=0;
    for(auto x:Q)
    {
        while(r<x.r)
        {
            r++;
            cnt[ile[a[r]]]--;
            ile[a[r]]++;
            cnt[ile[a[r]]]++;
            is.pb(ile[a[r]]);
        }
        while(r>x.r)
        {
            cnt[ile[a[r]]]--;
            ile[a[r]]--;
            cnt[ile[a[r]]]++;
            is.pb(ile[a[r]]);
            r--;
        }
        while(l>x.l)
        {
            l--;
            cnt[ile[a[l]]]--;
            ile[a[l]]++;
            cnt[ile[a[l]]]++;
            is.pb(ile[a[l]]);
        }
        while(l<x.l)
        {
            cnt[ile[a[l]]]--;
            ile[a[l]]--;
            cnt[ile[a[l]]]++;
            is.pb(ile[a[l]]);
            l++;
        }
        vector<int>nis;
        for(auto i:is)
        {
            if(i==0||cnt[i]==0) continue;
            if(!was[i]) nis.pb(i);
            was[i]=1;
        }
        is=nis;
        sort(all(is));
        vector<pair<ll,ll>>V1,V2,V;
        int s=0;
        for(auto i:is)
        {
         //   cout<<i<<" "<<cnt[i]<<endl;
            was[i]=0;
            if(s%2==0)
            {
                V1.pb({cnt[i]/2+cnt[i]%2,i});
                if(cnt[i]>1) V2.pb({cnt[i]/2,i});
            }
            else
            {
                if(cnt[i]>1) V1.pb({cnt[i]/2,i});
                V2.pb({cnt[i]/2+cnt[i]%2,i});
            }
            s+=cnt[i];
        }
        for(auto i:V1) V.pb(i);
        reverse(all(V2));
        for(auto i:V2) V.pb(i);
        ll res=0,sum=0,S=0;
      //  cout<<x.i<<endl;
        for(auto x:V)
        {
         //   cout<<x.st<<" "<<x.nd<<" "<<res<<" "<<sum<<" "<<S<<endl;
            res+=x.st*x.nd*(x.nd+1)/2;
         //   cout<<res<<endl;
            res+=S*x.st*x.nd;
          //  cout<<res<<endl;
            res+=sum*(x.st)*(x.st+1)/2*x.nd;
         //   cout<<res<<endl;
            res+=(pref[x.st]-x.st)*x.nd*x.nd;
          //  cout<<res<<endl;
            S+=x.st*sum;
            S+=x.nd*x.st*(x.st+1)/2;
            sum+=x.st*x.nd;
        }
        ans[x.i]=res;
    }
    for(int i=1;i<=q;i++) cout<<ans[i]<<endl;
 
 
 
 
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 0 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 328 KB Output is correct
7 Correct 1 ms 328 KB Output is correct
8 Correct 1 ms 332 KB Output is correct
9 Correct 1 ms 328 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 596 KB Output is correct
4 Correct 12 ms 2408 KB Output is correct
5 Correct 15 ms 4424 KB Output is correct
6 Correct 30 ms 6832 KB Output is correct
7 Correct 22 ms 7108 KB Output is correct
8 Correct 21 ms 6776 KB Output is correct
9 Correct 21 ms 6788 KB Output is correct
10 Correct 27 ms 7000 KB Output is correct
11 Correct 23 ms 6932 KB Output is correct
12 Correct 21 ms 6856 KB Output is correct
13 Correct 24 ms 6868 KB Output is correct
14 Correct 22 ms 6836 KB Output is correct
15 Correct 24 ms 6944 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 596 KB Output is correct
4 Correct 12 ms 2408 KB Output is correct
5 Correct 15 ms 4424 KB Output is correct
6 Correct 30 ms 6832 KB Output is correct
7 Correct 22 ms 7108 KB Output is correct
8 Correct 21 ms 6776 KB Output is correct
9 Correct 21 ms 6788 KB Output is correct
10 Correct 27 ms 7000 KB Output is correct
11 Correct 23 ms 6932 KB Output is correct
12 Correct 21 ms 6856 KB Output is correct
13 Correct 24 ms 6868 KB Output is correct
14 Correct 22 ms 6836 KB Output is correct
15 Correct 24 ms 6944 KB Output is correct
16 Correct 1 ms 328 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 580 KB Output is correct
19 Correct 8 ms 2400 KB Output is correct
20 Correct 15 ms 4400 KB Output is correct
21 Correct 32 ms 6972 KB Output is correct
22 Correct 23 ms 6952 KB Output is correct
23 Correct 23 ms 6972 KB Output is correct
24 Correct 22 ms 6864 KB Output is correct
25 Correct 22 ms 6956 KB Output is correct
26 Correct 23 ms 6904 KB Output is correct
27 Correct 28 ms 6948 KB Output is correct
28 Correct 23 ms 6992 KB Output is correct
29 Correct 22 ms 6848 KB Output is correct
30 Correct 26 ms 6968 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 596 KB Output is correct
4 Correct 12 ms 2408 KB Output is correct
5 Correct 15 ms 4424 KB Output is correct
6 Correct 30 ms 6832 KB Output is correct
7 Correct 22 ms 7108 KB Output is correct
8 Correct 21 ms 6776 KB Output is correct
9 Correct 21 ms 6788 KB Output is correct
10 Correct 27 ms 7000 KB Output is correct
11 Correct 23 ms 6932 KB Output is correct
12 Correct 21 ms 6856 KB Output is correct
13 Correct 24 ms 6868 KB Output is correct
14 Correct 22 ms 6836 KB Output is correct
15 Correct 24 ms 6944 KB Output is correct
16 Correct 1 ms 328 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 580 KB Output is correct
19 Correct 8 ms 2400 KB Output is correct
20 Correct 15 ms 4400 KB Output is correct
21 Correct 32 ms 6972 KB Output is correct
22 Correct 23 ms 6952 KB Output is correct
23 Correct 23 ms 6972 KB Output is correct
24 Correct 22 ms 6864 KB Output is correct
25 Correct 22 ms 6956 KB Output is correct
26 Correct 23 ms 6904 KB Output is correct
27 Correct 28 ms 6948 KB Output is correct
28 Correct 23 ms 6992 KB Output is correct
29 Correct 22 ms 6848 KB Output is correct
30 Correct 26 ms 6968 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 1 ms 596 KB Output is correct
35 Correct 2 ms 596 KB Output is correct
36 Correct 2 ms 596 KB Output is correct
37 Correct 5 ms 1492 KB Output is correct
38 Correct 5 ms 1488 KB Output is correct
39 Correct 14 ms 2560 KB Output is correct
40 Correct 18 ms 4564 KB Output is correct
41 Correct 27 ms 7112 KB Output is correct
42 Correct 26 ms 7176 KB Output is correct
43 Correct 38 ms 7176 KB Output is correct
44 Correct 26 ms 7164 KB Output is correct
45 Correct 25 ms 7112 KB Output is correct
46 Correct 24 ms 7112 KB Output is correct
47 Correct 28 ms 7164 KB Output is correct
48 Correct 25 ms 7108 KB Output is correct
49 Correct 26 ms 7172 KB Output is correct
50 Correct 26 ms 7132 KB Output is correct
51 Correct 25 ms 7200 KB Output is correct
52 Correct 25 ms 7136 KB Output is correct
53 Correct 24 ms 7136 KB Output is correct
54 Correct 24 ms 7112 KB Output is correct
55 Correct 25 ms 7108 KB Output is correct
56 Correct 27 ms 7108 KB Output is correct
57 Correct 25 ms 7116 KB Output is correct
58 Correct 28 ms 7196 KB Output is correct
59 Correct 25 ms 7116 KB Output is correct
60 Correct 24 ms 7100 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 0 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 328 KB Output is correct
7 Correct 1 ms 328 KB Output is correct
8 Correct 1 ms 332 KB Output is correct
9 Correct 1 ms 328 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 596 KB Output is correct
14 Correct 12 ms 2408 KB Output is correct
15 Correct 15 ms 4424 KB Output is correct
16 Correct 30 ms 6832 KB Output is correct
17 Correct 22 ms 7108 KB Output is correct
18 Correct 21 ms 6776 KB Output is correct
19 Correct 21 ms 6788 KB Output is correct
20 Correct 27 ms 7000 KB Output is correct
21 Correct 23 ms 6932 KB Output is correct
22 Correct 21 ms 6856 KB Output is correct
23 Correct 24 ms 6868 KB Output is correct
24 Correct 22 ms 6836 KB Output is correct
25 Correct 24 ms 6944 KB Output is correct
26 Correct 1 ms 328 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 1 ms 580 KB Output is correct
29 Correct 8 ms 2400 KB Output is correct
30 Correct 15 ms 4400 KB Output is correct
31 Correct 32 ms 6972 KB Output is correct
32 Correct 23 ms 6952 KB Output is correct
33 Correct 23 ms 6972 KB Output is correct
34 Correct 22 ms 6864 KB Output is correct
35 Correct 22 ms 6956 KB Output is correct
36 Correct 23 ms 6904 KB Output is correct
37 Correct 28 ms 6948 KB Output is correct
38 Correct 23 ms 6992 KB Output is correct
39 Correct 22 ms 6848 KB Output is correct
40 Correct 26 ms 6968 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 1 ms 596 KB Output is correct
45 Correct 2 ms 596 KB Output is correct
46 Correct 2 ms 596 KB Output is correct
47 Correct 5 ms 1492 KB Output is correct
48 Correct 5 ms 1488 KB Output is correct
49 Correct 14 ms 2560 KB Output is correct
50 Correct 18 ms 4564 KB Output is correct
51 Correct 27 ms 7112 KB Output is correct
52 Correct 26 ms 7176 KB Output is correct
53 Correct 38 ms 7176 KB Output is correct
54 Correct 26 ms 7164 KB Output is correct
55 Correct 25 ms 7112 KB Output is correct
56 Correct 24 ms 7112 KB Output is correct
57 Correct 28 ms 7164 KB Output is correct
58 Correct 25 ms 7108 KB Output is correct
59 Correct 26 ms 7172 KB Output is correct
60 Correct 26 ms 7132 KB Output is correct
61 Correct 25 ms 7200 KB Output is correct
62 Correct 25 ms 7136 KB Output is correct
63 Correct 24 ms 7136 KB Output is correct
64 Correct 24 ms 7112 KB Output is correct
65 Correct 25 ms 7108 KB Output is correct
66 Correct 27 ms 7108 KB Output is correct
67 Correct 25 ms 7116 KB Output is correct
68 Correct 28 ms 7196 KB Output is correct
69 Correct 25 ms 7116 KB Output is correct
70 Correct 24 ms 7100 KB Output is correct
71 Correct 5 ms 1496 KB Output is correct
72 Correct 5 ms 1496 KB Output is correct
73 Correct 5 ms 1500 KB Output is correct
74 Correct 5 ms 1556 KB Output is correct
75 Correct 5 ms 1452 KB Output is correct
76 Correct 9 ms 2672 KB Output is correct
77 Correct 9 ms 2608 KB Output is correct
78 Correct 9 ms 2648 KB Output is correct
79 Correct 9 ms 2648 KB Output is correct
80 Correct 10 ms 2644 KB Output is correct
81 Correct 18 ms 4824 KB Output is correct
82 Correct 17 ms 4784 KB Output is correct
83 Correct 17 ms 4820 KB Output is correct
84 Correct 17 ms 4820 KB Output is correct
85 Correct 18 ms 4820 KB Output is correct
86 Correct 20 ms 4992 KB Output is correct
87 Correct 19 ms 4900 KB Output is correct
88 Correct 20 ms 4940 KB Output is correct
89 Correct 22 ms 4880 KB Output is correct
90 Correct 19 ms 4948 KB Output is correct
91 Correct 29 ms 8264 KB Output is correct
92 Correct 33 ms 8136 KB Output is correct
93 Correct 29 ms 8060 KB Output is correct
94 Correct 29 ms 8056 KB Output is correct
95 Correct 29 ms 8068 KB Output is correct
96 Correct 36 ms 8712 KB Output is correct
97 Correct 34 ms 8648 KB Output is correct
98 Correct 35 ms 8780 KB Output is correct
99 Correct 36 ms 8648 KB Output is correct
100 Correct 37 ms 8692 KB Output is correct
101 Correct 34 ms 8720 KB Output is correct
102 Correct 33 ms 8728 KB Output is correct
103 Correct 34 ms 8712 KB Output is correct
104 Correct 34 ms 8696 KB Output is correct
105 Correct 35 ms 8696 KB Output is correct
106 Correct 36 ms 8904 KB Output is correct
107 Correct 35 ms 8928 KB Output is correct
108 Correct 35 ms 8928 KB Output is correct
109 Correct 34 ms 8844 KB Output is correct
110 Correct 35 ms 8904 KB Output is correct
111 Correct 36 ms 8928 KB Output is correct
112 Correct 37 ms 8964 KB Output is correct
113 Correct 34 ms 8960 KB Output is correct
114 Correct 34 ms 8876 KB Output is correct
115 Correct 34 ms 9032 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 0 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 328 KB Output is correct
7 Correct 1 ms 328 KB Output is correct
8 Correct 1 ms 332 KB Output is correct
9 Correct 1 ms 328 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 596 KB Output is correct
14 Correct 12 ms 2408 KB Output is correct
15 Correct 15 ms 4424 KB Output is correct
16 Correct 30 ms 6832 KB Output is correct
17 Correct 22 ms 7108 KB Output is correct
18 Correct 21 ms 6776 KB Output is correct
19 Correct 21 ms 6788 KB Output is correct
20 Correct 27 ms 7000 KB Output is correct
21 Correct 23 ms 6932 KB Output is correct
22 Correct 21 ms 6856 KB Output is correct
23 Correct 24 ms 6868 KB Output is correct
24 Correct 22 ms 6836 KB Output is correct
25 Correct 24 ms 6944 KB Output is correct
26 Correct 1 ms 328 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 1 ms 580 KB Output is correct
29 Correct 8 ms 2400 KB Output is correct
30 Correct 15 ms 4400 KB Output is correct
31 Correct 32 ms 6972 KB Output is correct
32 Correct 23 ms 6952 KB Output is correct
33 Correct 23 ms 6972 KB Output is correct
34 Correct 22 ms 6864 KB Output is correct
35 Correct 22 ms 6956 KB Output is correct
36 Correct 23 ms 6904 KB Output is correct
37 Correct 28 ms 6948 KB Output is correct
38 Correct 23 ms 6992 KB Output is correct
39 Correct 22 ms 6848 KB Output is correct
40 Correct 26 ms 6968 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 1 ms 596 KB Output is correct
45 Correct 2 ms 596 KB Output is correct
46 Correct 2 ms 596 KB Output is correct
47 Correct 5 ms 1492 KB Output is correct
48 Correct 5 ms 1488 KB Output is correct
49 Correct 14 ms 2560 KB Output is correct
50 Correct 18 ms 4564 KB Output is correct
51 Correct 27 ms 7112 KB Output is correct
52 Correct 26 ms 7176 KB Output is correct
53 Correct 38 ms 7176 KB Output is correct
54 Correct 26 ms 7164 KB Output is correct
55 Correct 25 ms 7112 KB Output is correct
56 Correct 24 ms 7112 KB Output is correct
57 Correct 28 ms 7164 KB Output is correct
58 Correct 25 ms 7108 KB Output is correct
59 Correct 26 ms 7172 KB Output is correct
60 Correct 26 ms 7132 KB Output is correct
61 Correct 25 ms 7200 KB Output is correct
62 Correct 25 ms 7136 KB Output is correct
63 Correct 24 ms 7136 KB Output is correct
64 Correct 24 ms 7112 KB Output is correct
65 Correct 25 ms 7108 KB Output is correct
66 Correct 27 ms 7108 KB Output is correct
67 Correct 25 ms 7116 KB Output is correct
68 Correct 28 ms 7196 KB Output is correct
69 Correct 25 ms 7116 KB Output is correct
70 Correct 24 ms 7100 KB Output is correct
71 Correct 5 ms 1496 KB Output is correct
72 Correct 5 ms 1496 KB Output is correct
73 Correct 5 ms 1500 KB Output is correct
74 Correct 5 ms 1556 KB Output is correct
75 Correct 5 ms 1452 KB Output is correct
76 Correct 9 ms 2672 KB Output is correct
77 Correct 9 ms 2608 KB Output is correct
78 Correct 9 ms 2648 KB Output is correct
79 Correct 9 ms 2648 KB Output is correct
80 Correct 10 ms 2644 KB Output is correct
81 Correct 18 ms 4824 KB Output is correct
82 Correct 17 ms 4784 KB Output is correct
83 Correct 17 ms 4820 KB Output is correct
84 Correct 17 ms 4820 KB Output is correct
85 Correct 18 ms 4820 KB Output is correct
86 Correct 20 ms 4992 KB Output is correct
87 Correct 19 ms 4900 KB Output is correct
88 Correct 20 ms 4940 KB Output is correct
89 Correct 22 ms 4880 KB Output is correct
90 Correct 19 ms 4948 KB Output is correct
91 Correct 29 ms 8264 KB Output is correct
92 Correct 33 ms 8136 KB Output is correct
93 Correct 29 ms 8060 KB Output is correct
94 Correct 29 ms 8056 KB Output is correct
95 Correct 29 ms 8068 KB Output is correct
96 Correct 36 ms 8712 KB Output is correct
97 Correct 34 ms 8648 KB Output is correct
98 Correct 35 ms 8780 KB Output is correct
99 Correct 36 ms 8648 KB Output is correct
100 Correct 37 ms 8692 KB Output is correct
101 Correct 34 ms 8720 KB Output is correct
102 Correct 33 ms 8728 KB Output is correct
103 Correct 34 ms 8712 KB Output is correct
104 Correct 34 ms 8696 KB Output is correct
105 Correct 35 ms 8696 KB Output is correct
106 Correct 36 ms 8904 KB Output is correct
107 Correct 35 ms 8928 KB Output is correct
108 Correct 35 ms 8928 KB Output is correct
109 Correct 34 ms 8844 KB Output is correct
110 Correct 35 ms 8904 KB Output is correct
111 Correct 36 ms 8928 KB Output is correct
112 Correct 37 ms 8964 KB Output is correct
113 Correct 34 ms 8960 KB Output is correct
114 Correct 34 ms 8876 KB Output is correct
115 Correct 34 ms 9032 KB Output is correct
116 Correct 231 ms 2488 KB Output is correct
117 Correct 281 ms 2476 KB Output is correct
118 Correct 414 ms 3624 KB Output is correct
119 Correct 447 ms 3656 KB Output is correct
120 Correct 350 ms 3664 KB Output is correct
121 Correct 604 ms 4900 KB Output is correct
122 Correct 498 ms 4964 KB Output is correct
123 Correct 1329 ms 6888 KB Output is correct
124 Correct 968 ms 7200 KB Output is correct
125 Correct 988 ms 7336 KB Output is correct
126 Correct 2159 ms 9024 KB Output is correct
127 Correct 2169 ms 9048 KB Output is correct
128 Correct 2160 ms 9044 KB Output is correct
129 Correct 2182 ms 9024 KB Output is correct
130 Correct 2145 ms 9096 KB Output is correct
131 Correct 2373 ms 9148 KB Output is correct
132 Correct 2419 ms 9152 KB Output is correct
133 Correct 2474 ms 9116 KB Output is correct
134 Correct 2666 ms 9132 KB Output is correct
135 Correct 2405 ms 9144 KB Output is correct
136 Correct 2356 ms 9152 KB Output is correct
137 Correct 2363 ms 9032 KB Output is correct
138 Correct 2368 ms 9152 KB Output is correct
139 Correct 2347 ms 9060 KB Output is correct
140 Correct 2372 ms 9152 KB Output is correct
141 Correct 2247 ms 9152 KB Output is correct
142 Correct 2365 ms 9152 KB Output is correct
143 Correct 2420 ms 9168 KB Output is correct
144 Correct 2475 ms 9160 KB Output is correct
145 Correct 2458 ms 9164 KB Output is correct
146 Correct 1964 ms 9420 KB Output is correct
147 Correct 1911 ms 9396 KB Output is correct
148 Correct 1949 ms 9404 KB Output is correct
149 Correct 1974 ms 9416 KB Output is correct
150 Correct 1979 ms 9376 KB Output is correct
151 Correct 2033 ms 9416 KB Output is correct
152 Correct 2057 ms 9456 KB Output is correct
153 Correct 2031 ms 9468 KB Output is correct
154 Correct 2040 ms 9476 KB Output is correct
155 Correct 1869 ms 9408 KB Output is correct
156 Correct 2853 ms 9980 KB Output is correct
157 Correct 3000 ms 10088 KB Output is correct
158 Correct 3016 ms 9980 KB Output is correct
159 Correct 2957 ms 10004 KB Output is correct
160 Correct 3096 ms 9928 KB Output is correct
161 Correct 2490 ms 10084 KB Output is correct
162 Correct 2527 ms 10048 KB Output is correct
163 Correct 2390 ms 9980 KB Output is correct
164 Correct 2358 ms 10088 KB Output is correct
165 Correct 2338 ms 9964 KB Output is correct
166 Correct 2243 ms 9664 KB Output is correct
167 Correct 2259 ms 9652 KB Output is correct
168 Correct 2279 ms 9576 KB Output is correct
169 Correct 2254 ms 9668 KB Output is correct
170 Correct 2253 ms 9612 KB Output is correct
171 Correct 2155 ms 9692 KB Output is correct
172 Correct 2220 ms 9676 KB Output is correct
173 Correct 2263 ms 9728 KB Output is correct
174 Correct 2197 ms 9708 KB Output is correct
175 Correct 2148 ms 9716 KB Output is correct