Submission #727415

# Submission time Handle Problem Language Result Execution time Memory
727415 2023-04-20T15:49:12 Z model_code Council (JOI23_council) C++17
100 / 100
1373 ms 104344 KB
#include <array>
#include <bitset>
#include <iostream>
#include <vector>
using namespace std;

constexpr int N_MAX = 3e5, M_MAX = 20;
int popcnt(int x) { return bitset<32>(x).count(); }
int read() {
    int x;
    scanf("%d", &x);
    return x;
}
int A[N_MAX], agree[M_MAX], sum[1 << M_MAX][M_MAX], mn[1 << M_MAX][2];
int main() {
    const int N = read(), M = read();

    // 入力・各案に何票あるか数える
    for(int i = 0; i < N; i++) {
        for(int j = 0; j < M; j++) {
            const int x = read();
            A[i] |= x << j;
            agree[j] += x;
        }
    }

    // 可決に必要な票数
    const int need = N / 2;
    // need + 0 票の集合、need + 1 票の集合、need + 2 票以上の案の数
    int zero = 0, one = 0, two = 0;
    for(int i = 0; i < M; i++) {
        if(agree[i] == need) zero |= 1 << i;
        if(agree[i] == need + 1) one |= 1 << i;
        if(agree[i] >= need + 2) two++;
    }

    // sum[s][d] = 案の集合を s に絞ったとき、そのうち d 個に賛成している人の数
    for(int i = 0; i < N; i++) {
        const int a = A[i];
        sum[a][popcnt(a)]++;
    }
    // 高速ゼータ変換 (下位集合に累積和)
    for(int d = 0; d < M; d++) for(int s = 0; s < 1 << M; s++) if(s & 1 << d) {
                const int t = s ^ 1 << d, i = popcnt(s);
                sum[t][i - 1] += sum[s][i];
    }
    // 求めたいものを作る
    for(int d = 0; d < M; d++) for(int s = 0; s < 1 << M; s++) if(s & 1 << d) {
        const int t = s ^ 1 << d;
        for(int i = 0; i < M; i++) sum[s][i] += sum[t][i] - sum[s][i + 1];
    }
    // 各 s に対し d の first min, second min を求める
    for(int s = 0; s < 1 << M; s++) for(int d = M; d--; ) {
        if(sum[s][d] < 1) continue;
        if(sum[s][d] == 1) {
            mn[s][1] = mn[s][0];
            mn[s][0] = d;
        }
        else {
            mn[s][0] = d;
            mn[s][1] = d;
        }
    }
    // 各議員に対し答えを求める。
    for(int i = 0; i < N; i++) printf("%d\n", [&](int a) -> int {
        const int ZERO = (zero & ~a) | (one & a);
        const int rejected = mn[ZERO][mn[ZERO][0] == popcnt(a & ZERO)];
        return two + popcnt(one | ZERO) - rejected;
    }(A[i]));
}

Compilation message

council.cpp: In function 'int read()':
council.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |     scanf("%d", &x);
      |     ~~~~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 596 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 509 ms 90580 KB Output is correct
