Submission #1016975

# Submission time Handle Problem Language Result Execution time Memory
1016975 2024-07-08T16:36:39 Z alexdd Council (JOI23_council) C++17
100 / 100
1014 ms 22544 KB
#include<bits/stdc++.h>
using namespace std;
int n,m;
pair<int,int> dp[1100000];///dp[config] = numarul maxim de 0-uri care se afla pe pozitiile selectate in config
int cnt1[25];
int v[300005];
pair<int,int> baga(pair<int,int> x, int newv, int config)
{
    if(x.first==newv || x.second==newv)
        return x;
    if(__builtin_popcount(v[newv]&config) > __builtin_popcount(v[x.first]&config))
    {
        return {newv,x.first};
    }
    else if(__builtin_popcount(v[newv]&config) > __builtin_popcount(v[x.second]&config))
    {
        return {x.first,newv};
    }
    return x;
}
signed main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);
    cin>>n>>m;
    for(int i=1;i<=n;i++)
    {
        int config=0,a,cate=0;
        for(int j=0;j<m;j++)
        {
            cin>>a;
            if(a==0) config += (1<<j), cate++;
            else cnt1[j]++;
        }
        v[i]=config;
        dp[config] = baga(dp[config], i, config);
    }
    for(int config=1;config<(1<<m);config++)
    {
        for(int i=0;i<m;i++)
        {
            if(((1<<i)&config))
            {
                dp[config] = baga(dp[config], dp[config-(1<<i)].first, config);
                dp[config] = baga(dp[config], dp[config-(1<<i)].second, config);
            }
        }
    }
    for(int config=(1<<m)-1;config>=0;config--)
    {
        for(int i=0;i<m;i++)
        {
            if(!((1<<i)&config))
            {
                dp[config] = baga(dp[config], dp[config+(1<<i)].first, config);
                dp[config] = baga(dp[config], dp[config+(1<<i)].second, config);
            }
        }
    }
    for(int i=1;i<=n;i++)
    {
        int config=0,deja=0;
        for(int j=0;j<m;j++)
        {
            if(!((1<<j)&v[i])) cnt1[j]--;
            if(cnt1[j]>=n/2 && cnt1[j]-1<n/2) config += (1<<j);
            else if(cnt1[j]>=n/2) deja++;
            if(!((1<<j)&v[i])) cnt1[j]++;
        }
        if(dp[config].first==i)
        {
            cout<<deja+__builtin_popcount(config&v[dp[config].second])<<"\n";
        }
        else
        {
            cout<<deja+__builtin_popcount(config&v[dp[config].first])<<"\n";
        }
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 2 ms 2396 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 2396 KB Output is correct
5 Correct 350 ms 9472 KB Output is correct
6 Correct 309 ms 9556 KB Output is correct
7 Correct 350 ms 9412 KB Output is correct
8 Correct 401 ms 9556 KB Output is correct
9 Correct 430 ms 9552 KB Output is correct
10 Correct 354 ms 9556 KB Output is correct
11 Correct 426 ms 9552 KB Output is correct
12 Correct 461 ms 9648 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 0 ms 2396 KB Output is correct
15 Correct 0 ms 2396 KB Output is correct
16 Correct 1 ms 2396 KB Output is correct
17 Correct 0 ms 2396 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 2396 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 0 ms 2516 KB Output is correct
22 Correct 1 ms 2396 KB Output is correct
23 Correct 0 ms 2396 KB Output is correct
24 Correct 1 ms 2396 KB Output is correct
25 Correct 0 ms 2396 KB Output is correct
26 Correct 1 ms 2396 KB Output is correct
27 Correct 0 ms 2396 KB Output is correct
28 Correct 1 ms 2396 KB Output is correct
29 Correct 0 ms 2396 KB Output is correct
30 Correct 1 ms 2396 KB Output is correct
31 Correct 1 ms 2392 KB Output is correct
32 Correct 0 ms 2396 KB Output is correct
33 Correct 0 ms 2396 KB Output is correct
34 Correct 1 ms 2396 KB Output is correct
35 Correct 0 ms 2396 KB Output is correct
36 Correct 1 ms 2520 KB Output is correct
37 Correct 1 ms 2396 KB Output is correct
38 Correct 1 ms 2396 KB Output is correct
39 Correct 1 ms 2396 KB Output is correct
40 Correct 1 ms 2396 KB Output is correct
41 Correct 4 ms 2396 KB Output is correct
42 Correct 5 ms 2396 KB Output is correct
43 Correct 6 ms 2520 KB Output is correct
44 Correct 5 ms 2396 KB Output is correct
45 Correct 5 ms 2520 KB Output is correct
46 Correct 39 ms 2396 KB Output is correct
47 Correct 38 ms 2396 KB Output is correct
48 Correct 44 ms 2520 KB Output is correct
49 Correct 38 ms 2396 KB Output is correct
50 Correct 41 ms 2392 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 2 ms 2396 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 2396 KB Output is correct
5 Correct 350 ms 9472 KB Output is correct
6 Correct 309 ms 9556 KB Output is correct
7 Correct 350 ms 9412 KB Output is correct
8 Correct 401 ms 9556 KB Output is correct
9 Correct 430 ms 9552 KB Output is correct
10 Correct 354 ms 9556 KB Output is correct
11 Correct 426 ms 9552 KB Output is correct
12 Correct 461 ms 9648 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 0 ms 2396 KB Output is correct
15 Correct 0 ms 2396 KB Output is correct
16 Correct 1 ms 2396 KB Output is correct
17 Correct 0 ms 2396 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 2396 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 0 ms 2516 KB Output is correct
22 Correct 1 ms 2396 KB Output is correct
23 Correct 0 ms 2396 KB Output is correct
24 Correct 1 ms 2396 KB Output is correct
25 Correct 0 ms 2396 KB Output is correct
26 Correct 1 ms 2396 KB Output is correct
27 Correct 0 ms 2396 KB Output is correct
28 Correct 1 ms 2396 KB Output is correct
29 Correct 0 ms 2396 KB Output is correct
30 Correct 1 ms 2396 KB Output is correct
31 Correct 1 ms 2392 KB Output is correct
32 Correct 0 ms 2396 KB Output is correct
33 Correct 0 ms 2396 KB Output is correct
34 Correct 1 ms 2396 KB Output is correct
35 Correct 0 ms 2396 KB Output is correct
36 Correct 1 ms 2520 KB Output is correct
37 Correct 1 ms 2396 KB Output is correct
38 Correct 1 ms 2396 KB Output is correct
39 Correct 1 ms 2396 KB Output is correct
40 Correct 1 ms 2396 KB Output is correct
41 Correct 4 ms 2396 KB Output is correct
42 Correct 5 ms 2396 KB Output is correct
43 Correct 6 ms 2520 KB Output is correct
44 Correct 5 ms 2396 KB Output is correct
45 Correct 5 ms 2520 KB Output is correct
46 Correct 39 ms 2396 KB Output is correct
47 Correct 38 ms 2396 KB Output is correct
48 Correct 44 ms 2520 KB Output is correct
49 Correct 38 ms 2396 KB Output is correct
50 Correct 41 ms 2392 KB Output is correct
51 Correct 301 ms 9760 KB Output is correct
52 Correct 324 ms 8792 KB Output is correct
53 Correct 502 ms 9556 KB Output is correct
54 Correct 524 ms 9784 KB Output is correct
55 Correct 1 ms 2396 KB Output is correct
56 Correct 65 ms 2396 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 38 ms 4436 KB Output is correct
3 Correct 35 ms 3420 KB Output is correct
4 Correct 30 ms 2800 KB Output is correct
5 Correct 42 ms 4212 KB Output is correct
6 Correct 36 ms 3664 KB Output is correct
7 Correct 41 ms 3232 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 2396 KB Output is correct
10 Correct 0 ms 2396 KB Output is correct
11 Correct 0 ms 2396 KB Output is correct
12 Correct 0 ms 2396 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 0 ms 2396 KB Output is correct
17 Correct 1 ms 2396 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 38 ms 4436 KB Output is correct
3 Correct 35 ms 3420 KB Output is correct
4 Correct 30 ms 2800 KB Output is correct
5 Correct 42 ms 4212 KB Output is correct
6 Correct 36 ms 3664 KB Output is correct
7 Correct 41 ms 3232 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 2396 KB Output is correct
10 Correct 0 ms 2396 KB Output is correct
11 Correct 0 ms 2396 KB Output is correct
12 Correct 0 ms 2396 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 0 ms 2396 KB Output is correct
17 Correct 1 ms 2396 KB Output is correct
18 Correct 0 ms 2512 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 144 ms 9040 KB Output is correct
21 Correct 124 ms 8568 KB Output is correct
22 Correct 126 ms 8532 KB Output is correct
23 Correct 127 ms 9336 KB Output is correct
24 Correct 133 ms 8020 KB Output is correct
25 Correct 168 ms 9040 KB Output is correct
26 Correct 145 ms 9044 KB Output is correct
27 Correct 1 ms 2392 KB Output is correct
28 Correct 0 ms 2396 KB Output is correct
29 Correct 0 ms 2396 KB Output is correct
30 Correct 0 ms 2396 KB Output is correct
31 Correct 1 ms 2396 KB Output is correct
32 Correct 0 ms 2396 KB Output is correct
33 Correct 0 ms 2516 KB Output is correct
34 Correct 1 ms 2396 KB Output is correct
35 Correct 1 ms 2396 KB Output is correct
36 Correct 1 ms 2396 KB Output is correct
37 Correct 0 ms 2396 KB Output is correct
38 Correct 0 ms 2396 KB Output is correct
39 Correct 0 ms 2396 KB Output is correct
40 Correct 0 ms 2396 KB Output is correct
41 Correct 1 ms 2392 KB Output is correct
42 Correct 1 ms 2392 KB Output is correct
43 Correct 0 ms 2396 KB Output is correct
44 Correct 1 ms 2396 KB Output is correct
45 Correct 1 ms 2396 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 38 ms 4436 KB Output is correct
3 Correct 35 ms 3420 KB Output is correct
4 Correct 30 ms 2800 KB Output is correct
5 Correct 42 ms 4212 KB Output is correct
6 Correct 36 ms 3664 KB Output is correct
7 Correct 41 ms 3232 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 2396 KB Output is correct
10 Correct 0 ms 2396 KB Output is correct
11 Correct 0 ms 2396 KB Output is correct
12 Correct 0 ms 2396 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 0 ms 2396 KB Output is correct
17 Correct 1 ms 2396 KB Output is correct
18 Correct 0 ms 2512 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 144 ms 9040 KB Output is correct
21 Correct 124 ms 8568 KB Output is correct
22 Correct 126 ms 8532 KB Output is correct
23 Correct 127 ms 9336 KB Output is correct
24 Correct 133 ms 8020 KB Output is correct
25 Correct 168 ms 9040 KB Output is correct
26 Correct 145 ms 9044 KB Output is correct
27 Correct 1 ms 2392 KB Output is correct
28 Correct 0 ms 2396 KB Output is correct
29 Correct 0 ms 2396 KB Output is correct
30 Correct 0 ms 2396 KB Output is correct
31 Correct 1 ms 2396 KB Output is correct
32 Correct 0 ms 2396 KB Output is correct
33 Correct 0 ms 2516 KB Output is correct
34 Correct 1 ms 2396 KB Output is correct
35 Correct 1 ms 2396 KB Output is correct
36 Correct 1 ms 2396 KB Output is correct
37 Correct 0 ms 2396 KB Output is correct
38 Correct 0 ms 2396 KB Output is correct
39 Correct 0 ms 2396 KB Output is correct
40 Correct 0 ms 2396 KB Output is correct
41 Correct 1 ms 2392 KB Output is correct
42 Correct 1 ms 2392 KB Output is correct
43 Correct 0 ms 2396 KB Output is correct
44 Correct 1 ms 2396 KB Output is correct
45 Correct 1 ms 2396 KB Output is correct
46 Correct 2 ms 2396 KB Output is correct
47 Correct 194 ms 11284 KB Output is correct
48 Correct 183 ms 10744 KB Output is correct
49 Correct 178 ms 10836 KB Output is correct
50 Correct 159 ms 11756 KB Output is correct
51 Correct 163 ms 10456 KB Output is correct
52 Correct 213 ms 11340 KB Output is correct
53 Correct 204 ms 11604 KB Output is correct
54 Correct 4 ms 2392 KB Output is correct
55 Correct 5 ms 2392 KB Output is correct
56 Correct 5 ms 2396 KB Output is correct
57 Correct 5 ms 2396 KB Output is correct
58 Correct 5 ms 2396 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 38 ms 4436 KB Output is correct
3 Correct 35 ms 3420 KB Output is correct
4 Correct 30 ms 2800 KB Output is correct
5 Correct 42 ms 4212 KB Output is correct
6 Correct 36 ms 3664 KB Output is correct
7 Correct 41 ms 3232 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 2396 KB Output is correct
10 Correct 0 ms 2396 KB Output is correct
11 Correct 0 ms 2396 KB Output is correct
12 Correct 0 ms 2396 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 0 ms 2396 KB Output is correct
17 Correct 1 ms 2396 KB Output is correct
18 Correct 0 ms 2512 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 144 ms 9040 KB Output is correct
21 Correct 124 ms 8568 KB Output is correct
22 Correct 126 ms 8532 KB Output is correct
23 Correct 127 ms 9336 KB Output is correct
24 Correct 133 ms 8020 KB Output is correct
25 Correct 168 ms 9040 KB Output is correct
26 Correct 145 ms 9044 KB Output is correct
27 Correct 1 ms 2392 KB Output is correct
28 Correct 0 ms 2396 KB Output is correct
29 Correct 0 ms 2396 KB Output is correct
30 Correct 0 ms 2396 KB Output is correct
31 Correct 1 ms 2396 KB Output is correct
32 Correct 0 ms 2396 KB Output is correct
33 Correct 0 ms 2516 KB Output is correct
34 Correct 1 ms 2396 KB Output is correct
35 Correct 1 ms 2396 KB Output is correct
36 Correct 1 ms 2396 KB Output is correct
37 Correct 0 ms 2396 KB Output is correct
38 Correct 0 ms 2396 KB Output is correct
39 Correct 0 ms 2396 KB Output is correct
40 Correct 0 ms 2396 KB Output is correct
41 Correct 1 ms 2392 KB Output is correct
42 Correct 1 ms 2392 KB Output is correct
43 Correct 0 ms 2396 KB Output is correct
44 Correct 1 ms 2396 KB Output is correct
45 Correct 1 ms 2396 KB Output is correct
46 Correct 2 ms 2396 KB Output is correct
47 Correct 194 ms 11284 KB Output is correct
48 Correct 183 ms 10744 KB Output is correct
49 Correct 178 ms 10836 KB Output is correct
50 Correct 159 ms 11756 KB Output is correct
51 Correct 163 ms 10456 KB Output is correct
52 Correct 213 ms 11340 KB Output is correct
53 Correct 204 ms 11604 KB Output is correct
54 Correct 4 ms 2392 KB Output is correct
55 Correct 5 ms 2392 KB Output is correct
56 Correct 5 ms 2396 KB Output is correct
57 Correct 5 ms 2396 KB Output is correct
58 Correct 5 ms 2396 KB Output is correct
59 Correct 263 ms 12908 KB Output is correct
60 Correct 162 ms 6768 KB Output is correct
61 Correct 161 ms 6996 KB Output is correct
62 Correct 176 ms 7248 KB Output is correct
63 Correct 255 ms 12628 KB Output is correct
64 Correct 297 ms 13048 KB Output is correct
65 Correct 295 ms 13176 KB Output is correct
66 Correct 220 ms 13432 KB Output is correct
67 Correct 232 ms 13136 KB Output is correct
68 Correct 309 ms 13140 KB Output is correct
69 Correct 305 ms 13396 KB Output is correct
70 Correct 37 ms 2392 KB Output is correct
71 Correct 39 ms 2392 KB Output is correct
72 Correct 44 ms 2392 KB Output is correct
73 Correct 42 ms 2392 KB Output is correct
74 Correct 41 ms 2396 KB Output is correct
75 Correct 65 ms 2396 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 2 ms 2396 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 2396 KB Output is correct
5 Correct 350 ms 9472 KB Output is correct
6 Correct 309 ms 9556 KB Output is correct
7 Correct 350 ms 9412 KB Output is correct
8 Correct 401 ms 9556 KB Output is correct
9 Correct 430 ms 9552 KB Output is correct
10 Correct 354 ms 9556 KB Output is correct
11 Correct 426 ms 9552 KB Output is correct
12 Correct 461 ms 9648 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 0 ms 2396 KB Output is correct
15 Correct 0 ms 2396 KB Output is correct
16 Correct 1 ms 2396 KB Output is correct
17 Correct 0 ms 2396 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 2396 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 0 ms 2516 KB Output is correct
22 Correct 1 ms 2396 KB Output is correct
23 Correct 0 ms 2396 KB Output is correct
24 Correct 1 ms 2396 KB Output is correct
25 Correct 0 ms 2396 KB Output is correct
26 Correct 1 ms 2396 KB Output is correct
27 Correct 0 ms 2396 KB Output is correct
28 Correct 1 ms 2396 KB Output is correct
29 Correct 0 ms 2396 KB Output is correct
30 Correct 1 ms 2396 KB Output is correct
31 Correct 1 ms 2392 KB Output is correct
32 Correct 0 ms 2396 KB Output is correct
33 Correct 0 ms 2396 KB Output is correct
34 Correct 1 ms 2396 KB Output is correct
35 Correct 0 ms 2396 KB Output is correct
36 Correct 1 ms 2520 KB Output is correct
37 Correct 1 ms 2396 KB Output is correct
38 Correct 1 ms 2396 KB Output is correct
39 Correct 1 ms 2396 KB Output is correct
40 Correct 1 ms 2396 KB Output is correct
41 Correct 4 ms 2396 KB Output is correct
42 Correct 5 ms 2396 KB Output is correct
43 Correct 6 ms 2520 KB Output is correct
44 Correct 5 ms 2396 KB Output is correct
45 Correct 5 ms 2520 KB Output is correct
46 Correct 39 ms 2396 KB Output is correct
47 Correct 38 ms 2396 KB Output is correct
48 Correct 44 ms 2520 KB Output is correct
49 Correct 38 ms 2396 KB Output is correct
50 Correct 41 ms 2392 KB Output is correct
51 Correct 301 ms 9760 KB Output is correct
52 Correct 324 ms 8792 KB Output is correct
53 Correct 502 ms 9556 KB Output is correct
54 Correct 524 ms 9784 KB Output is correct
55 Correct 1 ms 2396 KB Output is correct
56 Correct 65 ms 2396 KB Output is correct
57 Correct 1 ms 2392 KB Output is correct
58 Correct 38 ms 4436 KB Output is correct
59 Correct 35 ms 3420 KB Output is correct
60 Correct 30 ms 2800 KB Output is correct
61 Correct 42 ms 4212 KB Output is correct
62 Correct 36 ms 3664 KB Output is correct
63 Correct 41 ms 3232 KB Output is correct
64 Correct 1 ms 348 KB Output is correct
65 Correct 0 ms 2396 KB Output is correct
66 Correct 0 ms 2396 KB Output is correct
67 Correct 0 ms 2396 KB Output is correct
68 Correct 0 ms 2396 KB Output is correct
69 Correct 0 ms 348 KB Output is correct
70 Correct 1 ms 2396 KB Output is correct
71 Correct 1 ms 348 KB Output is correct
72 Correct 0 ms 2396 KB Output is correct
73 Correct 1 ms 2396 KB Output is correct
74 Correct 0 ms 2512 KB Output is correct
75 Correct 0 ms 348 KB Output is correct
76 Correct 144 ms 9040 KB Output is correct
77 Correct 124 ms 8568 KB Output is correct
78 Correct 126 ms 8532 KB Output is correct
79 Correct 127 ms 9336 KB Output is correct
80 Correct 133 ms 8020 KB Output is correct
81 Correct 168 ms 9040 KB Output is correct
82 Correct 145 ms 9044 KB Output is correct
83 Correct 1 ms 2392 KB Output is correct
84 Correct 0 ms 2396 KB Output is correct
85 Correct 0 ms 2396 KB Output is correct
86 Correct 0 ms 2396 KB Output is correct
87 Correct 1 ms 2396 KB Output is correct
88 Correct 0 ms 2396 KB Output is correct
89 Correct 0 ms 2516 KB Output is correct
90 Correct 1 ms 2396 KB Output is correct
91 Correct 1 ms 2396 KB Output is correct
92 Correct 1 ms 2396 KB Output is correct
93 Correct 0 ms 2396 KB Output is correct
94 Correct 0 ms 2396 KB Output is correct
95 Correct 0 ms 2396 KB Output is correct
96 Correct 0 ms 2396 KB Output is correct
97 Correct 1 ms 2392 KB Output is correct
98 Correct 1 ms 2392 KB Output is correct
99 Correct 0 ms 2396 KB Output is correct
100 Correct 1 ms 2396 KB Output is correct
101 Correct 1 ms 2396 KB Output is correct
102 Correct 2 ms 2396 KB Output is correct
103 Correct 194 ms 11284 KB Output is correct
104 Correct 183 ms 10744 KB Output is correct
105 Correct 178 ms 10836 KB Output is correct
106 Correct 159 ms 11756 KB Output is correct
107 Correct 163 ms 10456 KB Output is correct
108 Correct 213 ms 11340 KB Output is correct
109 Correct 204 ms 11604 KB Output is correct
110 Correct 4 ms 2392 KB Output is correct
111 Correct 5 ms 2392 KB Output is correct
112 Correct 5 ms 2396 KB Output is correct
113 Correct 5 ms 2396 KB Output is correct
114 Correct 5 ms 2396 KB Output is correct
115 Correct 263 ms 12908 KB Output is correct
116 Correct 162 ms 6768 KB Output is correct
117 Correct 161 ms 6996 KB Output is correct
118 Correct 176 ms 7248 KB Output is correct
119 Correct 255 ms 12628 KB Output is correct
120 Correct 297 ms 13048 KB Output is correct
121 Correct 295 ms 13176 KB Output is correct
122 Correct 220 ms 13432 KB Output is correct
123 Correct 232 ms 13136 KB Output is correct
124 Correct 309 ms 13140 KB Output is correct
125 Correct 305 ms 13396 KB Output is correct
126 Correct 37 ms 2392 KB Output is correct
127 Correct 39 ms 2392 KB Output is correct
128 Correct 44 ms 2392 KB Output is correct
129 Correct 42 ms 2392 KB Output is correct
130 Correct 41 ms 2396 KB Output is correct
131 Correct 65 ms 2396 KB Output is correct
132 Correct 820 ms 22432 KB Output is correct
133 Correct 895 ms 22080 KB Output is correct
134 Correct 887 ms 22344 KB Output is correct
135 Correct 840 ms 22356 KB Output is correct
136 Correct 796 ms 22352 KB Output is correct
137 Correct 506 ms 17496 KB Output is correct
138 Correct 524 ms 17748 KB Output is correct
139 Correct 527 ms 22544 KB Output is correct
140 Correct 512 ms 21964 KB Output is correct
141 Correct 940 ms 22084 KB Output is correct
142 Correct 1014 ms 22352 KB Output is correct