Submission #784557

# Submission time Handle Problem Language Result Execution time Memory
784557 2023-07-16T08:52:23 Z thimote75 Council (JOI23_council) C++14
100 / 100
1443 ms 68648 KB
#include <bits/stdc++.h>

using namespace std;

using idata = vector<int>;
using igrid = vector<idata>;

using pii = pair<int, int>;

int N, M;

void show_mask (int mask) {
    for (int i = 0; i < M; i ++)
        cout << (((1 << i) & mask) >> i);
}

struct MaskData {
    int maxsize = 0;
    pii n1 = { 0, - 1 };
    pii n2 = { 0, - 1 };

    void setMask (int i) {
        maxsize = 0;
        for (int u = 0; u < M; u ++)
            if ((1 << u) & i)
                maxsize ++;
    }
    int get (int node) {
        if (n1.second == node) return n2.first;
        return n1.first;
    }

    void append (int node, int size) {
        if (size > maxsize) size = maxsize;
        if (node == n1.second) {
            n1.first = max(size, n1.first);
            return ;
        }

        pii r = { size, node };
        if (r >= n1) {
            n2 = n1;
            n1 = r;
        } else if (r > n2) {
            n2 = r;
        }
    }
    void import (MaskData &other) {
        append(other.n1.second, other.n1.first);
        append(other.n2.second, other.n2.first);
    }
};

using vMD = vector<MaskData>;

idata sum;
igrid values;

vMD danger_mask;

int count (int mask) {
    int res = 0;

    for (int i = 0; i < M; i ++)
        if (mask & (1 << i))
            res ++;

    return res;
}

int main () {
    cin >> N >> M;

    sum.resize(M);
    values.resize(N, idata(M));

    danger_mask.resize(1 << M);

    for (int i = 0; i < danger_mask.size(); i ++)
        danger_mask[i].setMask(i);

    for (int i = 0; i < N; i ++) {
        for (int j = 0; j < M; j ++) {
            int x; cin >> x; x = 2 * x - 1;

            values[i][j] = x;
            sum[j] += x;
        }
    }

    for (int i = 0; i < N; i ++) {
        int dm = 0;
        int si = 0;
        for (int j = 0; j < M; j ++) {
            if (values[i][j] == 1) continue ;

            dm |= 1 << j;
            si ++;
        }

        danger_mask[dm].append(i, si);
    }

    for (int m = (1 << M) - 1; m >= 0; m --) {
        for (int h = 0; h < M; h ++) {
            int nm = (1 << h) | m;
            if (nm == m) continue ;

            danger_mask[m].import(danger_mask[nm]);
        }
    }

    for (int m = 0; m < danger_mask.size(); m ++) {
        for (int h = 0; h < M; h ++) {
            int nm = (1 << h) | m;
            if (nm == m) continue ;

            danger_mask[nm].import(danger_mask[m]);
        }
    }

    for (int i = 0; i < N; i ++) {
        int dm = 0;
        int si = 0;
        for (int j = 0; j < M; j ++) {
            int r = sum[j] - values[i][j];

            if (r >= 2) si ++;
            else if (r >= 0) dm |= (1 << j);
        }

        cout << danger_mask[dm].get(i) + si << endl;
    }
}

Compilation message

council.cpp: In function 'int main()':
council.cpp:80:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<MaskData>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   80 |     for (int i = 0; i < danger_mask.size(); i ++)
      |                     ~~^~~~~~~~~~~~~~~~~~~~
