답안 #979136

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
979136 2024-05-10T09:34:59 Z vjudge1 Council (JOI23_council) C
100 / 100
1531 ms 23384 KB
#include<stdio.h>
#include<assert.h>
#include<string.h>

#define N 300000
#define M 20

int a[N], b[N], n, m, cc[M], f[1<<M][2];

int count(int x) { return x ? 1 + count(x&x-1) : 0; }

int gt(int i,int j,int s){if(i==-1)return 0;if(j==-1)return 1;return count(b[i]&s)>count(b[j]&s);}

void put_(int i, int v)
{
    if (gt(v, f[i][0], i))
        f[i][1]=f[i][0],f[i][0]=v;
    else if (v != f[i][0] && gt(v, f[i][1], i))
        f[i][1]=v;
}

int main()
{
    memset(f,-1,sizeof f);
    scanf("%d%d",&n,&m);
    for(int i=0;i<n;++i)
    {
        for(int x,j=0;j<m;++j)
            scanf("%d",&x),a[i]|=x<<j, cc[j]+=x;

        b[i]=((1<<m)-1)&~a[i];
        put_(b[i], i);
    }

    /* need to find max count(b[i] & S)
     * SOS dp :question: 
     *
     */

    for(int i=0;i<m;++i)
        for(int j=0;j<(1<<m);++j)
            if(1==((j>>i)&1))
            {
                int jj=j^(1<<i);
                put_(jj, f[j][1]); 
                put_(jj, f[j][0]);
            }

    for(int i=0;i<m;++i)
        for(int j=0;j<(1<<m);++j)
            if(0==((j>>i)&1))
            {
                int jj=j^(1<<i);
                put_(jj, f[j][1]); 
                put_(jj, f[j][0]);
            }

    for(int i=0;i<n;++i)
    {
        int S=0,ans=0;
        for(int j=0;j<m;++j)
        {
            int c=cc[j]-((a[i]>>j)&1);
            if (c>n/2)
                ++ans;
            else if(c==n/2)
                S|=1<<j;
        }
        if (i == f[S][0])
            ans += count(b[f[S][1]]&S);
        else
            ans += count(b[f[S][0]]&S);

        printf("%d\n", ans);
    }

}


Compilation message

council.c: In function 'count':
council.c:10:44: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
   10 | int count(int x) { return x ? 1 + count(x&x-1) : 0; }
      |                                           ~^~
council.c: In function 'main':
council.c:25:5: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   25 |     scanf("%d%d",&n,&m);
      |     ^~~~~~~~~~~~~~~~~~~
council.c:29:13: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   29 |             scanf("%d",&x),a[i]|=x<<j, cc[j]+=x;
      |             ^~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9560 KB Output is correct
