답안 #1089421

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1089421 2024-09-16T13:03:28 Z Thanhs Council (JOI23_council) C++14
100 / 100
1130 ms 64416 KB
#include <bits/stdc++.h>
using namespace std;
 
#define fi first
#define se second
// #define int long long
#define endl '\n'
#define setmin(x, y) x = min((x), (y))
#define setmax(x, y) x = max((x), (y))
 
mt19937 hdp(chrono::high_resolution_clock::now().time_since_epoch().count());
int rand(int l, int r){return l + ((hdp() % (r - l + 1)) + r - l + 1) % (r - l + 1);}

const int NM = 3e5 + 5;
const int MM = 25;
const int EM = (1 << 20) + 5;

struct node
{
    pair<pair<int, int>, pair<int, int>> best = {{0, 0}, {0, 0}};
    node() {}
    node(int a, int b, int c, int d) : best({{a, b}, {c, d}}) {}
    node operator+(const node& o)
    {
        vector<pair<int, int>> v;
        v.push_back(best.fi);
        v.push_back(best.se);
        v.push_back(o.best.fi);
        v.push_back(o.best.se);
        sort(v.begin(), v.end(), [&](const pair<int, int> x, const pair<int, int> y) {return x.fi > y.fi;});
        node res;
        for (auto t : v)
        {
            if (!res.best.fi.se)
                res.best.fi = t;
            else if (!res.best.se.se && t.se != res.best.fi.se)
                res.best.se = t;
        }
        return res;
    }
}dp[EM];

int n, m, a[NM][MM], sum[MM];
pair<int, int> b[EM];

void solve()
{
    cin >> n >> m;
    for (int i = 1; i <= n; i++)
    {
        int msk = 0;
        for (int j = 0; j < m; j++)
        {
            cin >> a[i][j];
            sum[j] += a[i][j];
            msk |= a[i][j] << j;
        }
        (b[msk].fi ? b[msk].se : b[msk].fi) = i;
    }    
    for (int i = 0; i < m; i++)
        for (int j = 0; j < (1 << m); j++)
            if (j >> i & 1)
            {
                if (b[j ^ (1 << i)].fi)
                    (b[j].fi ? b[j].se : b[j].fi) = b[j ^ (1 << i)].fi;
                if (b[j ^ (1 << i)].se)
                    (b[j].fi ? b[j].se : b[j].fi) = b[j ^ (1 << i)].se;
            }
    for (int i = 0; i < (1 << m); i++)
        if (i < (i ^ ((1 << m) - 1)))
            swap(b[i], b[i ^ ((1 << m) - 1)]);
    for (int i = 0; i < (1 << m); i++)
        dp[i] = node(b[i].fi ? __builtin_popcount(i) : 0, b[i].fi, b[i].se ? __builtin_popcount(i) : 0, b[i].se);
    for (int i = 0; i < m; i++)
        for (int j = 0; j < (1 << m); j++)
            if (j >> i & 1)
                dp[j] = dp[j] + dp[j ^ (1 << i)];
    for (int i = 1; i <= n; i++)
    {
        int msk = 0, ans = 0;
        for (int j = 0; j < m; j++)
        {
            if (sum[j] - a[i][j] == n / 2)
                msk |= 1 << j;
            else
                ans += sum[j] - a[i][j] > n / 2;
        }
        cout << ans + (dp[msk].best.fi.se == i ? dp[msk].best.se : dp[msk].best.fi).fi << endl;
    }
}

signed main()
{
    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    if (fopen("in.txt", "r")) 
    {
        freopen("in.txt", "r", stdin);
        freopen("out.txt", "w", stdout);
    }
    int tc = 1; 
    // cin >> tc;
    while (tc--)
        solve();

}

Compilation message