6 Correct 486 ms 90584 KB Output is correct
7 Correct 527 ms 90504 KB Output is correct
8 Correct 530 ms 90564 KB Output is correct
9 Correct 500 ms 90572 KB Output is correct
10 Correct 496 ms 90564 KB Output is correct
11 Correct 509 ms 90476 KB Output is correct
12 Correct 494 ms 90568 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 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 1 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 212 KB Output is correct
24 Correct 1 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 0 ms 340 KB Output is correct
29 Correct 2 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 2 ms 340 KB Output is correct
32 Correct 0 ms 212 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 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 1 ms 344 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 6 ms 1620 KB Output is correct
42 Correct 6 ms 1620 KB Output is correct
43 Correct 4 ms 1620 KB Output is correct
44 Correct 4 ms 1620 KB Output is correct
45 Correct 5 ms 1620 KB Output is correct
46 Correct 50 ms 11468 KB Output is correct
47 Correct 48 ms 11556 KB Output is correct
48 Correct 107 ms 11568 KB Output is correct
49 Correct 108 ms 11488 KB Output is correct
50 Correct 55 ms 11584 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 596 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 509 ms 90580 KB Output is correct
6 Correct 486 ms 90584 KB Output is correct
7 Correct 527 ms 90504 KB Output is correct
8 Correct 530 ms 90564 KB Output is correct
9 Correct 500 ms 90572 KB Output is correct
10 Correct 496 ms 90564 KB Output is correct
11 Correct 509 ms 90476 KB Output is correct
12 Correct 494 ms 90568 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 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 1 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 212 KB Output is correct
24 Correct 1 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 0 ms 340 KB Output is correct
29 Correct 2 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 2 ms 340 KB Output is correct
32 Correct 0 ms 212 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 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 1 ms 344 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 6 ms 1620 KB Output is correct
42 Correct 6 ms 1620 KB Output is correct
43 Correct 4 ms 1620 KB Output is correct
44 Correct 4 ms 1620 KB Output is correct
45 Correct 5 ms 1620 KB Output is correct
46 Correct 50 ms 11468 KB Output is correct
47 Correct 48 ms 11556 KB Output is correct
48 Correct 107 ms 11568 KB Output is correct
49 Correct 108 ms 11488 KB Output is correct
50 Correct 55 ms 11584 KB Output is correct
51 Correct 483 ms 90544 KB Output is correct
52 Correct 481 ms 90624 KB Output is correct
53 Correct 511 ms 90588 KB Output is correct
54 Correct 490 ms 90652 KB Output is correct
55 Correct 1 ms 212 KB Output is correct
56 Correct 79 ms 11652 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 119 ms 2536 KB Output is correct
3 Correct 87 ms 2504 KB Output is correct
4 Correct 60 ms 2332 KB Output is correct
5 Correct 90 ms 2644 KB Output is correct
6 Correct 63 ms 2268 KB Output is correct
7 Correct 122 ms 2004 KB Output is correct
8 Correct 2 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 2 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 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 2 ms 212 KB Output is correct
17 Correct 3 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 119 ms 2536 KB Output is correct
3 Correct 87 ms 2504 KB Output is correct
4 Correct 60 ms 2332 KB Output is correct
5 Correct 90 ms 2644 KB Output is correct
6 Correct 63 ms 2268 KB Output is correct
7 Correct 122 ms 2004 KB Output is correct
8 Correct 2 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 2 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 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 2 ms 212 KB Output is correct
17 Correct 3 ms 340 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 322 ms 4096 KB Output is correct
21 Correct 466 ms 3192 KB Output is correct
22 Correct 287 ms 3764 KB Output is correct
23 Correct 282 ms 5292 KB Output is correct
24 Correct 264 ms 5112 KB Output is correct
25 Correct 367 ms 4368 KB Output is correct
26 Correct 307 ms 4336 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 1 ms 212 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 1 ms 212 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 2 ms 340 KB Output is correct
36 Correct 2 ms 340 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 0 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 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 1 ms 340 KB Output is correct
45 Correct 1 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 119 ms 2536 KB Output is correct
3 Correct 87 ms 2504 KB Output is correct
4 Correct 60 ms 2332 KB Output is correct
5 Correct 90 ms 2644 KB Output is correct
6 Correct 63 ms 2268 KB Output is correct
7 Correct 122 ms 2004 KB Output is correct
8 Correct 2 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 2 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 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 2 ms 212 KB Output is correct
17 Correct 3 ms 340 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 322 ms 4096 KB Output is correct
21 Correct 466 ms 3192 KB Output is correct
22 Correct 287 ms 3764 KB Output is correct
23 Correct 282 ms 5292 KB Output is correct
24 Correct 264 ms 5112 KB Output is correct
25 Correct 367 ms 4368 KB Output is correct
26 Correct 307 ms 4336 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 1 ms 212 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 1 ms 212 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 2 ms 340 KB Output is correct
36 Correct 2 ms 340 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 0 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 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 1 ms 340 KB Output is correct
45 Correct 1 ms 340 KB Output is correct
46 Correct 2 ms 596 KB Output is correct
47 Correct 460 ms 8712 KB Output is correct
48 Correct 478 ms 4128 KB Output is correct
49 Correct 417 ms 4820 KB Output is correct
50 Correct 406 ms 10828 KB Output is correct
51 Correct 364 ms 4908 KB Output is correct
52 Correct 469 ms 3800 KB Output is correct
53 Correct 470 ms 6412 KB Output is correct
54 Correct 4 ms 1620 KB Output is correct
55 Correct 9 ms 1732 KB Output is correct
56 Correct 5 ms 1620 KB Output is correct
57 Correct 9 ms 1716 KB Output is correct
58 Correct 4 ms 1620 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 119 ms 2536 KB Output is correct
3 Correct 87 ms 2504 KB Output is correct
4 Correct 60 ms 2332 KB Output is correct
5 Correct 90 ms 2644 KB Output is correct
6 Correct 63 ms 2268 KB Output is correct
7 Correct 122 ms 2004 KB Output is correct
8 Correct 2 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 2 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 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 2 ms 212 KB Output is correct
17 Correct 3 ms 340 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 322 ms 4096 KB Output is correct
21 Correct 466 ms 3192 KB Output is correct
22 Correct 287 ms 3764 KB Output is correct
23 Correct 282 ms 5292 KB Output is correct
24 Correct 264 ms 5112 KB Output is correct
25 Correct 367 ms 4368 KB Output is correct
26 Correct 307 ms 4336 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 1 ms 212 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 1 ms 212 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 2 ms 340 KB Output is correct
36 Correct 2 ms 340 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 0 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 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 1 ms 340 KB Output is correct
45 Correct 1 ms 340 KB Output is correct
46 Correct 2 ms 596 KB Output is correct
47 Correct 460 ms 8712 KB Output is correct
48 Correct 478 ms 4128 KB Output is correct
49 Correct 417 ms 4820 KB Output is correct
50 Correct 406 ms 10828 KB Output is correct
51 Correct 364 ms 4908 KB Output is correct
52 Correct 469 ms 3800 KB Output is correct
53 Correct 470 ms 6412 KB Output is correct
54 Correct 4 ms 1620 KB Output is correct
55 Correct 9 ms 1732 KB Output is correct
56 Correct 5 ms 1620 KB Output is correct
57 Correct 9 ms 1716 KB Output is correct
58 Correct 4 ms 1620 KB Output is correct
59 Correct 502 ms 8580 KB Output is correct
60 Correct 238 ms 12364 KB Output is correct
61 Correct 245 ms 16336 KB Output is correct
62 Correct 293 ms 12544 KB Output is correct
63 Correct 522 ms 16732 KB Output is correct
64 Correct 839 ms 13272 KB Output is correct
65 Correct 569 ms 23220 KB Output is correct
66 Correct 647 ms 23408 KB Output is correct
67 Correct 548 ms 13712 KB Output is correct
68 Correct 628 ms 20088 KB Output is correct
69 Correct 519 ms 14024 KB Output is correct
70 Correct 60 ms 11596 KB Output is correct
71 Correct 91 ms 11584 KB Output is correct
72 Correct 72 ms 11552 KB Output is correct
73 Correct 55 ms 11596 KB Output is correct
74 Correct 65 ms 11580 KB Output is correct
75 Correct 67 ms 11636 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 596 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 509 ms 90580 KB Output is correct
6 Correct 486 ms 90584 KB Output is correct
7 Correct 527 ms 90504 KB Output is correct
8 Correct 530 ms 90564 KB Output is correct
9 Correct 500 ms 90572 KB Output is correct
10 Correct 496 ms 90564 KB Output is correct
11 Correct 509 ms 90476 KB Output is correct
12 Correct 494 ms 90568 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 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 1 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 212 KB Output is correct
24 Correct 1 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 0 ms 340 KB Output is correct
29 Correct 2 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 2 ms 340 KB Output is correct
32 Correct 0 ms 212 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 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 1 ms 344 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 6 ms 1620 KB Output is correct
42 Correct 6 ms 1620 KB Output is correct
43 Correct 4 ms 1620 KB Output is correct
44 Correct 4 ms 1620 KB Output is correct
45 Correct 5 ms 1620 KB Output is correct
46 Correct 50 ms 11468 KB Output is correct
47 Correct 48 ms 11556 KB Output is correct
48 Correct 107 ms 11568 KB Output is correct
49 Correct 108 ms 11488 KB Output is correct
50 Correct 55 ms 11584 KB Output is correct
51 Correct 483 ms 90544 KB Output is correct
52 Correct 481 ms 90624 KB Output is correct
53 Correct 511 ms 90588 KB Output is correct
54 Correct 490 ms 90652 KB Output is correct
55 Correct 1 ms 212 KB Output is correct
56 Correct 79 ms 11652 KB Output is correct
57 Correct 0 ms 212 KB Output is correct
58 Correct 119 ms 2536 KB Output is correct
59 Correct 87 ms 2504 KB Output is correct
60 Correct 60 ms 2332 KB Output is correct
61 Correct 90 ms 2644 KB Output is correct
62 Correct 63 ms 2268 KB Output is correct
63 Correct 122 ms 2004 KB Output is correct
64 Correct 2 ms 212 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 2 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 0 ms 212 KB Output is correct
70 Correct 1 ms 212 KB Output is correct
71 Correct 1 ms 212 KB Output is correct
72 Correct 2 ms 212 KB Output is correct
73 Correct 3 ms 340 KB Output is correct
74 Correct 0 ms 212 KB Output is correct
75 Correct 0 ms 212 KB Output is correct
76 Correct 322 ms 4096 KB Output is correct
77 Correct 466 ms 3192 KB Output is correct
78 Correct 287 ms 3764 KB Output is correct
79 Correct 282 ms 5292 KB Output is correct
80 Correct 264 ms 5112 KB Output is correct
81 Correct 367 ms 4368 KB Output is correct
82 Correct 307 ms 4336 KB Output is correct
83 Correct 1 ms 340 KB Output is correct
84 Correct 1 ms 212 KB Output is correct
85 Correct 1 ms 212 KB Output is correct
86 Correct 1 ms 212 KB Output is correct
87 Correct 1 ms 212 KB Output is correct
88 Correct 0 ms 212 KB Output is correct
89 Correct 1 ms 340 KB Output is correct
90 Correct 1 ms 340 KB Output is correct
91 Correct 2 ms 340 KB Output is correct
92 Correct 2 ms 340 KB Output is correct
93 Correct 1 ms 212 KB Output is correct
94 Correct 1 ms 212 KB Output is correct
95 Correct 0 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 340 KB Output is correct
99 Correct 1 ms 340 KB Output is correct
100 Correct 1 ms 340 KB Output is correct
101 Correct 1 ms 340 KB Output is correct
102 Correct 2 ms 596 KB Output is correct
103 Correct 460 ms 8712 KB Output is correct
104 Correct 478 ms 4128 KB Output is correct
105 Correct 417 ms 4820 KB Output is correct
106 Correct 406 ms 10828 KB Output is correct
107 Correct 364 ms 4908 KB Output is correct
108 Correct 469 ms 3800 KB Output is correct
109 Correct 470 ms 6412 KB Output is correct
110 Correct 4 ms 1620 KB Output is correct
111 Correct 9 ms 1732 KB Output is correct
112 Correct 5 ms 1620 KB Output is correct
113 Correct 9 ms 1716 KB Output is correct
114 Correct 4 ms 1620 KB Output is correct
115 Correct 502 ms 8580 KB Output is correct
116 Correct 238 ms 12364 KB Output is correct
117 Correct 245 ms 16336 KB Output is correct
118 Correct 293 ms 12544 KB Output is correct
119 Correct 522 ms 16732 KB Output is correct
120 Correct 839 ms 13272 KB Output is correct
121 Correct 569 ms 23220 KB Output is correct
122 Correct 647 ms 23408 KB Output is correct
123 Correct 548 ms 13712 KB Output is correct
124 Correct 628 ms 20088 KB Output is correct
125 Correct 519 ms 14024 KB Output is correct
126 Correct 60 ms 11596 KB Output is correct
127 Correct 91 ms 11584 KB Output is correct
128 Correct 72 ms 11552 KB Output is correct
129 Correct 55 ms 11596 KB Output is correct
130 Correct 65 ms 11580 KB Output is correct
131 Correct 67 ms 11636 KB Output is correct
132 Correct 1107 ms 104344 KB Output is correct
133 Correct 1191 ms 100568 KB Output is correct
134 Correct 1373 ms 104092 KB Output is correct
135 Correct 1335 ms 102736 KB Output is correct
136 Correct 1334 ms 104248 KB Output is correct
137 Correct 883 ms 57440 KB Output is correct
138 Correct 795 ms 52752 KB Output is correct
139 Correct 1130 ms 98604 KB Output is correct
140 Correct 998 ms 103716 KB Output is correct
141 Correct 1201 ms 103964 KB Output is correct
142 Correct 1020 ms 103808 KB Output is correct