2 Correct 2 ms 9812 KB Output is correct
3 Correct 2 ms 9560 KB Output is correct
4 Correct 2 ms 9564 KB Output is correct
5 Correct 408 ms 9756 KB Output is correct
6 Correct 195 ms 9764 KB Output is correct
7 Correct 246 ms 9756 KB Output is correct
8 Correct 308 ms 9756 KB Output is correct
9 Correct 573 ms 9564 KB Output is correct
10 Correct 260 ms 9752 KB Output is correct
11 Correct 379 ms 9756 KB Output is correct
12 Correct 611 ms 9560 KB Output is correct
13 Correct 2 ms 9560 KB Output is correct
14 Correct 2 ms 9816 KB Output is correct
15 Correct 2 ms 9560 KB Output is correct
16 Correct 2 ms 9560 KB Output is correct
17 Correct 2 ms 9564 KB Output is correct
18 Correct 2 ms 9564 KB Output is correct
19 Correct 2 ms 9564 KB Output is correct
20 Correct 2 ms 9564 KB Output is correct
21 Correct 2 ms 9768 KB Output is correct
22 Correct 2 ms 9564 KB Output is correct
23 Correct 2 ms 9564 KB Output is correct
24 Correct 2 ms 9564 KB Output is correct
25 Correct 2 ms 9564 KB Output is correct
26 Correct 2 ms 9564 KB Output is correct
27 Correct 2 ms 9564 KB Output is correct
28 Correct 2 ms 9820 KB Output is correct
29 Correct 2 ms 9560 KB Output is correct
30 Correct 2 ms 9564 KB Output is correct
31 Correct 2 ms 9784 KB Output is correct
32 Correct 2 ms 9564 KB Output is correct
33 Correct 2 ms 9720 KB Output is correct
34 Correct 2 ms 9564 KB Output is correct
35 Correct 2 ms 9776 KB Output is correct
36 Correct 2 ms 9564 KB Output is correct
37 Correct 2 ms 9564 KB Output is correct
38 Correct 2 ms 9564 KB Output is correct
39 Correct 2 ms 9560 KB Output is correct
40 Correct 3 ms 9564 KB Output is correct
41 Correct 7 ms 9780 KB Output is correct
42 Correct 5 ms 9772 KB Output is correct
43 Correct 6 ms 9780 KB Output is correct
44 Correct 5 ms 9564 KB Output is correct
45 Correct 6 ms 9812 KB Output is correct
46 Correct 46 ms 9820 KB Output is correct
47 Correct 34 ms 9788 KB Output is correct
48 Correct 41 ms 9808 KB Output is correct
49 Correct 31 ms 9812 KB Output is correct
50 Correct 48 ms 9772 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9560 KB Output is correct
2 Correct 2 ms 9812 KB Output is correct
3 Correct 2 ms 9560 KB Output is correct
4 Correct 2 ms 9564 KB Output is correct
5 Correct 408 ms 9756 KB Output is correct
6 Correct 195 ms 9764 KB Output is correct
7 Correct 246 ms 9756 KB Output is correct
8 Correct 308 ms 9756 KB Output is correct
9 Correct 573 ms 9564 KB Output is correct
10 Correct 260 ms 9752 KB Output is correct
11 Correct 379 ms 9756 KB Output is correct
12 Correct 611 ms 9560 KB Output is correct
13 Correct 2 ms 9560 KB Output is correct
14 Correct 2 ms 9816 KB Output is correct
15 Correct 2 ms 9560 KB Output is correct
16 Correct 2 ms 9560 KB Output is correct
17 Correct 2 ms 9564 KB Output is correct
18 Correct 2 ms 9564 KB Output is correct
19 Correct 2 ms 9564 KB Output is correct
20 Correct 2 ms 9564 KB Output is correct
21 Correct 2 ms 9768 KB Output is correct
22 Correct 2 ms 9564 KB Output is correct
23 Correct 2 ms 9564 KB Output is correct
24 Correct 2 ms 9564 KB Output is correct
25 Correct 2 ms 9564 KB Output is correct
26 Correct 2 ms 9564 KB Output is correct
27 Correct 2 ms 9564 KB Output is correct
28 Correct 2 ms 9820 KB Output is correct
29 Correct 2 ms 9560 KB Output is correct
30 Correct 2 ms 9564 KB Output is correct
31 Correct 2 ms 9784 KB Output is correct
32 Correct 2 ms 9564 KB Output is correct
33 Correct 2 ms 9720 KB Output is correct
34 Correct 2 ms 9564 KB Output is correct
35 Correct 2 ms 9776 KB Output is correct
36 Correct 2 ms 9564 KB Output is correct
37 Correct 2 ms 9564 KB Output is correct
38 Correct 2 ms 9564 KB Output is correct
39 Correct 2 ms 9560 KB Output is correct
40 Correct 3 ms 9564 KB Output is correct
41 Correct 7 ms 9780 KB Output is correct
42 Correct 5 ms 9772 KB Output is correct
43 Correct 6 ms 9780 KB Output is correct
44 Correct 5 ms 9564 KB Output is correct
45 Correct 6 ms 9812 KB Output is correct
46 Correct 46 ms 9820 KB Output is correct
47 Correct 34 ms 9788 KB Output is correct
48 Correct 41 ms 9808 KB Output is correct
49 Correct 31 ms 9812 KB Output is correct
50 Correct 48 ms 9772 KB Output is correct
51 Correct 194 ms 9884 KB Output is correct
52 Correct 589 ms 9884 KB Output is correct
53 Correct 752 ms 9884 KB Output is correct
54 Correct 738 ms 9884 KB Output is correct
55 Correct 3 ms 9560 KB Output is correct
56 Correct 98 ms 9864 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9564 KB Output is correct
2 Correct 73 ms 12132 KB Output is correct
3 Correct 65 ms 12312 KB Output is correct
4 Correct 48 ms 11860 KB Output is correct
5 Correct 68 ms 12104 KB Output is correct
6 Correct 50 ms 11932 KB Output is correct
7 Correct 68 ms 12168 KB Output is correct
8 Correct 2 ms 9564 KB Output is correct
9 Correct 2 ms 9560 KB Output is correct
10 Correct 2 ms 9816 KB Output is correct
11 Correct 2 ms 9564 KB Output is correct
12 Correct 2 ms 9564 KB Output is correct
13 Correct 2 ms 9772 KB Output is correct
14 Correct 2 ms 9560 KB Output is correct
15 Correct 2 ms 9564 KB Output is correct
16 Correct 2 ms 9772 KB Output is correct
17 Correct 2 ms 9564 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9564 KB Output is correct
2 Correct 73 ms 12132 KB Output is correct
3 Correct 65 ms 12312 KB Output is correct
4 Correct 48 ms 11860 KB Output is correct
5 Correct 68 ms 12104 KB Output is correct
6 Correct 50 ms 11932 KB Output is correct
7 Correct 68 ms 12168 KB Output is correct
8 Correct 2 ms 9564 KB Output is correct
9 Correct 2 ms 9560 KB Output is correct
10 Correct 2 ms 9816 KB Output is correct
11 Correct 2 ms 9564 KB Output is correct
12 Correct 2 ms 9564 KB Output is correct
13 Correct 2 ms 9772 KB Output is correct
14 Correct 2 ms 9560 KB Output is correct
15 Correct 2 ms 9564 KB Output is correct
16 Correct 2 ms 9772 KB Output is correct
17 Correct 2 ms 9564 KB Output is correct
18 Correct 2 ms 9560 KB Output is correct
19 Correct 2 ms 9564 KB Output is correct
20 Correct 227 ms 14564 KB Output is correct
21 Correct 209 ms 14164 KB Output is correct
22 Correct 205 ms 14272 KB Output is correct
23 Correct 211 ms 14720 KB Output is correct
24 Correct 218 ms 14672 KB Output is correct
25 Correct 246 ms 14716 KB Output is correct
26 Correct 229 ms 14420 KB Output is correct
27 Correct 2 ms 9564 KB Output is correct
28 Correct 2 ms 9564 KB Output is correct
29 Correct 2 ms 9564 KB Output is correct
30 Correct 2 ms 9564 KB Output is correct
31 Correct 2 ms 9564 KB Output is correct
32 Correct 2 ms 9564 KB Output is correct
33 Correct 2 ms 9564 KB Output is correct
34 Correct 2 ms 9564 KB Output is correct
35 Correct 3 ms 9564 KB Output is correct
36 Correct 2 ms 9560 KB Output is correct
37 Correct 2 ms 9564 KB Output is correct
38 Correct 2 ms 9564 KB Output is correct
39 Correct 2 ms 9564 KB Output is correct
40 Correct 2 ms 9564 KB Output is correct
41 Correct 2 ms 9564 KB Output is correct
42 Correct 2 ms 9564 KB Output is correct
43 Correct 2 ms 9564 KB Output is correct
44 Correct 2 ms 9560 KB Output is correct
45 Correct 2 ms 9564 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9564 KB Output is correct
2 Correct 73 ms 12132 KB Output is correct
3 Correct 65 ms 12312 KB Output is correct
4 Correct 48 ms 11860 KB Output is correct
5 Correct 68 ms 12104 KB Output is correct
6 Correct 50 ms 11932 KB Output is correct
7 Correct 68 ms 12168 KB Output is correct
8 Correct 2 ms 9564 KB Output is correct
9 Correct 2 ms 9560 KB Output is correct
10 Correct 2 ms 9816 KB Output is correct
11 Correct 2 ms 9564 KB Output is correct
12 Correct 2 ms 9564 KB Output is correct
13 Correct 2 ms 9772 KB Output is correct
14 Correct 2 ms 9560 KB Output is correct
15 Correct 2 ms 9564 KB Output is correct
16 Correct 2 ms 9772 KB Output is correct
17 Correct 2 ms 9564 KB Output is correct
18 Correct 2 ms 9560 KB Output is correct
19 Correct 2 ms 9564 KB Output is correct
20 Correct 227 ms 14564 KB Output is correct
21 Correct 209 ms 14164 KB Output is correct
22 Correct 205 ms 14272 KB Output is correct
23 Correct 211 ms 14720 KB Output is correct
24 Correct 218 ms 14672 KB Output is correct
25 Correct 246 ms 14716 KB Output is correct
26 Correct 229 ms 14420 KB Output is correct
27 Correct 2 ms 9564 KB Output is correct
28 Correct 2 ms 9564 KB Output is correct
29 Correct 2 ms 9564 KB Output is correct
30 Correct 2 ms 9564 KB Output is correct
31 Correct 2 ms 9564 KB Output is correct
32 Correct 2 ms 9564 KB Output is correct
33 Correct 2 ms 9564 KB Output is correct
34 Correct 2 ms 9564 KB Output is correct
35 Correct 3 ms 9564 KB Output is correct
36 Correct 2 ms 9560 KB Output is correct
37 Correct 2 ms 9564 KB Output is correct
38 Correct 2 ms 9564 KB Output is correct
39 Correct 2 ms 9564 KB Output is correct
40 Correct 2 ms 9564 KB Output is correct
41 Correct 2 ms 9564 KB Output is correct
42 Correct 2 ms 9564 KB Output is correct
43 Correct 2 ms 9564 KB Output is correct
44 Correct 2 ms 9560 KB Output is correct
45 Correct 2 ms 9564 KB Output is correct
46 Correct 2 ms 9564 KB Output is correct
47 Correct 311 ms 15848 KB Output is correct
48 Correct 286 ms 15444 KB Output is correct
49 Correct 288 ms 15768 KB Output is correct
50 Correct 317 ms 16004 KB Output is correct
51 Correct 282 ms 15808 KB Output is correct
52 Correct 316 ms 15696 KB Output is correct
53 Correct 321 ms 16040 KB Output is correct
54 Correct 6 ms 9564 KB Output is correct
55 Correct 4 ms 9780 KB Output is correct
56 Correct 6 ms 9560 KB Output is correct
57 Correct 7 ms 9564 KB Output is correct
58 Correct 7 ms 9564 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9564 KB Output is correct
2 Correct 73 ms 12132 KB Output is correct
3 Correct 65 ms 12312 KB Output is correct
4 Correct 48 ms 11860 KB Output is correct
5 Correct 68 ms 12104 KB Output is correct
6 Correct 50 ms 11932 KB Output is correct
7 Correct 68 ms 12168 KB Output is correct
8 Correct 2 ms 9564 KB Output is correct
9 Correct 2 ms 9560 KB Output is correct
10 Correct 2 ms 9816 KB Output is correct
11 Correct 2 ms 9564 KB Output is correct
12 Correct 2 ms 9564 KB Output is correct
13 Correct 2 ms 9772 KB Output is correct
14 Correct 2 ms 9560 KB Output is correct
15 Correct 2 ms 9564 KB Output is correct
16 Correct 2 ms 9772 KB Output is correct
17 Correct 2 ms 9564 KB Output is correct
18 Correct 2 ms 9560 KB Output is correct
19 Correct 2 ms 9564 KB Output is correct
20 Correct 227 ms 14564 KB Output is correct
21 Correct 209 ms 14164 KB Output is correct
22 Correct 205 ms 14272 KB Output is correct
23 Correct 211 ms 14720 KB Output is correct
24 Correct 218 ms 14672 KB Output is correct
25 Correct 246 ms 14716 KB Output is correct
26 Correct 229 ms 14420 KB Output is correct
27 Correct 2 ms 9564 KB Output is correct
28 Correct 2 ms 9564 KB Output is correct
29 Correct 2 ms 9564 KB Output is correct
30 Correct 2 ms 9564 KB Output is correct
31 Correct 2 ms 9564 KB Output is correct
32 Correct 2 ms 9564 KB Output is correct
33 Correct 2 ms 9564 KB Output is correct
34 Correct 2 ms 9564 KB Output is correct
35 Correct 3 ms 9564 KB Output is correct
36 Correct 2 ms 9560 KB Output is correct
37 Correct 2 ms 9564 KB Output is correct
38 Correct 2 ms 9564 KB Output is correct
39 Correct 2 ms 9564 KB Output is correct
40 Correct 2 ms 9564 KB Output is correct
41 Correct 2 ms 9564 KB Output is correct
42 Correct 2 ms 9564 KB Output is correct
43 Correct 2 ms 9564 KB Output is correct
44 Correct 2 ms 9560 KB Output is correct
45 Correct 2 ms 9564 KB Output is correct
46 Correct 2 ms 9564 KB Output is correct
47 Correct 311 ms 15848 KB Output is correct
48 Correct 286 ms 15444 KB Output is correct
49 Correct 288 ms 15768 KB Output is correct
50 Correct 317 ms 16004 KB Output is correct
51 Correct 282 ms 15808 KB Output is correct
52 Correct 316 ms 15696 KB Output is correct
53 Correct 321 ms 16040 KB Output is correct
54 Correct 6 ms 9564 KB Output is correct
55 Correct 4 ms 9780 KB Output is correct
56 Correct 6 ms 9560 KB Output is correct
57 Correct 7 ms 9564 KB Output is correct
58 Correct 7 ms 9564 KB Output is correct
59 Correct 402 ms 16672 KB Output is correct
60 Correct 239 ms 12436 KB Output is correct
61 Correct 261 ms 12804 KB Output is correct
62 Correct 283 ms 12884 KB Output is correct
63 Correct 402 ms 16328 KB Output is correct
64 Correct 478 ms 19216 KB Output is correct
65 Correct 469 ms 19140 KB Output is correct
66 Correct 351 ms 19536 KB Output is correct
67 Correct 393 ms 19228 KB Output is correct
68 Correct 478 ms 19100 KB Output is correct
69 Correct 538 ms 20676 KB Output is correct
70 Correct 45 ms 9776 KB Output is correct
71 Correct 31 ms 9776 KB Output is correct
72 Correct 39 ms 9636 KB Output is correct
73 Correct 35 ms 9564 KB Output is correct
74 Correct 50 ms 9564 KB Output is correct
75 Correct 90 ms 9820 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9560 KB Output is correct
2 Correct 2 ms 9812 KB Output is correct
3 Correct 2 ms 9560 KB Output is correct
4 Correct 2 ms 9564 KB Output is correct
5 Correct 408 ms 9756 KB Output is correct
6 Correct 195 ms 9764 KB Output is correct
7 Correct 246 ms 9756 KB Output is correct
8 Correct 308 ms 9756 KB Output is correct
9 Correct 573 ms 9564 KB Output is correct
10 Correct 260 ms 9752 KB Output is correct
11 Correct 379 ms 9756 KB Output is correct
12 Correct 611 ms 9560 KB Output is correct
13 Correct 2 ms 9560 KB Output is correct
14 Correct 2 ms 9816 KB Output is correct
15 Correct 2 ms 9560 KB Output is correct
16 Correct 2 ms 9560 KB Output is correct
17 Correct 2 ms 9564 KB Output is correct
18 Correct 2 ms 9564 KB Output is correct
19 Correct 2 ms 9564 KB Output is correct
20 Correct 2 ms 9564 KB Output is correct
21 Correct 2 ms 9768 KB Output is correct
22 Correct 2 ms 9564 KB Output is correct
23 Correct 2 ms 9564 KB Output is correct
24 Correct 2 ms 9564 KB Output is correct
25 Correct 2 ms 9564 KB Output is correct
26 Correct 2 ms 9564 KB Output is correct
27 Correct 2 ms 9564 KB Output is correct
28 Correct 2 ms 9820 KB Output is correct
29 Correct 2 ms 9560 KB Output is correct
30 Correct 2 ms 9564 KB Output is correct
31 Correct 2 ms 9784 KB Output is correct
32 Correct 2 ms 9564 KB Output is correct
33 Correct 2 ms 9720 KB Output is correct
34 Correct 2 ms 9564 KB Output is correct
35 Correct 2 ms 9776 KB Output is correct
36 Correct 2 ms 9564 KB Output is correct
37 Correct 2 ms 9564 KB Output is correct
38 Correct 2 ms 9564 KB Output is correct
39 Correct 2 ms 9560 KB Output is correct
40 Correct 3 ms 9564 KB Output is correct
41 Correct 7 ms 9780 KB Output is correct
42 Correct 5 ms 9772 KB Output is correct
43 Correct 6 ms 9780 KB Output is correct
44 Correct 5 ms 9564 KB Output is correct
45 Correct 6 ms 9812 KB Output is correct
46 Correct 46 ms 9820 KB Output is correct
47 Correct 34 ms 9788 KB Output is correct
48 Correct 41 ms 9808 KB Output is correct
49 Correct 31 ms 9812 KB Output is correct
50 Correct 48 ms 9772 KB Output is correct
51 Correct 194 ms 9884 KB Output is correct
52 Correct 589 ms 9884 KB Output is correct
53 Correct 752 ms 9884 KB Output is correct
54 Correct 738 ms 9884 KB Output is correct
55 Correct 3 ms 9560 KB Output is correct
56 Correct 98 ms 9864 KB Output is correct
57 Correct 2 ms 9564 KB Output is correct
58 Correct 73 ms 12132 KB Output is correct
59 Correct 65 ms 12312 KB Output is correct
60 Correct 48 ms 11860 KB Output is correct
61 Correct 68 ms 12104 KB Output is correct
62 Correct 50 ms 11932 KB Output is correct
63 Correct 68 ms 12168 KB Output is correct
64 Correct 2 ms 9564 KB Output is correct
65 Correct 2 ms 9560 KB Output is correct
66 Correct 2 ms 9816 KB Output is correct
67 Correct 2 ms 9564 KB Output is correct
68 Correct 2 ms 9564 KB Output is correct
69 Correct 2 ms 9772 KB Output is correct
70 Correct 2 ms 9560 KB Output is correct
71 Correct 2 ms 9564 KB Output is correct
72 Correct 2 ms 9772 KB Output is correct
73 Correct 2 ms 9564 KB Output is correct
74 Correct 2 ms 9560 KB Output is correct
75 Correct 2 ms 9564 KB Output is correct
76 Correct 227 ms 14564 KB Output is correct
77 Correct 209 ms 14164 KB Output is correct
78 Correct 205 ms 14272 KB Output is correct
79 Correct 211 ms 14720 KB Output is correct
80 Correct 218 ms 14672 KB Output is correct
81 Correct 246 ms 14716 KB Output is correct
82 Correct 229 ms 14420 KB Output is correct
83 Correct 2 ms 9564 KB Output is correct
84 Correct 2 ms 9564 KB Output is correct
85 Correct 2 ms 9564 KB Output is correct
86 Correct 2 ms 9564 KB Output is correct
87 Correct 2 ms 9564 KB Output is correct
88 Correct 2 ms 9564 KB Output is correct
89 Correct 2 ms 9564 KB Output is correct
90 Correct 2 ms 9564 KB Output is correct
91 Correct 3 ms 9564 KB Output is correct
92 Correct 2 ms 9560 KB Output is correct
93 Correct 2 ms 9564 KB Output is correct
94 Correct 2 ms 9564 KB Output is correct
95 Correct 2 ms 9564 KB Output is correct
96 Correct 2 ms 9564 KB Output is correct
97 Correct 2 ms 9564 KB Output is correct
98 Correct 2 ms 9564 KB Output is correct
99 Correct 2 ms 9564 KB Output is correct
100 Correct 2 ms 9560 KB Output is correct
101 Correct 2 ms 9564 KB Output is correct
102 Correct 2 ms 9564 KB Output is correct
103 Correct 311 ms 15848 KB Output is correct
104 Correct 286 ms 15444 KB Output is correct
105 Correct 288 ms 15768 KB Output is correct
106 Correct 317 ms 16004 KB Output is correct
107 Correct 282 ms 15808 KB Output is correct
108 Correct 316 ms 15696 KB Output is correct
109 Correct 321 ms 16040 KB Output is correct
110 Correct 6 ms 9564 KB Output is correct
111 Correct 4 ms 9780 KB Output is correct
112 Correct 6 ms 9560 KB Output is correct
113 Correct 7 ms 9564 KB Output is correct
114 Correct 7 ms 9564 KB Output is correct
115 Correct 402 ms 16672 KB Output is correct
116 Correct 239 ms 12436 KB Output is correct
117 Correct 261 ms 12804 KB Output is correct
118 Correct 283 ms 12884 KB Output is correct
119 Correct 402 ms 16328 KB Output is correct
120 Correct 478 ms 19216 KB Output is correct
121 Correct 469 ms 19140 KB Output is correct
122 Correct 351 ms 19536 KB Output is correct
123 Correct 393 ms 19228 KB Output is correct
124 Correct 478 ms 19100 KB Output is correct
125 Correct 538 ms 20676 KB Output is correct
126 Correct 45 ms 9776 KB Output is correct
127 Correct 31 ms 9776 KB Output is correct
128 Correct 39 ms 9636 KB Output is correct
129 Correct 35 ms 9564 KB Output is correct
130 Correct 50 ms 9564 KB Output is correct
131 Correct 90 ms 9820 KB Output is correct
132 Correct 1521 ms 22480 KB Output is correct
133 Correct 1397 ms 22432 KB Output is correct
134 Correct 1461 ms 23236 KB Output is correct
135 Correct 1234 ms 23232 KB Output is correct
136 Correct 1300 ms 22980 KB Output is correct
137 Correct 810 ms 22700 KB Output is correct
138 Correct 770 ms 22664 KB Output is correct
139 Correct 560 ms 23236 KB Output is correct
140 Correct 961 ms 22980 KB Output is correct
141 Correct 1472 ms 22868 KB Output is correct
142 Correct 1531 ms 23384 KB Output is correct