답안 #889883

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
889883 2023-12-20T08:56:51 Z boris_mihov Council (JOI23_council) C++17
100 / 100
1171 ms 541724 KB
#include <algorithm>
#include <iostream>
#include <numeric>
#include <cassert>
#include <cstring>
#include <vector>
#include <bitset>

typedef long long llong;
const int MAXN = 300000 + 10;
const int MAXB = (1 << 20);
const int MAXM = 21;

int n, m;
int a[MAXN];
int cntMask[MAXB];
llong comb[MAXM][MAXM];
llong up[MAXB][MAXM][2];
llong down[MAXB][MAXM];
llong cntDown[MAXB];
int cnt[MAXB];

int zero, one, two;

void solve()
{
    for (int i = 0 ; i < m ; ++i)
    {
        if (cnt[i] >= n / 2 + 2) two |= (1 << i);
        else if (cnt[i] == n / 2 + 1) one |= (1 << i);
        else if (cnt[i] == n / 2) zero |= (1 << i);
    }

    // std::cout << "zero: " << std::bitset <12> (zero).to_string() << '\n';
    // std::cout << "one : " << std::bitset <12> (one).to_string() << '\n';
    // std::cout << "two : " << std::bitset <12> (two).to_string() << '\n';

    for (int i = 0 ; i <= m ; ++i)
    {   
        comb[i][0] = 1; 
    }

    for (int i = 1 ; i <= m ; ++i)
    {
        for (int j = 1 ; j <= i ; ++j)
        {
            comb[i][j] = comb[i - 1][j] + comb[i - 1][j - 1];
        }
    }

    for (int i = 1 ; i <= n ; ++i)
    {
        // std::cout << "increase: " << std::bitset <12> (((1 << m) - 1) ^ a[i]).to_string() << '\n';
        cntDown[((1 << m) - 1) ^ a[i]]++;
    }

    for (int mask = (1 << m) - 1 ; mask >= 0 ; --mask)
    {
        down[mask][m] = cntDown[mask];
        for (int bit = m - 1 ; bit >= 0 ; --bit)
        {
            if (mask & (1 << bit))
            {
                down[mask][bit] = down[mask][bit + 1];
            } else
            {
                down[mask][bit] = down[mask][bit + 1];
                down[mask][bit] += down[mask | (1 << bit)][bit + 1];
            }
        }
    }

    for (int mask = 0 ; mask < (1 << m) ; ++mask)
    {
        up[mask][0][m & 1] = down[mask][0];
    }

    
    for (int bit = m - 1 ; bit >= 0 ; --bit)
    {
        for (int mask = 0 ; mask < (1 << m) ; ++mask)
        {
            int myPop = __builtin_popcount(mask);
            // if (std::bitset <12> (mask).to_string() == "010001101110") std::cout << "count is: " << std::bitset <12> (mask).to_string() << " (" << myPop << ") = " << down[mask][0] << '\n';
            for (int pop = 0 ; pop <= myPop ; ++pop)
            {  
                up[mask][pop][bit & 1] = 0;
                if (mask & (1 << bit))
                {
                    if (pop > 0) up[mask][pop][bit & 1] += up[mask][pop - 1][(bit & 1) ^ 1];
                    up[mask][pop][bit & 1] += up[mask ^ (1 << bit)][pop][(bit & 1) ^ 1];
                } else
                {
                    up[mask][pop][bit & 1] = up[mask][pop][(bit & 1) ^ 1];
                }
            }
        }
    }

    for (int i = 1 ; i <= n ; ++i)
    {
        int answer = __builtin_popcount(two | (one & (~a[i])));
        int mask = (one & a[i]) | (zero & (~a[i]));
        int myAnd = __builtin_popcount(mask & (~a[i]));
        // std::cout << "answer: " << answer << '\n';
        // std::cout << "mask: " << std::bitset <12> (mask).to_string()  << '\n';
        // std::cout << "curr: " << std::bitset <12> (~a[i]).to_string()  << '\n';
        // std::cout << "and&: " << std::bitset <12> ((~a[i]) & mask).to_string()  << '\n';

        for (int pop = m ; pop >= 0 ; --pop)
        {
            // std::cout << "add?: " << pop << ": " << up[mask][pop][0] << ' ' << comb[myAnd][pop] << '\n';
            if (up[mask][pop][0] > comb[myAnd][pop])
            {
                answer += pop;
                break;
            }
        }

        std::cout << answer << '\n';
    }
}