council.cpp: In function 'int main()':
council.cpp:97:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   97 |         freopen("in.txt", "r", stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
council.cpp:98:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   98 |         freopen("out.txt", "w", stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 16728 KB Output is correct
2 Correct 9 ms 16728 KB Output is correct
3 Correct 7 ms 16728 KB Output is correct
4 Correct 7 ms 16988 KB Output is correct
5 Correct 667 ms 24888 KB Output is correct
6 Correct 679 ms 25108 KB Output is correct
7 Correct 690 ms 25072 KB Output is correct
8 Correct 706 ms 25076 KB Output is correct
9 Correct 699 ms 24912 KB Output is correct
10 Correct 686 ms 25080 KB Output is correct
11 Correct 721 ms 25068 KB Output is correct
12 Correct 722 ms 25068 KB Output is correct
13 Correct 6 ms 16728 KB Output is correct
14 Correct 7 ms 16732 KB Output is correct
15 Correct 8 ms 17008 KB Output is correct
16 Correct 6 ms 16784 KB Output is correct
17 Correct 6 ms 16728 KB Output is correct
18 Correct 6 ms 16728 KB Output is correct
19 Correct 7 ms 16728 KB Output is correct
20 Correct 6 ms 16732 KB Output is correct
21 Correct 6 ms 16732 KB Output is correct
22 Correct 7 ms 16732 KB Output is correct
23 Correct 6 ms 16732 KB Output is correct
24 Correct 6 ms 16696 KB Output is correct
25 Correct 6 ms 16732 KB Output is correct
26 Correct 6 ms 16728 KB Output is correct
27 Correct 7 ms 16732 KB Output is correct
28 Correct 7 ms 16732 KB Output is correct
29 Correct 7 ms 16732 KB Output is correct
30 Correct 7 ms 16732 KB Output is correct
31 Correct 7 ms 16756 KB Output is correct
32 Correct 6 ms 16732 KB Output is correct
33 Correct 6 ms 16732 KB Output is correct
34 Correct 6 ms 16732 KB Output is correct
35 Correct 6 ms 16856 KB Output is correct
36 Correct 6 ms 16732 KB Output is correct
37 Correct 6 ms 16732 KB Output is correct
38 Correct 7 ms 16732 KB Output is correct
39 Correct 7 ms 16732 KB Output is correct
40 Correct 7 ms 16732 KB Output is correct
41 Correct 13 ms 16996 KB Output is correct
42 Correct 14 ms 17024 KB Output is correct
43 Correct 13 ms 16984 KB Output is correct
44 Correct 13 ms 16860 KB Output is correct
45 Correct 15 ms 16988 KB Output is correct
46 Correct 81 ms 17908 KB Output is correct
47 Correct 75 ms 17756 KB Output is correct
48 Correct 78 ms 17756 KB Output is correct
49 Correct 84 ms 18004 KB Output is correct
50 Correct 78 ms 17752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 16728 KB Output is correct
2 Correct 9 ms 16728 KB Output is correct
3 Correct 7 ms 16728 KB Output is correct
4 Correct 7 ms 16988 KB Output is correct
5 Correct 667 ms 24888 KB Output is correct
6 Correct 679 ms 25108 KB Output is correct
7 Correct 690 ms 25072 KB Output is correct
8 Correct 706 ms 25076 KB Output is correct
9 Correct 699 ms 24912 KB Output is correct
10 Correct 686 ms 25080 KB Output is correct
11 Correct 721 ms 25068 KB Output is correct
12 Correct 722 ms 25068 KB Output is correct
13 Correct 6 ms 16728 KB Output is correct
14 Correct 7 ms 16732 KB Output is correct
15 Correct 8 ms 17008 KB Output is correct
16 Correct 6 ms 16784 KB Output is correct
17 Correct 6 ms 16728 KB Output is correct
18 Correct 6 ms 16728 KB Output is correct
19 Correct 7 ms 16728 KB Output is correct
20 Correct 6 ms 16732 KB Output is correct
21 Correct 6 ms 16732 KB Output is correct
22 Correct 7 ms 16732 KB Output is correct
23 Correct 6 ms 16732 KB Output is correct
24 Correct 6 ms 16696 KB Output is correct
25 Correct 6 ms 16732 KB Output is correct
26 Correct 6 ms 16728 KB Output is correct
27 Correct 7 ms 16732 KB Output is correct
28 Correct 7 ms 16732 KB Output is correct
29 Correct 7 ms 16732 KB Output is correct
30 Correct 7 ms 16732 KB Output is correct
31 Correct 7 ms 16756 KB Output is correct
32 Correct 6 ms 16732 KB Output is correct
33 Correct 6 ms 16732 KB Output is correct
34 Correct 6 ms 16732 KB Output is correct
35 Correct 6 ms 16856 KB Output is correct
36 Correct 6 ms 16732 KB Output is correct
37 Correct 6 ms 16732 KB Output is correct
38 Correct 7 ms 16732 KB Output is correct
39 Correct 7 ms 16732 KB Output is correct
40 Correct 7 ms 16732 KB Output is correct
41 Correct 13 ms 16996 KB Output is correct
42 Correct 14 ms 17024 KB Output is correct
43 Correct 13 ms 16984 KB Output is correct
44 Correct 13 ms 16860 KB Output is correct
45 Correct 15 ms 16988 KB Output is correct
46 Correct 81 ms 17908 KB Output is correct
47 Correct 75 ms 17756 KB Output is correct
48 Correct 78 ms 17756 KB Output is correct
49 Correct 84 ms 18004 KB Output is correct
50 Correct 78 ms 17752 KB Output is correct
51 Correct 666 ms 25260 KB Output is correct
52 Correct 672 ms 25428 KB Output is correct
53 Correct 703 ms 25484 KB Output is correct
54 Correct 697 ms 25496 KB Output is correct
55 Correct 7 ms 16988 KB Output is correct
56 Correct 93 ms 18268 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 16728 KB Output is correct
2 Correct 58 ms 47964 KB Output is correct
3 Correct 54 ms 47960 KB Output is correct
4 Correct 44 ms 47304 KB Output is correct
5 Correct 55 ms 47444 KB Output is correct
6 Correct 48 ms 47184 KB Output is correct
7 Correct 57 ms 47436 KB Output is correct
8 Correct 8 ms 16728 KB Output is correct
9 Correct 7 ms 16852 KB Output is correct
10 Correct 7 ms 16784 KB Output is correct
11 Correct 8 ms 16732 KB Output is correct
12 Correct 8 ms 16732 KB Output is correct
13 Correct 7 ms 16832 KB Output is correct
14 Correct 7 ms 16728 KB Output is correct
15 Correct 7 ms 16732 KB Output is correct
16 Correct 7 ms 16744 KB Output is correct
17 Correct 8 ms 16988 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 16728 KB Output is correct
2 Correct 58 ms 47964 KB Output is correct
3 Correct 54 ms 47960 KB Output is correct
4 Correct 44 ms 47304 KB Output is correct
5 Correct 55 ms 47444 KB Output is correct
6 Correct 48 ms 47184 KB Output is correct
7 Correct 57 ms 47436 KB Output is correct
8 Correct 8 ms 16728 KB Output is correct
9 Correct 7 ms 16852 KB Output is correct
10 Correct 7 ms 16784 KB Output is correct
11 Correct 8 ms 16732 KB Output is correct
12 Correct 8 ms 16732 KB Output is correct
13 Correct 7 ms 16832 KB Output is correct
14 Correct 7 ms 16728 KB Output is correct
15 Correct 7 ms 16732 KB Output is correct
16 Correct 7 ms 16744 KB Output is correct
17 Correct 8 ms 16988 KB Output is correct
18 Correct 8 ms 16728 KB Output is correct
19 Correct 7 ms 16808 KB Output is correct
20 Correct 166 ms 49744 KB Output is correct
21 Correct 148 ms 49488 KB Output is correct
22 Correct 150 ms 49632 KB Output is correct
23 Correct 129 ms 49956 KB Output is correct
24 Correct 129 ms 49660 KB Output is correct
25 Correct 143 ms 49748 KB Output is correct
26 Correct 160 ms 49920 KB Output is correct
27 Correct 7 ms 16732 KB Output is correct
28 Correct 7 ms 16732 KB Output is correct
29 Correct 7 ms 16732 KB Output is correct
30 Correct 7 ms 16784 KB Output is correct
31 Correct 7 ms 16732 KB Output is correct
32 Correct 7 ms 16732 KB Output is correct
33 Correct 7 ms 16732 KB Output is correct
34 Correct 7 ms 16732 KB Output is correct
35 Correct 8 ms 16732 KB Output is correct
36 Correct 8 ms 16732 KB Output is correct
37 Correct 7 ms 16836 KB Output is correct
38 Correct 7 ms 16732 KB Output is correct
39 Correct 7 ms 16732 KB Output is correct
40 Correct 8 ms 16732 KB Output is correct
41 Correct 7 ms 16732 KB Output is correct
42 Correct 7 ms 16732 KB Output is correct
43 Correct 7 ms 16728 KB Output is correct
44 Correct 7 ms 16732 KB Output is correct
45 Correct 7 ms 16732 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 16728 KB Output is correct
2 Correct 58 ms 47964 KB Output is correct
3 Correct 54 ms 47960 KB Output is correct
4 Correct 44 ms 47304 KB Output is correct
5 Correct 55 ms 47444 KB Output is correct
6 Correct 48 ms 47184 KB Output is correct
7 Correct 57 ms 47436 KB Output is correct
8 Correct 8 ms 16728 KB Output is correct
9 Correct 7 ms 16852 KB Output is correct
10 Correct 7 ms 16784 KB Output is correct
11 Correct 8 ms 16732 KB Output is correct
12 Correct 8 ms 16732 KB Output is correct
13 Correct 7 ms 16832 KB Output is correct
14 Correct 7 ms 16728 KB Output is correct
15 Correct 7 ms 16732 KB Output is correct
16 Correct 7 ms 16744 KB Output is correct
17 Correct 8 ms 16988 KB Output is correct
18 Correct 8 ms 16728 KB Output is correct
19 Correct 7 ms 16808 KB Output is correct
20 Correct 166 ms 49744 KB Output is correct
21 Correct 148 ms 49488 KB Output is correct
22 Correct 150 ms 49632 KB Output is correct
23 Correct 129 ms 49956 KB Output is correct
24 Correct 129 ms 49660 KB Output is correct
25 Correct 143 ms 49748 KB Output is correct
26 Correct 160 ms 49920 KB Output is correct
27 Correct 7 ms 16732 KB Output is correct
28 Correct 7 ms 16732 KB Output is correct
29 Correct 7 ms 16732 KB Output is correct
30 Correct 7 ms 16784 KB Output is correct
31 Correct 7 ms 16732 KB Output is correct
32 Correct 7 ms 16732 KB Output is correct
33 Correct 7 ms 16732 KB Output is correct
34 Correct 7 ms 16732 KB Output is correct
35 Correct 8 ms 16732 KB Output is correct
36 Correct 8 ms 16732 KB Output is correct
37 Correct 7 ms 16836 KB Output is correct
38 Correct 7 ms 16732 KB Output is correct
39 Correct 7 ms 16732 KB Output is correct
40 Correct 8 ms 16732 KB Output is correct
41 Correct 7 ms 16732 KB Output is correct
42 Correct 7 ms 16732 KB Output is correct
43 Correct 7 ms 16728 KB Output is correct
44 Correct 7 ms 16732 KB Output is correct
45 Correct 7 ms 16732 KB Output is correct
46 Correct 8 ms 16732 KB Output is correct
47 Correct 225 ms 51068 KB Output is correct
48 Correct 204 ms 50768 KB Output is correct
49 Correct 206 ms 50768 KB Output is correct
50 Correct 192 ms 51536 KB Output is correct
51 Correct 185 ms 51280 KB Output is correct
52 Correct 203 ms 51216 KB Output is correct
53 Correct 231 ms 53704 KB Output is correct
54 Correct 23 ms 16984 KB Output is correct
55 Correct 15 ms 16988 KB Output is correct
56 Correct 14 ms 16908 KB Output is correct
57 Correct 14 ms 16888 KB Output is correct
58 Correct 15 ms 17016 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 16728 KB Output is correct
2 Correct 58 ms 47964 KB Output is correct
3 Correct 54 ms 47960 KB Output is correct
4 Correct 44 ms 47304 KB Output is correct
5 Correct 55 ms 47444 KB Output is correct
6 Correct 48 ms 47184 KB Output is correct
7 Correct 57 ms 47436 KB Output is correct
8 Correct 8 ms 16728 KB Output is correct
9 Correct 7 ms 16852 KB Output is correct
10 Correct 7 ms 16784 KB Output is correct
11 Correct 8 ms 16732 KB Output is correct
12 Correct 8 ms 16732 KB Output is correct
13 Correct 7 ms 16832 KB Output is correct
14 Correct 7 ms 16728 KB Output is correct
15 Correct 7 ms 16732 KB Output is correct
16 Correct 7 ms 16744 KB Output is correct
17 Correct 8 ms 16988 KB Output is correct
18 Correct 8 ms 16728 KB Output is correct
19 Correct 7 ms 16808 KB Output is correct
20 Correct 166 ms 49744 KB Output is correct
21 Correct 148 ms 49488 KB Output is correct
22 Correct 150 ms 49632 KB Output is correct
23 Correct 129 ms 49956 KB Output is correct
24 Correct 129 ms 49660 KB Output is correct
25 Correct 143 ms 49748 KB Output is correct
26 Correct 160 ms 49920 KB Output is correct
27 Correct 7 ms 16732 KB Output is correct
28 Correct 7 ms 16732 KB Output is correct
29 Correct 7 ms 16732 KB Output is correct
30 Correct 7 ms 16784 KB Output is correct
31 Correct 7 ms 16732 KB Output is correct
32 Correct 7 ms 16732 KB Output is correct
33 Correct 7 ms 16732 KB Output is correct
34 Correct 7 ms 16732 KB Output is correct
35 Correct 8 ms 16732 KB Output is correct
36 Correct 8 ms 16732 KB Output is correct
37 Correct 7 ms 16836 KB Output is correct
38 Correct 7 ms 16732 KB Output is correct
39 Correct 7 ms 16732 KB Output is correct
40 Correct 8 ms 16732 KB Output is correct
41 Correct 7 ms 16732 KB Output is correct
42 Correct 7 ms 16732 KB Output is correct
43 Correct 7 ms 16728 KB Output is correct
44 Correct 7 ms 16732 KB Output is correct
45 Correct 7 ms 16732 KB Output is correct
46 Correct 8 ms 16732 KB Output is correct
47 Correct 225 ms 51068 KB Output is correct
48 Correct 204 ms 50768 KB Output is correct
49 Correct 206 ms 50768 KB Output is correct
50 Correct 192 ms 51536 KB Output is correct
51 Correct 185 ms 51280 KB Output is correct
52 Correct 203 ms 51216 KB Output is correct
53 Correct 231 ms 53704 KB Output is correct
54 Correct 23 ms 16984 KB Output is correct
55 Correct 15 ms 16988 KB Output is correct
56 Correct 14 ms 16908 KB Output is correct
57 Correct 14 ms 16888 KB Output is correct
58 Correct 15 ms 17016 KB Output is correct
59 Correct 263 ms 54820 KB Output is correct
60 Correct 169 ms 31508 KB Output is correct
61 Correct 204 ms 32592 KB Output is correct
62 Correct 183 ms 32844 KB Output is correct
63 Correct 268 ms 52052 KB Output is correct
64 Correct 327 ms 52836 KB Output is correct
65 Correct 307 ms 52820 KB Output is correct
66 Correct 269 ms 53216 KB Output is correct
67 Correct 266 ms 52820 KB Output is correct
68 Correct 302 ms 52868 KB Output is correct
69 Correct 341 ms 53200 KB Output is correct
70 Correct 80 ms 17752 KB Output is correct
71 Correct 82 ms 17756 KB Output is correct
72 Correct 76 ms 17756 KB Output is correct
73 Correct 76 ms 17660 KB Output is correct
74 Correct 79 ms 17752 KB Output is correct
75 Correct 80 ms 18268 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 16728 KB Output is correct
2 Correct 9 ms 16728 KB Output is correct
3 Correct 7 ms 16728 KB Output is correct
4 Correct 7 ms 16988 KB Output is correct
5 Correct 667 ms 24888 KB Output is correct
6 Correct 679 ms 25108 KB Output is correct
7 Correct 690 ms 25072 KB Output is correct
8 Correct 706 ms 25076 KB Output is correct
9 Correct 699 ms 24912 KB Output is correct
10 Correct 686 ms 25080 KB Output is correct
11 Correct 721 ms 25068 KB Output is correct
12 Correct 722 ms 25068 KB Output is correct
13 Correct 6 ms 16728 KB Output is correct
14 Correct 7 ms 16732 KB Output is correct
15 Correct 8 ms 17008 KB Output is correct
16 Correct 6 ms 16784 KB Output is correct
17 Correct 6 ms 16728 KB Output is correct
18 Correct 6 ms 16728 KB Output is correct
19 Correct 7 ms 16728 KB Output is correct
20 Correct 6 ms 16732 KB Output is correct
21 Correct 6 ms 16732 KB Output is correct
22 Correct 7 ms 16732 KB Output is correct
23 Correct 6 ms 16732 KB Output is correct
24 Correct 6 ms 16696 KB Output is correct
25 Correct 6 ms 16732 KB Output is correct
26 Correct 6 ms 16728 KB Output is correct
27 Correct 7 ms 16732 KB Output is correct
28 Correct 7 ms 16732 KB Output is correct
29 Correct 7 ms 16732 KB Output is correct
30 Correct 7 ms 16732 KB Output is correct
31 Correct 7 ms 16756 KB Output is correct
32 Correct 6 ms 16732 KB Output is correct
33 Correct 6 ms 16732 KB Output is correct
34 Correct 6 ms 16732 KB Output is correct
35 Correct 6 ms 16856 KB Output is correct
36 Correct 6 ms 16732 KB Output is correct
37 Correct 6 ms 16732 KB Output is correct
38 Correct 7 ms 16732 KB Output is correct
39 Correct 7 ms 16732 KB Output is correct
40 Correct 7 ms 16732 KB Output is correct
41 Correct 13 ms 16996 KB Output is correct
42 Correct 14 ms 17024 KB Output is correct
43 Correct 13 ms 16984 KB Output is correct
44 Correct 13 ms 16860 KB Output is correct
45 Correct 15 ms 16988 KB Output is correct
46 Correct 81 ms 17908 KB Output is correct
47 Correct 75 ms 17756 KB Output is correct
48 Correct 78 ms 17756 KB Output is correct
49 Correct 84 ms 18004 KB Output is correct
50 Correct 78 ms 17752 KB Output is correct
51 Correct 666 ms 25260 KB Output is correct
52 Correct 672 ms 25428 KB Output is correct
53 Correct 703 ms 25484 KB Output is correct
54 Correct 697 ms 25496 KB Output is correct
55 Correct 7 ms 16988 KB Output is correct
56 Correct 93 ms 18268 KB Output is correct
57 Correct 7 ms 16728 KB Output is correct
58 Correct 58 ms 47964 KB Output is correct
59 Correct 54 ms 47960 KB Output is correct
60 Correct 44 ms 47304 KB Output is correct
61 Correct 55 ms 47444 KB Output is correct
62 Correct 48 ms 47184 KB Output is correct
63 Correct 57 ms 47436 KB Output is correct
64 Correct 8 ms 16728 KB Output is correct
65 Correct 7 ms 16852 KB Output is correct
66 Correct 7 ms 16784 KB Output is correct
67 Correct 8 ms 16732 KB Output is correct
68 Correct 8 ms 16732 KB Output is correct
69 Correct 7 ms 16832 KB Output is correct
70 Correct 7 ms 16728 KB Output is correct
71 Correct 7 ms 16732 KB Output is correct
72 Correct 7 ms 16744 KB Output is correct
73 Correct 8 ms 16988 KB Output is correct
74 Correct 8 ms 16728 KB Output is correct
75 Correct 7 ms 16808 KB Output is correct
76 Correct 166 ms 49744 KB Output is correct
77 Correct 148 ms 49488 KB Output is correct
78 Correct 150 ms 49632 KB Output is correct
79 Correct 129 ms 49956 KB Output is correct
80 Correct 129 ms 49660 KB Output is correct
81 Correct 143 ms 49748 KB Output is correct
82 Correct 160 ms 49920 KB Output is correct
83 Correct 7 ms 16732 KB Output is correct
84 Correct 7 ms 16732 KB Output is correct
85 Correct 7 ms 16732 KB Output is correct
86 Correct 7 ms 16784 KB Output is correct
87 Correct 7 ms 16732 KB Output is correct
88 Correct 7 ms 16732 KB Output is correct
89 Correct 7 ms 16732 KB Output is correct
90 Correct 7 ms 16732 KB Output is correct
91 Correct 8 ms 16732 KB Output is correct
92 Correct 8 ms 16732 KB Output is correct
93 Correct 7 ms 16836 KB Output is correct
94 Correct 7 ms 16732 KB Output is correct
95 Correct 7 ms 16732 KB Output is correct
96 Correct 8 ms 16732 KB Output is correct
97 Correct 7 ms 16732 KB Output is correct
98 Correct 7 ms 16732 KB Output is correct
99 Correct 7 ms 16728 KB Output is correct
100 Correct 7 ms 16732 KB Output is correct
101 Correct 7 ms 16732 KB Output is correct
102 Correct 8 ms 16732 KB Output is correct
103 Correct 225 ms 51068 KB Output is correct
104 Correct 204 ms 50768 KB Output is correct
105 Correct 206 ms 50768 KB Output is correct
106 Correct 192 ms 51536 KB Output is correct
107 Correct 185 ms 51280 KB Output is correct
108 Correct 203 ms 51216 KB Output is correct
109 Correct 231 ms 53704 KB Output is correct
110 Correct 23 ms 16984 KB Output is correct
111 Correct 15 ms 16988 KB Output is correct
112 Correct 14 ms 16908 KB Output is correct
113 Correct 14 ms 16888 KB Output is correct
114 Correct 15 ms 17016 KB Output is correct
115 Correct 263 ms 54820 KB Output is correct
116 Correct 169 ms 31508 KB Output is correct
117 Correct 204 ms 32592 KB Output is correct
118 Correct 183 ms 32844 KB Output is correct
119 Correct 268 ms 52052 KB Output is correct
120 Correct 327 ms 52836 KB Output is correct
121 Correct 307 ms 52820 KB Output is correct
122 Correct 269 ms 53216 KB Output is correct
123 Correct 266 ms 52820 KB Output is correct
124 Correct 302 ms 52868 KB Output is correct
125 Correct 341 ms 53200 KB Output is correct
126 Correct 80 ms 17752 KB Output is correct
127 Correct 82 ms 17756 KB Output is correct
128 Correct 76 ms 17756 KB Output is correct
129 Correct 76 ms 17660 KB Output is correct
130 Correct 79 ms 17752 KB Output is correct
131 Correct 80 ms 18268 KB Output is correct
132 Correct 994 ms 61448 KB Output is correct
133 Correct 1066 ms 61220 KB Output is correct
134 Correct 1002 ms 61264 KB Output is correct
135 Correct 1130 ms 64416 KB Output is correct
136 Correct 1087 ms 64400 KB Output is correct
137 Correct 614 ms 59652 KB Output is correct
138 Correct 593 ms 59796 KB Output is correct
139 Correct 868 ms 64404 KB Output is correct
140 Correct 908 ms 64084 KB Output is correct
141 Correct 984 ms 64080 KB Output is correct
142 Correct 1033 ms 64408 KB Output is correct