council.cpp:114:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<MaskData>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  114 |     for (int m = 0; m < danger_mask.size(); m ++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 296 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 269 ms 20820 KB Output is correct
6 Correct 243 ms 20820 KB Output is correct
7 Correct 268 ms 20820 KB Output is correct
8 Correct 307 ms 20820 KB Output is correct
9 Correct 353 ms 20856 KB Output is correct
10 Correct 283 ms 20820 KB Output is correct
11 Correct 320 ms 20820 KB Output is correct
12 Correct 362 ms 20860 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 296 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 0 ms 300 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 1 ms 212 KB Output is correct
28 Correct 1 ms 300 KB Output is correct
29 Correct 1 ms 300 KB Output is correct
30 Correct 1 ms 300 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 0 ms 304 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 304 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 304 KB Output is correct
40 Correct 1 ms 304 KB Output is correct
41 Correct 4 ms 596 KB Output is correct
42 Correct 4 ms 596 KB Output is correct
43 Correct 5 ms 596 KB Output is correct
44 Correct 4 ms 640 KB Output is correct
45 Correct 5 ms 632 KB Output is correct
46 Correct 30 ms 2772 KB Output is correct
47 Correct 33 ms 2772 KB Output is correct
48 Correct 40 ms 2900 KB Output is correct
49 Correct 33 ms 2856 KB Output is correct
50 Correct 36 ms 2772 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 296 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 269 ms 20820 KB Output is correct
6 Correct 243 ms 20820 KB Output is correct
7 Correct 268 ms 20820 KB Output is correct
8 Correct 307 ms 20820 KB Output is correct
9 Correct 353 ms 20856 KB Output is correct
10 Correct 283 ms 20820 KB Output is correct
11 Correct 320 ms 20820 KB Output is correct
12 Correct 362 ms 20860 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 296 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 0 ms 300 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 1 ms 212 KB Output is correct
28 Correct 1 ms 300 KB Output is correct
29 Correct 1 ms 300 KB Output is correct
30 Correct 1 ms 300 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 0 ms 304 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 304 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 304 KB Output is correct
40 Correct 1 ms 304 KB Output is correct
41 Correct 4 ms 596 KB Output is correct
42 Correct 4 ms 596 KB Output is correct
43 Correct 5 ms 596 KB Output is correct
44 Correct 4 ms 640 KB Output is correct
45 Correct 5 ms 632 KB Output is correct
46 Correct 30 ms 2772 KB Output is correct
47 Correct 33 ms 2772 KB Output is correct
48 Correct 40 ms 2900 KB Output is correct
49 Correct 33 ms 2856 KB Output is correct
50 Correct 36 ms 2772 KB Output is correct
51 Correct 253 ms 21224 KB Output is correct
52 Correct 265 ms 21352 KB Output is correct
53 Correct 302 ms 21208 KB Output is correct
54 Correct 373 ms 21284 KB Output is correct
55 Correct 6 ms 512 KB Output is correct
56 Correct 52 ms 3260 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 375 ms 17876 KB Output is correct
3 Correct 390 ms 18624 KB Output is correct
4 Correct 344 ms 17864 KB Output is correct
5 Correct 386 ms 18708 KB Output is correct
6 Correct 345 ms 17844 KB Output is correct
7 Correct 388 ms 18436 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 ms 304 KB Output is correct
15 Correct 1 ms 300 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 4 ms 468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 375 ms 17876 KB Output is correct
3 Correct 390 ms 18624 KB Output is correct
4 Correct 344 ms 17864 KB Output is correct
5 Correct 386 ms 18708 KB Output is correct
6 Correct 345 ms 17844 KB Output is correct
7 Correct 388 ms 18436 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 ms 304 KB Output is correct
15 Correct 1 ms 300 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 4 ms 468 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 677 ms 27824 KB Output is correct
21 Correct 642 ms 27324 KB Output is correct
22 Correct 642 ms 27308 KB Output is correct
23 Correct 655 ms 28212 KB Output is correct
24 Correct 654 ms 27876 KB Output is correct
25 Correct 694 ms 27872 KB Output is correct
26 Correct 684 ms 27908 KB Output is correct
27 Correct 1 ms 296 KB Output is correct
28 Correct 1 ms 296 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 0 ms 296 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 300 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 304 KB Output is correct
37 Correct 0 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 212 KB Output is correct
41 Correct 1 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 1 ms 212 KB Output is correct
44 Correct 1 ms 212 KB Output is correct
45 Correct 1 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 375 ms 17876 KB Output is correct
3 Correct 390 ms 18624 KB Output is correct
4 Correct 344 ms 17864 KB Output is correct
5 Correct 386 ms 18708 KB Output is correct
6 Correct 345 ms 17844 KB Output is correct
7 Correct 388 ms 18436 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 ms 304 KB Output is correct
15 Correct 1 ms 300 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 4 ms 468 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 677 ms 27824 KB Output is correct
21 Correct 642 ms 27324 KB Output is correct
22 Correct 642 ms 27308 KB Output is correct
23 Correct 655 ms 28212 KB Output is correct
24 Correct 654 ms 27876 KB Output is correct
25 Correct 694 ms 27872 KB Output is correct
26 Correct 684 ms 27908 KB Output is correct
27 Correct 1 ms 296 KB Output is correct
28 Correct 1 ms 296 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 0 ms 296 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 300 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 304 KB Output is correct
37 Correct 0 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 212 KB Output is correct
41 Correct 1 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 1 ms 212 KB Output is correct
44 Correct 1 ms 212 KB Output is correct
45 Correct 1 ms 340 KB Output is correct
46 Correct 1 ms 296 KB Output is correct
47 Correct 833 ms 35252 KB Output is correct
48 Correct 788 ms 34444 KB Output is correct
49 Correct 796 ms 34416 KB Output is correct
50 Correct 776 ms 35488 KB Output is correct
51 Correct 801 ms 35200 KB Output is correct
52 Correct 837 ms 35188 KB Output is correct
53 Correct 846 ms 35516 KB Output is correct
54 Correct 4 ms 596 KB Output is correct
55 Correct 4 ms 596 KB Output is correct
56 Correct 5 ms 596 KB Output is correct
57 Correct 4 ms 596 KB Output is correct
58 Correct 4 ms 596 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 375 ms 17876 KB Output is correct
3 Correct 390 ms 18624 KB Output is correct
4 Correct 344 ms 17864 KB Output is correct
5 Correct 386 ms 18708 KB Output is correct
6 Correct 345 ms 17844 KB Output is correct
7 Correct 388 ms 18436 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 ms 304 KB Output is correct
15 Correct 1 ms 300 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 4 ms 468 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 677 ms 27824 KB Output is correct
21 Correct 642 ms 27324 KB Output is correct
22 Correct 642 ms 27308 KB Output is correct
23 Correct 655 ms 28212 KB Output is correct
24 Correct 654 ms 27876 KB Output is correct
25 Correct 694 ms 27872 KB Output is correct
26 Correct 684 ms 27908 KB Output is correct
27 Correct 1 ms 296 KB Output is correct
28 Correct 1 ms 296 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 0 ms 296 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 300 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 304 KB Output is correct
37 Correct 0 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 212 KB Output is correct
41 Correct 1 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 1 ms 212 KB Output is correct
44 Correct 1 ms 212 KB Output is correct
45 Correct 1 ms 340 KB Output is correct
46 Correct 1 ms 296 KB Output is correct
47 Correct 833 ms 35252 KB Output is correct
48 Correct 788 ms 34444 KB Output is correct
49 Correct 796 ms 34416 KB Output is correct
50 Correct 776 ms 35488 KB Output is correct
51 Correct 801 ms 35200 KB Output is correct
52 Correct 837 ms 35188 KB Output is correct
53 Correct 846 ms 35516 KB Output is correct
54 Correct 4 ms 596 KB Output is correct
55 Correct 4 ms 596 KB Output is correct
56 Correct 5 ms 596 KB Output is correct
57 Correct 4 ms 596 KB Output is correct
58 Correct 4 ms 596 KB Output is correct
59 Correct 914 ms 42328 KB Output is correct
60 Correct 408 ms 18604 KB Output is correct
61 Correct 428 ms 19712 KB Output is correct
62 Correct 444 ms 20304 KB Output is correct
63 Correct 928 ms 42060 KB Output is correct
64 Correct 964 ms 43864 KB Output is correct
65 Correct 974 ms 43896 KB Output is correct
66 Correct 902 ms 44224 KB Output is correct
67 Correct 942 ms 43940 KB Output is correct
68 Correct 984 ms 43992 KB Output is correct
69 Correct 1014 ms 44168 KB Output is correct
70 Correct 29 ms 2772 KB Output is correct
71 Correct 32 ms 2892 KB Output is correct
72 Correct 37 ms 2860 KB Output is correct
73 Correct 33 ms 2880 KB Output is correct
74 Correct 35 ms 2860 KB Output is correct
75 Correct 53 ms 3272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 296 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 269 ms 20820 KB Output is correct
6 Correct 243 ms 20820 KB Output is correct
7 Correct 268 ms 20820 KB Output is correct
8 Correct 307 ms 20820 KB Output is correct
9 Correct 353 ms 20856 KB Output is correct
10 Correct 283 ms 20820 KB Output is correct
11 Correct 320 ms 20820 KB Output is correct
12 Correct 362 ms 20860 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 296 KB Output is correct
20 Correct 1 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 0 ms 300 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 1 ms 212 KB Output is correct
28 Correct 1 ms 300 KB Output is correct
29 Correct 1 ms 300 KB Output is correct
30 Correct 1 ms 300 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 0 ms 304 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 304 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 304 KB Output is correct
40 Correct 1 ms 304 KB Output is correct
41 Correct 4 ms 596 KB Output is correct
42 Correct 4 ms 596 KB Output is correct
43 Correct 5 ms 596 KB Output is correct
44 Correct 4 ms 640 KB Output is correct
45 Correct 5 ms 632 KB Output is correct
46 Correct 30 ms 2772 KB Output is correct
47 Correct 33 ms 2772 KB Output is correct
48 Correct 40 ms 2900 KB Output is correct
49 Correct 33 ms 2856 KB Output is correct
50 Correct 36 ms 2772 KB Output is correct
51 Correct 253 ms 21224 KB Output is correct
52 Correct 265 ms 21352 KB Output is correct
53 Correct 302 ms 21208 KB Output is correct
54 Correct 373 ms 21284 KB Output is correct
55 Correct 6 ms 512 KB Output is correct
56 Correct 52 ms 3260 KB Output is correct
57 Correct 1 ms 212 KB Output is correct
58 Correct 375 ms 17876 KB Output is correct
59 Correct 390 ms 18624 KB Output is correct
60 Correct 344 ms 17864 KB Output is correct
61 Correct 386 ms 18708 KB Output is correct
62 Correct 345 ms 17844 KB Output is correct
63 Correct 388 ms 18436 KB Output is correct
64 Correct 1 ms 212 KB Output is correct
65 Correct 0 ms 212 KB Output is correct
66 Correct 1 ms 212 KB Output is correct
67 Correct 1 ms 212 KB Output is correct
68 Correct 1 ms 212 KB Output is correct
69 Correct 1 ms 212 KB Output is correct
70 Correct 0 ms 304 KB Output is correct
71 Correct 1 ms 300 KB Output is correct
72 Correct 1 ms 212 KB Output is correct
73 Correct 4 ms 468 KB Output is correct
74 Correct 0 ms 212 KB Output is correct
75 Correct 1 ms 212 KB Output is correct
76 Correct 677 ms 27824 KB Output is correct
77 Correct 642 ms 27324 KB Output is correct
78 Correct 642 ms 27308 KB Output is correct
79 Correct 655 ms 28212 KB Output is correct
80 Correct 654 ms 27876 KB Output is correct
81 Correct 694 ms 27872 KB Output is correct
82 Correct 684 ms 27908 KB Output is correct
83 Correct 1 ms 296 KB Output is correct
84 Correct 1 ms 296 KB Output is correct
85 Correct 1 ms 212 KB Output is correct
86 Correct 0 ms 296 KB Output is correct
87 Correct 1 ms 212 KB Output is correct
88 Correct 1 ms 212 KB Output is correct
89 Correct 1 ms 212 KB Output is correct
90 Correct 1 ms 300 KB Output is correct
91 Correct 1 ms 212 KB Output is correct
92 Correct 1 ms 304 KB Output is correct
93 Correct 0 ms 212 KB Output is correct
94 Correct 0 ms 212 KB Output is correct
95 Correct 1 ms 212 KB Output is correct
96 Correct 1 ms 212 KB Output is correct
97 Correct 1 ms 212 KB Output is correct
98 Correct 1 ms 212 KB Output is correct
99 Correct 1 ms 212 KB Output is correct
100 Correct 1 ms 212 KB Output is correct
101 Correct 1 ms 340 KB Output is correct
102 Correct 1 ms 296 KB Output is correct
103 Correct 833 ms 35252 KB Output is correct
104 Correct 788 ms 34444 KB Output is correct
105 Correct 796 ms 34416 KB Output is correct
106 Correct 776 ms 35488 KB Output is correct
107 Correct 801 ms 35200 KB Output is correct
108 Correct 837 ms 35188 KB Output is correct
109 Correct 846 ms 35516 KB Output is correct
110 Correct 4 ms 596 KB Output is correct
111 Correct 4 ms 596 KB Output is correct
112 Correct 5 ms 596 KB Output is correct
113 Correct 4 ms 596 KB Output is correct
114 Correct 4 ms 596 KB Output is correct
115 Correct 914 ms 42328 KB Output is correct
116 Correct 408 ms 18604 KB Output is correct
117 Correct 428 ms 19712 KB Output is correct
118 Correct 444 ms 20304 KB Output is correct
119 Correct 928 ms 42060 KB Output is correct
120 Correct 964 ms 43864 KB Output is correct
121 Correct 974 ms 43896 KB Output is correct
122 Correct 902 ms 44224 KB Output is correct
123 Correct 942 ms 43940 KB Output is correct
124 Correct 984 ms 43992 KB Output is correct
125 Correct 1014 ms 44168 KB Output is correct
126 Correct 29 ms 2772 KB Output is correct
127 Correct 32 ms 2892 KB Output is correct
128 Correct 37 ms 2860 KB Output is correct
129 Correct 33 ms 2880 KB Output is correct
130 Correct 35 ms 2860 KB Output is correct
131 Correct 53 ms 3272 KB Output is correct
132 Correct 1347 ms 68648 KB Output is correct
133 Correct 1320 ms 68556 KB Output is correct
134 Correct 1351 ms 68568 KB Output is correct
135 Correct 1417 ms 68568 KB Output is correct
136 Correct 1379 ms 68564 KB Output is correct
137 Correct 1176 ms 57680 KB Output is correct
138 Correct 1244 ms 57796 KB Output is correct
139 Correct 1210 ms 68628 KB Output is correct
140 Correct 1257 ms 68376 KB Output is correct
141 Correct 1389 ms 68308 KB Output is correct
142 Correct 1443 ms 68596 KB Output is correct