void input()
{   
    std::cin >> n >> m;
    for (int i = 1 ; i <= n ; ++i)
    {
        for (int bit = m - 1 ; bit >= 0 ; --bit)
        {
            int curr;
            std::cin >> curr;

            a[i] <<= 1;
            a[i] |= curr;
            cnt[bit] += curr;
        }
    }
}

void fastIOI()
{
    std::ios_base :: sync_with_stdio(0);
    std::cout.tie(nullptr);
    std::cin.tie(nullptr);
}

int main()
{
    fastIOI();
    input();
    solve();

    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 8536 KB Output is correct
2 Correct 2 ms 12636 KB Output is correct
3 Correct 1 ms 8540 KB Output is correct
4 Correct 1 ms 8540 KB Output is correct
5 Correct 826 ms 525840 KB Output is correct
6 Correct 782 ms 520020 KB Output is correct
7 Correct 762 ms 523812 KB Output is correct
8 Correct 800 ms 527616 KB Output is correct
9 Correct 758 ms 527812 KB Output is correct
10 Correct 756 ms 525520 KB Output is correct
11 Correct 760 ms 525760 KB Output is correct
12 Correct 775 ms 527956 KB Output is correct
13 Correct 2 ms 8540 KB Output is correct
14 Correct 1 ms 8656 KB Output is correct
15 Correct 1 ms 8540 KB Output is correct
16 Correct 1 ms 8684 KB Output is correct
17 Correct 1 ms 8536 KB Output is correct
18 Correct 1 ms 8536 KB Output is correct
19 Correct 1 ms 8652 KB Output is correct
20 Correct 1 ms 8540 KB Output is correct
21 Correct 1 ms 8540 KB Output is correct
22 Correct 2 ms 10588 KB Output is correct
23 Correct 1 ms 8540 KB Output is correct
24 Correct 1 ms 8540 KB Output is correct
25 Correct 1 ms 8672 KB Output is correct
26 Correct 1 ms 8536 KB Output is correct
27 Correct 1 ms 8540 KB Output is correct
28 Correct 1 ms 8652 KB Output is correct
29 Correct 2 ms 8540 KB Output is correct
30 Correct 2 ms 10588 KB Output is correct
31 Correct 2 ms 10588 KB Output is correct
32 Correct 1 ms 8536 KB Output is correct
33 Correct 1 ms 8656 KB Output is correct
34 Correct 1 ms 8540 KB Output is correct
35 Correct 1 ms 8540 KB Output is correct
36 Correct 1 ms 8540 KB Output is correct
37 Correct 1 ms 8540 KB Output is correct
38 Correct 1 ms 8540 KB Output is correct
39 Correct 1 ms 10840 KB Output is correct
40 Correct 2 ms 10732 KB Output is correct
41 Correct 6 ms 18780 KB Output is correct
42 Correct 6 ms 18780 KB Output is correct
43 Correct 6 ms 18780 KB Output is correct
44 Correct 6 ms 18900 KB Output is correct
45 Correct 6 ms 18780 KB Output is correct
46 Correct 85 ms 76628 KB Output is correct
47 Correct 80 ms 74332 KB Output is correct
48 Correct 84 ms 76376 KB Output is correct
49 Correct 92 ms 76376 KB Output is correct
50 Correct 80 ms 76300 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 8536 KB Output is correct
2 Correct 2 ms 12636 KB Output is correct
3 Correct 1 ms 8540 KB Output is correct
4 Correct 1 ms 8540 KB Output is correct
5 Correct 826 ms 525840 KB Output is correct
6 Correct 782 ms 520020 KB Output is correct
7 Correct 762 ms 523812 KB Output is correct
8 Correct 800 ms 527616 KB Output is correct
9 Correct 758 ms 527812 KB Output is correct
10 Correct 756 ms 525520 KB Output is correct
11 Correct 760 ms 525760 KB Output is correct
12 Correct 775 ms 527956 KB Output is correct
13 Correct 2 ms 8540 KB Output is correct
14 Correct 1 ms 8656 KB Output is correct
15 Correct 1 ms 8540 KB Output is correct
16 Correct 1 ms 8684 KB Output is correct
17 Correct 1 ms 8536 KB Output is correct
18 Correct 1 ms 8536 KB Output is correct
19 Correct 1 ms 8652 KB Output is correct
20 Correct 1 ms 8540 KB Output is correct
21 Correct 1 ms 8540 KB Output is correct
22 Correct 2 ms 10588 KB Output is correct
23 Correct 1 ms 8540 KB Output is correct
24 Correct 1 ms 8540 KB Output is correct
25 Correct 1 ms 8672 KB Output is correct
26 Correct 1 ms 8536 KB Output is correct
27 Correct 1 ms 8540 KB Output is correct
28 Correct 1 ms 8652 KB Output is correct
29 Correct 2 ms 8540 KB Output is correct
30 Correct 2 ms 10588 KB Output is correct
31 Correct 2 ms 10588 KB Output is correct
32 Correct 1 ms 8536 KB Output is correct
33 Correct 1 ms 8656 KB Output is correct
34 Correct 1 ms 8540 KB Output is correct
35 Correct 1 ms 8540 KB Output is correct
36 Correct 1 ms 8540 KB Output is correct
37 Correct 1 ms 8540 KB Output is correct
38 Correct 1 ms 8540 KB Output is correct
39 Correct 1 ms 10840 KB Output is correct
40 Correct 2 ms 10732 KB Output is correct
41 Correct 6 ms 18780 KB Output is correct
42 Correct 6 ms 18780 KB Output is correct
43 Correct 6 ms 18780 KB Output is correct
44 Correct 6 ms 18900 KB Output is correct
45 Correct 6 ms 18780 KB Output is correct
46 Correct 85 ms 76628 KB Output is correct
47 Correct 80 ms 74332 KB Output is correct
48 Correct 84 ms 76376 KB Output is correct
49 Correct 92 ms 76376 KB Output is correct
50 Correct 80 ms 76300 KB Output is correct
51 Correct 771 ms 519764 KB Output is correct
52 Correct 785 ms 519748 KB Output is correct
53 Correct 776 ms 527996 KB Output is correct
54 Correct 783 ms 527944 KB Output is correct
55 Correct 2 ms 8540 KB Output is correct
56 Correct 82 ms 76380 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 8540 KB Output is correct
2 Correct 47 ms 10516 KB Output is correct
3 Correct 46 ms 10324 KB Output is correct
4 Correct 34 ms 10332 KB Output is correct
5 Correct 46 ms 10320 KB Output is correct
6 Correct 35 ms 10324 KB Output is correct
7 Correct 48 ms 11696 KB Output is correct
8 Correct 1 ms 8536 KB Output is correct
9 Correct 1 ms 8540 KB Output is correct
10 Correct 1 ms 8540 KB Output is correct
11 Correct 1 ms 8540 KB Output is correct
12 Correct 1 ms 8540 KB Output is correct
13 Correct 1 ms 8540 KB Output is correct
14 Correct 1 ms 8540 KB Output is correct
15 Correct 1 ms 8540 KB Output is correct
16 Correct 1 ms 8540 KB Output is correct
17 Correct 2 ms 8660 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 8540 KB Output is correct
2 Correct 47 ms 10516 KB Output is correct
3 Correct 46 ms 10324 KB Output is correct
4 Correct 34 ms 10332 KB Output is correct
5 Correct 46 ms 10320 KB Output is correct
6 Correct 35 ms 10324 KB Output is correct
7 Correct 48 ms 11696 KB Output is correct
8 Correct 1 ms 8536 KB Output is correct
9 Correct 1 ms 8540 KB Output is correct
10 Correct 1 ms 8540 KB Output is correct
11 Correct 1 ms 8540 KB Output is correct
12 Correct 1 ms 8540 KB Output is correct
13 Correct 1 ms 8540 KB Output is correct
14 Correct 1 ms 8540 KB Output is correct
15 Correct 1 ms 8540 KB Output is correct
16 Correct 1 ms 8540 KB Output is correct
17 Correct 2 ms 8660 KB Output is correct
18 Correct 1 ms 8536 KB Output is correct
19 Correct 1 ms 8536 KB Output is correct
20 Correct 153 ms 17344 KB Output is correct
21 Correct 138 ms 14924 KB Output is correct
22 Correct 136 ms 14932 KB Output is correct
23 Correct 142 ms 17648 KB Output is correct
24 Correct 157 ms 17120 KB Output is correct
25 Correct 148 ms 17232 KB Output is correct
26 Correct 164 ms 17584 KB Output is correct
27 Correct 1 ms 10588 KB Output is correct
28 Correct 1 ms 8540 KB Output is correct
29 Correct 1 ms 8660 KB Output is correct
30 Correct 1 ms 8540 KB Output is correct
31 Correct 1 ms 8540 KB Output is correct
32 Correct 1 ms 8536 KB Output is correct
33 Correct 1 ms 8656 KB Output is correct
34 Correct 1 ms 8540 KB Output is correct
35 Correct 2 ms 10588 KB Output is correct
36 Correct 2 ms 10588 KB Output is correct
37 Correct 1 ms 8540 KB Output is correct
38 Correct 1 ms 8540 KB Output is correct
39 Correct 1 ms 8540 KB Output is correct
40 Correct 1 ms 8540 KB Output is correct
41 Correct 1 ms 8540 KB Output is correct
42 Correct 1 ms 8536 KB Output is correct
43 Correct 1 ms 8540 KB Output is correct
44 Correct 1 ms 10588 KB Output is correct
45 Correct 2 ms 10588 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 8540 KB Output is correct
2 Correct 47 ms 10516 KB Output is correct
3 Correct 46 ms 10324 KB Output is correct
4 Correct 34 ms 10332 KB Output is correct
5 Correct 46 ms 10320 KB Output is correct
6 Correct 35 ms 10324 KB Output is correct
7 Correct 48 ms 11696 KB Output is correct
8 Correct 1 ms 8536 KB Output is correct
9 Correct 1 ms 8540 KB Output is correct
10 Correct 1 ms 8540 KB Output is correct
11 Correct 1 ms 8540 KB Output is correct
12 Correct 1 ms 8540 KB Output is correct
13 Correct 1 ms 8540 KB Output is correct
14 Correct 1 ms 8540 KB Output is correct
15 Correct 1 ms 8540 KB Output is correct
16 Correct 1 ms 8540 KB Output is correct
17 Correct 2 ms 8660 KB Output is correct
18 Correct 1 ms 8536 KB Output is correct
19 Correct 1 ms 8536 KB Output is correct
20 Correct 153 ms 17344 KB Output is correct
21 Correct 138 ms 14924 KB Output is correct
22 Correct 136 ms 14932 KB Output is correct
23 Correct 142 ms 17648 KB Output is correct
24 Correct 157 ms 17120 KB Output is correct
25 Correct 148 ms 17232 KB Output is correct
26 Correct 164 ms 17584 KB Output is correct
27 Correct 1 ms 10588 KB Output is correct
28 Correct 1 ms 8540 KB Output is correct
29 Correct 1 ms 8660 KB Output is correct
30 Correct 1 ms 8540 KB Output is correct
31 Correct 1 ms 8540 KB Output is correct
32 Correct 1 ms 8536 KB Output is correct
33 Correct 1 ms 8656 KB Output is correct
34 Correct 1 ms 8540 KB Output is correct
35 Correct 2 ms 10588 KB Output is correct
36 Correct 2 ms 10588 KB Output is correct
37 Correct 1 ms 8540 KB Output is correct
38 Correct 1 ms 8540 KB Output is correct
39 Correct 1 ms 8540 KB Output is correct
40 Correct 1 ms 8540 KB Output is correct
41 Correct 1 ms 8540 KB Output is correct
42 Correct 1 ms 8536 KB Output is correct
43 Correct 1 ms 8540 KB Output is correct
44 Correct 1 ms 10588 KB Output is correct
45 Correct 2 ms 10588 KB Output is correct
46 Correct 2 ms 12636 KB Output is correct
47 Correct 203 ms 27516 KB Output is correct
48 Correct 199 ms 23024 KB Output is correct
49 Correct 188 ms 22800 KB Output is correct
50 Correct 184 ms 28500 KB Output is correct
51 Correct 200 ms 28528 KB Output is correct
52 Correct 203 ms 28244 KB Output is correct
53 Correct 219 ms 28868 KB Output is correct
54 Correct 8 ms 19288 KB Output is correct
55 Correct 6 ms 18780 KB Output is correct
56 Correct 6 ms 18908 KB Output is correct
57 Correct 6 ms 18780 KB Output is correct
58 Correct 6 ms 18780 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 8540 KB Output is correct
2 Correct 47 ms 10516 KB Output is correct
3 Correct 46 ms 10324 KB Output is correct
4 Correct 34 ms 10332 KB Output is correct
5 Correct 46 ms 10320 KB Output is correct
6 Correct 35 ms 10324 KB Output is correct
7 Correct 48 ms 11696 KB Output is correct
8 Correct 1 ms 8536 KB Output is correct
9 Correct 1 ms 8540 KB Output is correct
10 Correct 1 ms 8540 KB Output is correct
11 Correct 1 ms 8540 KB Output is correct
12 Correct 1 ms 8540 KB Output is correct
13 Correct 1 ms 8540 KB Output is correct
14 Correct 1 ms 8540 KB Output is correct
15 Correct 1 ms 8540 KB Output is correct
16 Correct 1 ms 8540 KB Output is correct
17 Correct 2 ms 8660 KB Output is correct
18 Correct 1 ms 8536 KB Output is correct
19 Correct 1 ms 8536 KB Output is correct
20 Correct 153 ms 17344 KB Output is correct
21 Correct 138 ms 14924 KB Output is correct
22 Correct 136 ms 14932 KB Output is correct
23 Correct 142 ms 17648 KB Output is correct
24 Correct 157 ms 17120 KB Output is correct
25 Correct 148 ms 17232 KB Output is correct
26 Correct 164 ms 17584 KB Output is correct
27 Correct 1 ms 10588 KB Output is correct
28 Correct 1 ms 8540 KB Output is correct
29 Correct 1 ms 8660 KB Output is correct
30 Correct 1 ms 8540 KB Output is correct
31 Correct 1 ms 8540 KB Output is correct
32 Correct 1 ms 8536 KB Output is correct
33 Correct 1 ms 8656 KB Output is correct
34 Correct 1 ms 8540 KB Output is correct
35 Correct 2 ms 10588 KB Output is correct
36 Correct 2 ms 10588 KB Output is correct
37 Correct 1 ms 8540 KB Output is correct
38 Correct 1 ms 8540 KB Output is correct
39 Correct 1 ms 8540 KB Output is correct
40 Correct 1 ms 8540 KB Output is correct
41 Correct 1 ms 8540 KB Output is correct
42 Correct 1 ms 8536 KB Output is correct
43 Correct 1 ms 8540 KB Output is correct
44 Correct 1 ms 10588 KB Output is correct
45 Correct 2 ms 10588 KB Output is correct
46 Correct 2 ms 12636 KB Output is correct
47 Correct 203 ms 27516 KB Output is correct
48 Correct 199 ms 23024 KB Output is correct
49 Correct 188 ms 22800 KB Output is correct
50 Correct 184 ms 28500 KB Output is correct
51 Correct 200 ms 28528 KB Output is correct
52 Correct 203 ms 28244 KB Output is correct
53 Correct 219 ms 28868 KB Output is correct
54 Correct 8 ms 19288 KB Output is correct
55 Correct 6 ms 18780 KB Output is correct
56 Correct 6 ms 18908 KB Output is correct
57 Correct 6 ms 18780 KB Output is correct
58 Correct 6 ms 18780 KB Output is correct
59 Correct 265 ms 56336 KB Output is correct
60 Correct 183 ms 80976 KB Output is correct
61 Correct 189 ms 81236 KB Output is correct
62 Correct 193 ms 81236 KB Output is correct
63 Correct 261 ms 57008 KB Output is correct
64 Correct 344 ms 88032 KB Output is correct
65 Correct 323 ms 88144 KB Output is correct
66 Correct 296 ms 86352 KB Output is correct
67 Correct 293 ms 86196 KB Output is correct
68 Correct 324 ms 87888 KB Output is correct
69 Correct 348 ms 88256 KB Output is correct
70 Correct 81 ms 76388 KB Output is correct
71 Correct 84 ms 74256 KB Output is correct
72 Correct 81 ms 76376 KB Output is correct
73 Correct 87 ms 76372 KB Output is correct
74 Correct 77 ms 76380 KB Output is correct
75 Correct 82 ms 76420 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 8536 KB Output is correct
2 Correct 2 ms 12636 KB Output is correct
3 Correct 1 ms 8540 KB Output is correct
4 Correct 1 ms 8540 KB Output is correct
5 Correct 826 ms 525840 KB Output is correct
6 Correct 782 ms 520020 KB Output is correct
7 Correct 762 ms 523812 KB Output is correct
8 Correct 800 ms 527616 KB Output is correct
9 Correct 758 ms 527812 KB Output is correct
10 Correct 756 ms 525520 KB Output is correct
11 Correct 760 ms 525760 KB Output is correct
12 Correct 775 ms 527956 KB Output is correct
13 Correct 2 ms 8540 KB Output is correct
14 Correct 1 ms 8656 KB Output is correct
15 Correct 1 ms 8540 KB Output is correct
16 Correct 1 ms 8684 KB Output is correct
17 Correct 1 ms 8536 KB Output is correct
18 Correct 1 ms 8536 KB Output is correct
19 Correct 1 ms 8652 KB Output is correct
20 Correct 1 ms 8540 KB Output is correct
21 Correct 1 ms 8540 KB Output is correct
22 Correct 2 ms 10588 KB Output is correct
23 Correct 1 ms 8540 KB Output is correct
24 Correct 1 ms 8540 KB Output is correct
25 Correct 1 ms 8672 KB Output is correct
26 Correct 1 ms 8536 KB Output is correct
27 Correct 1 ms 8540 KB Output is correct
28 Correct 1 ms 8652 KB Output is correct
29 Correct 2 ms 8540 KB Output is correct
30 Correct 2 ms 10588 KB Output is correct
31 Correct 2 ms 10588 KB Output is correct
32 Correct 1 ms 8536 KB Output is correct
33 Correct 1 ms 8656 KB Output is correct
34 Correct 1 ms 8540 KB Output is correct
35 Correct 1 ms 8540 KB Output is correct
36 Correct 1 ms 8540 KB Output is correct
37 Correct 1 ms 8540 KB Output is correct
38 Correct 1 ms 8540 KB Output is correct
39 Correct 1 ms 10840 KB Output is correct
40 Correct 2 ms 10732 KB Output is correct
41 Correct 6 ms 18780 KB Output is correct
42 Correct 6 ms 18780 KB Output is correct
43 Correct 6 ms 18780 KB Output is correct
44 Correct 6 ms 18900 KB Output is correct
45 Correct 6 ms 18780 KB Output is correct
46 Correct 85 ms 76628 KB Output is correct
47 Correct 80 ms 74332 KB Output is correct
48 Correct 84 ms 76376 KB Output is correct
49 Correct 92 ms 76376 KB Output is correct
50 Correct 80 ms 76300 KB Output is correct
51 Correct 771 ms 519764 KB Output is correct
52 Correct 785 ms 519748 KB Output is correct
53 Correct 776 ms 527996 KB Output is correct
54 Correct 783 ms 527944 KB Output is correct
55 Correct 2 ms 8540 KB Output is correct
56 Correct 82 ms 76380 KB Output is correct
57 Correct 1 ms 8540 KB Output is correct
58 Correct 47 ms 10516 KB Output is correct
59 Correct 46 ms 10324 KB Output is correct
60 Correct 34 ms 10332 KB Output is correct
61 Correct 46 ms 10320 KB Output is correct
62 Correct 35 ms 10324 KB Output is correct
63 Correct 48 ms 11696 KB Output is correct
64 Correct 1 ms 8536 KB Output is correct
65 Correct 1 ms 8540 KB Output is correct
66 Correct 1 ms 8540 KB Output is correct
67 Correct 1 ms 8540 KB Output is correct
68 Correct 1 ms 8540 KB Output is correct
69 Correct 1 ms 8540 KB Output is correct
70 Correct 1 ms 8540 KB Output is correct
71 Correct 1 ms 8540 KB Output is correct
72 Correct 1 ms 8540 KB Output is correct
73 Correct 2 ms 8660 KB Output is correct
74 Correct 1 ms 8536 KB Output is correct
75 Correct 1 ms 8536 KB Output is correct
76 Correct 153 ms 17344 KB Output is correct
77 Correct 138 ms 14924 KB Output is correct
78 Correct 136 ms 14932 KB Output is correct
79 Correct 142 ms 17648 KB Output is correct
80 Correct 157 ms 17120 KB Output is correct
81 Correct 148 ms 17232 KB Output is correct
82 Correct 164 ms 17584 KB Output is correct
83 Correct 1 ms 10588 KB Output is correct
84 Correct 1 ms 8540 KB Output is correct
85 Correct 1 ms 8660 KB Output is correct
86 Correct 1 ms 8540 KB Output is correct
87 Correct 1 ms 8540 KB Output is correct
88 Correct 1 ms 8536 KB Output is correct
89 Correct 1 ms 8656 KB Output is correct
90 Correct 1 ms 8540 KB Output is correct
91 Correct 2 ms 10588 KB Output is correct
92 Correct 2 ms 10588 KB Output is correct
93 Correct 1 ms 8540 KB Output is correct
94 Correct 1 ms 8540 KB Output is correct
95 Correct 1 ms 8540 KB Output is correct
96 Correct 1 ms 8540 KB Output is correct
97 Correct 1 ms 8540 KB Output is correct
98 Correct 1 ms 8536 KB Output is correct
99 Correct 1 ms 8540 KB Output is correct
100 Correct 1 ms 10588 KB Output is correct
101 Correct 2 ms 10588 KB Output is correct
102 Correct 2 ms 12636 KB Output is correct
103 Correct 203 ms 27516 KB Output is correct
104 Correct 199 ms 23024 KB Output is correct
105 Correct 188 ms 22800 KB Output is correct
106 Correct 184 ms 28500 KB Output is correct
107 Correct 200 ms 28528 KB Output is correct
108 Correct 203 ms 28244 KB Output is correct
109 Correct 219 ms 28868 KB Output is correct
110 Correct 8 ms 19288 KB Output is correct
111 Correct 6 ms 18780 KB Output is correct
112 Correct 6 ms 18908 KB Output is correct
113 Correct 6 ms 18780 KB Output is correct
114 Correct 6 ms 18780 KB Output is correct
115 Correct 265 ms 56336 KB Output is correct
116 Correct 183 ms 80976 KB Output is correct
117 Correct 189 ms 81236 KB Output is correct
118 Correct 193 ms 81236 KB Output is correct
119 Correct 261 ms 57008 KB Output is correct
120 Correct 344 ms 88032 KB Output is correct
121 Correct 323 ms 88144 KB Output is correct
122 Correct 296 ms 86352 KB Output is correct
123 Correct 293 ms 86196 KB Output is correct
124 Correct 324 ms 87888 KB Output is correct
125 Correct 348 ms 88256 KB Output is correct
126 Correct 81 ms 76388 KB Output is correct
127 Correct 84 ms 74256 KB Output is correct
128 Correct 81 ms 76376 KB Output is correct
129 Correct 87 ms 76372 KB Output is correct
130 Correct 77 ms 76380 KB Output is correct
131 Correct 82 ms 76420 KB Output is correct
132 Correct 1098 ms 541524 KB Output is correct
133 Correct 1143 ms 541224 KB Output is correct
134 Correct 1171 ms 541484 KB Output is correct
135 Correct 1137 ms 541516 KB Output is correct
136 Correct 1134 ms 541612 KB Output is correct
137 Correct 663 ms 284240 KB Output is correct
138 Correct 662 ms 284308 KB Output is correct
139 Correct 1032 ms 533484 KB Output is correct
140 Correct 1026 ms 532900 KB Output is correct
141 Correct 1032 ms 541440 KB Output is correct
142 Correct 1088 ms 541724 KB Output is correct