Submission #576782

# Submission time Handle Problem Language Result Execution time Memory
576782 2022-06-13T13:28:26 Z radal Painting Walls (APIO20_paint) C++17
63 / 100
1500 ms 399936 KB
#include <bits/stdc++.h>
#include "paint.h"
#pragma GCC target("sse,sse2,sse4,avx2")
#pragma GCC optimize("unroll-loops,O2")
#define rep(i,l,r) for (int i = l; i < r; i++)
#define repr(i,r,l) for (int i = r; i >= l; i--)
#define X first
#define Y second
#define all(x) (x).begin() , (x).end()
#define pb push_back
#define endl '\n'
#define debug(x) cerr << #x << " : " << x << endl;
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pll;
constexpr int N = 1e5+20,mod = 998244353,inf = 1e9+10;
inline int mkay(int a,int b){
    if (a+b >= mod) return a+b-mod;
//    if (a+b < 0) return a+b+mod;
    return a+b;
}
 
inline int poww(int a,int k){
    if (k < 0) return 0;
    int z = 1;
    while (k){
        if (k&1) z = 1ll*z*a%mod;
        a = 1ll*a*a%mod;
        k >>= 1;
    } 
    return z; 
}
vector<int> f[N],a,c;
vector<vector<int> > b;
int n,m,k,dp[N];
vector<int> lst[N];
int minimumInstructions(int nn,int mm,int kk,vector<int> C,vector<int> A,vector<vector<int>> B){
    n = nn;
    m = mm;
    k = kk;
    c = C;
    a = A;
    b = B;
    rep(i,0,m){
        for (int x : b[i])
            f[x].pb(i);
    }
    rep(i,0,n)
        if (f[c[i]].empty()) return -1;
    for(int x : f[c[n-1]]){
        lst[n-1].pb(n-1);
    }
    dp[n-1] = n-1;
    repr(i,n-2,0){
        for (int x : f[c[i]]){
            int y = x+1;
            if (y == m) y = 0;
            int ind = lower_bound(all(f[c[i+1]]),y)-f[c[i+1]].begin();
            if (ind == (int)f[c[i+1]].size() || f[c[i+1]][ind] != y){
                lst[i].pb(i);
                dp[i] = max(dp[i],i);
                continue;
            }
            int cal = lst[i+1][ind];
            if (cal-i+1 > m) cal--;
            lst[i].pb(cal);
            dp[i] = max(dp[i],cal);
        }
    }
    int ans = 0;
    int cur = 0,rel = -1;
    while (cur < n){
        bool f = 0;
        repr(i,cur,rel+1){
            if(dp[i]-i+1 == m){
                cur = i+m;
                rel = i;
                f = 1; 
                break;
            }
        }
        if (!f) return -1;
        ans++;
    }
    return ans;
}

Compilation message

paint.cpp: In function 'int minimumInstructions(int, int, int, std::vector<int>, std::vector<int>, std::vector<std::vector<int> >)':
paint.cpp:51:13: warning: unused variable 'x' [-Wunused-variable]
   51 |     for(int x : f[c[n-1]]){
      |             ^
# Verdict Execution time Memory Grader output
1 Correct 3 ms 4948 KB Output is correct
2 Correct 4 ms 4948 KB Output is correct
3 Correct 3 ms 4948 KB Output is correct
4 Correct 3 ms 4948 KB Output is correct
5 Correct 3 ms 4948 KB Output is correct
6 Correct 3 ms 4948 KB Output is correct
7 Correct 3 ms 4948 KB Output is correct
8 Correct 3 ms 4948 KB Output is correct
9 Correct 3 ms 4948 KB Output is correct
10 Correct 4 ms 4940 KB Output is correct
11 Correct 3 ms 5004 KB Output is correct
12 Correct 3 ms 5004 KB Output is correct
13 Correct 3 ms 5076 KB Output is correct
14 Correct 3 ms 5076 KB Output is correct
15 Correct 4 ms 5076 KB Output is correct
16 Correct 3 ms 5076 KB Output is correct
17 Correct 4 ms 5076 KB Output is correct
18 Correct 4 ms 5076 KB Output is correct
19 Correct 3 ms 5076 KB Output is correct
20 Correct 4 ms 5076 KB Output is correct
21 Correct 3 ms 5076 KB Output is correct
22 Correct 21 ms 9812 KB Output is correct
23 Correct 20 ms 9804 KB Output is correct
24 Correct 19 ms 9872 KB Output is correct
25 Correct 6 ms 5908 KB Output is correct
26 Correct 6 ms 5972 KB Output is correct
27 Correct 6 ms 5908 KB Output is correct
28 Correct 6 ms 5972 KB Output is correct
29 Correct 6 ms 5972 KB Output is correct
30 Correct 9 ms 5908 KB Output is correct
31 Correct 12 ms 7188 KB Output is correct
32 Correct 12 ms 7124 KB Output is correct
33 Correct 12 ms 7236 KB Output is correct
34 Correct 13 ms 7232 KB Output is correct
35 Correct 11 ms 7192 KB Output is correct
36 Correct 11 ms 7192 KB Output is correct
37 Correct 24 ms 11076 KB Output is correct
38 Correct 25 ms 11068 KB Output is correct
39 Correct 24 ms 11152 KB Output is correct
40 Correct 15 ms 9420 KB Output is correct
41 Correct 11 ms 7764 KB Output is correct
42 Correct 23 ms 9728 KB Output is correct
43 Correct 17 ms 8204 KB Output is correct
44 Correct 12 ms 7920 KB Output is correct
45 Correct 16 ms 9872 KB Output is correct
46 Correct 46 ms 21292 KB Output is correct
47 Correct 29 ms 14284 KB Output is correct
48 Correct 39 ms 18124 KB Output is correct
49 Correct 48 ms 18180 KB Output is correct
50 Correct 59 ms 18000 KB Output is correct
51 Correct 44 ms 15112 KB Output is correct
52 Correct 16 ms 9812 KB Output is correct
53 Correct 16 ms 9812 KB Output is correct
54 Correct 18 ms 9884 KB Output is correct
55 Correct 16 ms 9828 KB Output is correct
56 Correct 17 ms 9812 KB Output is correct
57 Correct 16 ms 9804 KB Output is correct
58 Correct 56 ms 22776 KB Output is correct
59 Correct 58 ms 22836 KB Output is correct
60 Correct 55 ms 22864 KB Output is correct
61 Correct 56 ms 22860 KB Output is correct
62 Correct 53 ms 22824 KB Output is correct
63 Correct 52 ms 22836 KB Output is correct
64 Correct 56 ms 21616 KB Output is correct
65 Correct 65 ms 21612 KB Output is correct
66 Correct 57 ms 21712 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 4948 KB Output is correct
2 Correct 4 ms 4948 KB Output is correct
3 Correct 3 ms 4948 KB Output is correct
4 Correct 3 ms 4948 KB Output is correct
5 Correct 3 ms 4948 KB Output is correct
6 Correct 3 ms 4948 KB Output is correct
7 Correct 3 ms 4948 KB Output is correct
8 Correct 3 ms 4948 KB Output is correct
9 Correct 3 ms 4948 KB Output is correct
10 Correct 4 ms 4940 KB Output is correct
11 Correct 3 ms 5004 KB Output is correct
12 Correct 3 ms 5004 KB Output is correct
13 Correct 3 ms 5076 KB Output is correct
14 Correct 3 ms 5076 KB Output is correct
15 Correct 4 ms 5076 KB Output is correct
16 Correct 3 ms 5076 KB Output is correct
17 Correct 4 ms 5076 KB Output is correct
18 Correct 4 ms 5076 KB Output is correct
19 Correct 3 ms 5076 KB Output is correct
20 Correct 4 ms 5076 KB Output is correct
21 Correct 3 ms 5076 KB Output is correct
22 Correct 3 ms 4948 KB Output is correct
23 Correct 3 ms 4948 KB Output is correct
24 Correct 3 ms 4948 KB Output is correct
25 Correct 3 ms 5004 KB Output is correct
26 Correct 3 ms 5000 KB Output is correct
27 Correct 3 ms 5004 KB Output is correct
28 Correct 3 ms 4948 KB Output is correct
29 Correct 3 ms 4948 KB Output is correct
30 Correct 3 ms 4948 KB Output is correct
31 Correct 3 ms 5000 KB Output is correct
32 Correct 3 ms 4948 KB Output is correct
33 Correct 3 ms 5008 KB Output is correct
34 Correct 4 ms 4948 KB Output is correct
35 Correct 5 ms 4948 KB Output is correct
36 Correct 3 ms 4948 KB Output is correct
37 Correct 5 ms 5076 KB Output is correct
38 Correct 3 ms 4948 KB Output is correct
39 Correct 4 ms 4948 KB Output is correct
40 Correct 3 ms 5076 KB Output is correct
41 Correct 3 ms 4948 KB Output is correct
42 Correct 3 ms 4948 KB Output is correct
43 Correct 3 ms 5012 KB Output is correct
44 Correct 4 ms 4948 KB Output is correct
45 Correct 4 ms 5000 KB Output is correct
46 Correct 3 ms 5076 KB Output is correct
47 Correct 3 ms 5076 KB Output is correct
48 Correct 5 ms 5004 KB Output is correct
49 Correct 5 ms 5000 KB Output is correct
50 Correct 3 ms 5076 KB Output is correct
51 Correct 4 ms 5076 KB Output is correct
52 Correct 4 ms 5008 KB Output is correct
53 Correct 3 ms 5008 KB Output is correct
54 Correct 5 ms 5004 KB Output is correct
55 Correct 3 ms 5076 KB Output is correct
56 Correct 3 ms 5076 KB Output is correct
57 Correct 3 ms 4948 KB Output is correct
58 Correct 4 ms 5044 KB Output is correct
59 Correct 3 ms 4948 KB Output is correct
60 Correct 3 ms 5076 KB Output is correct
61 Correct 3 ms 5004 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 4948 KB Output is correct
2 Correct 3 ms 4948 KB Output is correct
3 Correct 3 ms 4948 KB Output is correct
4 Correct 4 ms 4948 KB Output is correct
5 Correct 3 ms 4948 KB Output is correct
6 Correct 3 ms 4948 KB Output is correct
7 Correct 3 ms 4948 KB Output is correct
8 Correct 3 ms 4948 KB Output is correct
9 Correct 3 ms 4948 KB Output is correct
10 Correct 3 ms 4948 KB Output is correct
11 Correct 3 ms 4948 KB Output is correct
12 Correct 4 ms 4940 KB Output is correct
13 Correct 3 ms 5004 KB Output is correct
14 Correct 3 ms 5004 KB Output is correct
15 Correct 3 ms 5076 KB Output is correct
16 Correct 3 ms 5076 KB Output is correct
17 Correct 4 ms 5076 KB Output is correct
18 Correct 3 ms 5076 KB Output is correct
19 Correct 4 ms 5076 KB Output is correct
20 Correct 4 ms 5076 KB Output is correct
21 Correct 3 ms 5076 KB Output is correct
22 Correct 4 ms 5076 KB Output is correct
23 Correct 3 ms 5076 KB Output is correct
24 Correct 21 ms 9812 KB Output is correct
25 Correct 20 ms 9804 KB Output is correct
26 Correct 19 ms 9872 KB Output is correct
27 Correct 3 ms 4948 KB Output is correct
28 Correct 3 ms 5004 KB Output is correct
29 Correct 3 ms 5000 KB Output is correct
30 Correct 3 ms 5004 KB Output is correct
31 Correct 3 ms 4948 KB Output is correct
32 Correct 3 ms 4948 KB Output is correct
33 Correct 3 ms 4948 KB Output is correct
34 Correct 3 ms 5000 KB Output is correct
35 Correct 3 ms 4948 KB Output is correct
36 Correct 3 ms 5008 KB Output is correct
37 Correct 4 ms 4948 KB Output is correct
38 Correct 5 ms 4948 KB Output is correct
39 Correct 3 ms 4948 KB Output is correct
40 Correct 5 ms 5076 KB Output is correct
41 Correct 3 ms 4948 KB Output is correct
42 Correct 4 ms 4948 KB Output is correct
43 Correct 3 ms 5076 KB Output is correct
44 Correct 3 ms 4948 KB Output is correct
45 Correct 3 ms 4948 KB Output is correct
46 Correct 3 ms 5012 KB Output is correct
47 Correct 4 ms 4948 KB Output is correct
48 Correct 4 ms 5000 KB Output is correct
49 Correct 3 ms 5076 KB Output is correct
50 Correct 3 ms 5076 KB Output is correct
51 Correct 5 ms 5004 KB Output is correct
52 Correct 5 ms 5000 KB Output is correct
53 Correct 3 ms 5076 KB Output is correct
54 Correct 4 ms 5076 KB Output is correct
55 Correct 4 ms 5008 KB Output is correct
56 Correct 3 ms 5008 KB Output is correct
57 Correct 5 ms 5004 KB Output is correct
58 Correct 3 ms 5076 KB Output is correct
59 Correct 3 ms 5076 KB Output is correct
60 Correct 3 ms 4948 KB Output is correct
61 Correct 4 ms 5044 KB Output is correct
62 Correct 3 ms 4948 KB Output is correct
63 Correct 3 ms 5076 KB Output is correct
64 Correct 3 ms 5004 KB Output is correct
65 Correct 5 ms 5260 KB Output is correct
66 Correct 5 ms 5136 KB Output is correct
67 Correct 5 ms 5184 KB Output is correct
68 Correct 4 ms 5204 KB Output is correct
69 Correct 4 ms 5204 KB Output is correct
70 Correct 4 ms 5332 KB Output is correct
71 Correct 5 ms 5332 KB Output is correct
72 Correct 5 ms 5272 KB Output is correct
73 Correct 3 ms 5172 KB Output is correct
74 Correct 5 ms 5268 KB Output is correct
75 Correct 4 ms 5188 KB Output is correct
76 Correct 21 ms 8660 KB Output is correct
77 Correct 19 ms 9232 KB Output is correct
78 Correct 35 ms 9804 KB Output is correct
79 Correct 5 ms 5460 KB Output is correct
80 Correct 5 ms 5460 KB Output is correct
81 Correct 5 ms 5460 KB Output is correct
82 Correct 5 ms 5460 KB Output is correct
83 Correct 5 ms 5516 KB Output is correct
84 Correct 5 ms 5332 KB Output is correct
85 Correct 5 ms 5332 KB Output is correct
86 Correct 5 ms 5332 KB Output is correct
87 Correct 5 ms 5404 KB Output is correct
88 Correct 4 ms 5332 KB Output is correct
89 Correct 5 ms 5352 KB Output is correct
90 Correct 30 ms 10168 KB Output is correct
91 Correct 42 ms 10128 KB Output is correct
92 Correct 30 ms 10212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 4948 KB Output is correct
2 Correct 3 ms 4948 KB Output is correct
3 Correct 3 ms 4948 KB Output is correct
4 Correct 4 ms 4948 KB Output is correct
5 Correct 3 ms 4948 KB Output is correct
6 Correct 3 ms 4948 KB Output is correct
7 Correct 3 ms 4948 KB Output is correct
8 Correct 3 ms 4948 KB Output is correct
9 Correct 3 ms 4948 KB Output is correct
10 Correct 3 ms 4948 KB Output is correct
11 Correct 3 ms 4948 KB Output is correct
12 Correct 4 ms 4940 KB Output is correct
13 Correct 3 ms 5004 KB Output is correct
14 Correct 3 ms 5004 KB Output is correct
15 Correct 3 ms 5076 KB Output is correct
16 Correct 3 ms 5076 KB Output is correct
17 Correct 4 ms 5076 KB Output is correct
18 Correct 3 ms 5076 KB Output is correct
19 Correct 4 ms 5076 KB Output is correct
20 Correct 4 ms 5076 KB Output is correct
21 Correct 3 ms 5076 KB Output is correct
22 Correct 4 ms 5076 KB Output is correct
23 Correct 3 ms 5076 KB Output is correct
24 Correct 21 ms 9812 KB Output is correct
25 Correct 20 ms 9804 KB Output is correct
26 Correct 19 ms 9872 KB Output is correct
27 Correct 6 ms 5908 KB Output is correct
28 Correct 6 ms 5972 KB Output is correct
29 Correct 6 ms 5908 KB Output is correct
30 Correct 6 ms 5972 KB Output is correct
31 Correct 6 ms 5972 KB Output is correct
32 Correct 9 ms 5908 KB Output is correct
33 Correct 12 ms 7188 KB Output is correct
34 Correct 12 ms 7124 KB Output is correct
35 Correct 12 ms 7236 KB Output is correct
36 Correct 13 ms 7232 KB Output is correct
37 Correct 11 ms 7192 KB Output is correct
38 Correct 11 ms 7192 KB Output is correct
39 Correct 24 ms 11076 KB Output is correct
40 Correct 25 ms 11068 KB Output is correct
41 Correct 24 ms 11152 KB Output is correct
42 Correct 3 ms 4948 KB Output is correct
43 Correct 3 ms 5004 KB Output is correct
44 Correct 3 ms 5000 KB Output is correct
45 Correct 3 ms 5004 KB Output is correct
46 Correct 3 ms 4948 KB Output is correct
47 Correct 3 ms 4948 KB Output is correct
48 Correct 3 ms 4948 KB Output is correct
49 Correct 3 ms 5000 KB Output is correct
50 Correct 3 ms 4948 KB Output is correct
51 Correct 3 ms 5008 KB Output is correct
52 Correct 4 ms 4948 KB Output is correct
53 Correct 5 ms 4948 KB Output is correct
54 Correct 3 ms 4948 KB Output is correct
55 Correct 5 ms 5076 KB Output is correct
56 Correct 3 ms 4948 KB Output is correct
57 Correct 4 ms 4948 KB Output is correct
58 Correct 3 ms 5076 KB Output is correct
59 Correct 3 ms 4948 KB Output is correct
60 Correct 3 ms 4948 KB Output is correct
61 Correct 3 ms 5012 KB Output is correct
62 Correct 4 ms 4948 KB Output is correct
63 Correct 4 ms 5000 KB Output is correct
64 Correct 3 ms 5076 KB Output is correct
65 Correct 3 ms 5076 KB Output is correct
66 Correct 5 ms 5004 KB Output is correct
67 Correct 5 ms 5000 KB Output is correct
68 Correct 3 ms 5076 KB Output is correct
69 Correct 4 ms 5076 KB Output is correct
70 Correct 4 ms 5008 KB Output is correct
71 Correct 3 ms 5008 KB Output is correct
72 Correct 5 ms 5004 KB Output is correct
73 Correct 3 ms 5076 KB Output is correct
74 Correct 3 ms 5076 KB Output is correct
75 Correct 3 ms 4948 KB Output is correct
76 Correct 4 ms 5044 KB Output is correct
77 Correct 3 ms 4948 KB Output is correct
78 Correct 3 ms 5076 KB Output is correct
79 Correct 3 ms 5004 KB Output is correct
80 Correct 5 ms 5260 KB Output is correct
81 Correct 5 ms 5136 KB Output is correct
82 Correct 5 ms 5184 KB Output is correct
83 Correct 4 ms 5204 KB Output is correct
84 Correct 4 ms 5204 KB Output is correct
85 Correct 4 ms 5332 KB Output is correct
86 Correct 5 ms 5332 KB Output is correct
87 Correct 5 ms 5272 KB Output is correct
88 Correct 3 ms 5172 KB Output is correct
89 Correct 5 ms 5268 KB Output is correct
90 Correct 4 ms 5188 KB Output is correct
91 Correct 21 ms 8660 KB Output is correct
92 Correct 19 ms 9232 KB Output is correct
93 Correct 35 ms 9804 KB Output is correct
94 Correct 5 ms 5460 KB Output is correct
95 Correct 5 ms 5460 KB Output is correct
96 Correct 5 ms 5460 KB Output is correct
97 Correct 5 ms 5460 KB Output is correct
98 Correct 5 ms 5516 KB Output is correct
99 Correct 5 ms 5332 KB Output is correct
100 Correct 5 ms 5332 KB Output is correct
101 Correct 5 ms 5332 KB Output is correct
102 Correct 5 ms 5404 KB Output is correct
103 Correct 4 ms 5332 KB Output is correct
104 Correct 5 ms 5352 KB Output is correct
105 Correct 30 ms 10168 KB Output is correct
106 Correct 42 ms 10128 KB Output is correct
107 Correct 30 ms 10212 KB Output is correct
108 Correct 9 ms 5844 KB Output is correct
109 Correct 251 ms 63660 KB Output is correct
110 Correct 187 ms 30028 KB Output is correct
111 Correct 160 ms 28544 KB Output is correct
112 Correct 190 ms 36404 KB Output is correct
113 Correct 116 ms 20464 KB Output is correct
114 Correct 15 ms 7500 KB Output is correct
115 Correct 15 ms 7252 KB Output is correct
116 Correct 18 ms 7752 KB Output is correct
117 Correct 18 ms 7252 KB Output is correct
118 Correct 16 ms 7636 KB Output is correct
119 Correct 20 ms 7120 KB Output is correct
120 Correct 25 ms 8468 KB Output is correct
121 Correct 8 ms 6160 KB Output is correct
122 Correct 22 ms 8988 KB Output is correct
123 Correct 8 ms 5972 KB Output is correct
124 Correct 24 ms 9464 KB Output is correct
125 Correct 10 ms 6612 KB Output is correct
126 Correct 9 ms 6680 KB Output is correct
127 Correct 12 ms 6996 KB Output is correct
128 Correct 10 ms 6428 KB Output is correct
129 Correct 11 ms 6564 KB Output is correct
130 Correct 6 ms 5908 KB Output is correct
131 Correct 345 ms 85868 KB Output is correct
132 Correct 381 ms 45788 KB Output is correct
133 Correct 310 ms 45796 KB Output is correct
134 Correct 285 ms 45908 KB Output is correct
135 Correct 244 ms 41932 KB Output is correct
136 Correct 20 ms 8340 KB Output is correct
137 Correct 24 ms 8324 KB Output is correct
138 Correct 21 ms 8276 KB Output is correct
139 Correct 21 ms 8264 KB Output is correct
140 Correct 21 ms 8276 KB Output is correct
141 Correct 20 ms 8276 KB Output is correct
142 Correct 30 ms 10768 KB Output is correct
143 Correct 14 ms 6996 KB Output is correct
144 Correct 40 ms 10760 KB Output is correct
145 Correct 11 ms 6992 KB Output is correct
146 Correct 33 ms 10820 KB Output is correct
147 Correct 11 ms 6984 KB Output is correct
148 Correct 14 ms 7380 KB Output is correct
149 Correct 12 ms 7252 KB Output is correct
150 Correct 11 ms 7244 KB Output is correct
151 Correct 11 ms 7160 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 4948 KB Output is correct
2 Correct 3 ms 4948 KB Output is correct
3 Correct 3 ms 4948 KB Output is correct
4 Correct 4 ms 4948 KB Output is correct
5 Correct 3 ms 4948 KB Output is correct
6 Correct 3 ms 4948 KB Output is correct
7 Correct 3 ms 4948 KB Output is correct
8 Correct 3 ms 4948 KB Output is correct
9 Correct 3 ms 4948 KB Output is correct
10 Correct 3 ms 4948 KB Output is correct
11 Correct 3 ms 4948 KB Output is correct
12 Correct 4 ms 4940 KB Output is correct
13 Correct 3 ms 5004 KB Output is correct
14 Correct 3 ms 5004 KB Output is correct
15 Correct 3 ms 5076 KB Output is correct
16 Correct 3 ms 5076 KB Output is correct
17 Correct 4 ms 5076 KB Output is correct
18 Correct 3 ms 5076 KB Output is correct
19 Correct 4 ms 5076 KB Output is correct
20 Correct 4 ms 5076 KB Output is correct
21 Correct 3 ms 5076 KB Output is correct
22 Correct 4 ms 5076 KB Output is correct
23 Correct 3 ms 5076 KB Output is correct
24 Correct 21 ms 9812 KB Output is correct
25 Correct 20 ms 9804 KB Output is correct
26 Correct 19 ms 9872 KB Output is correct
27 Correct 6 ms 5908 KB Output is correct
28 Correct 6 ms 5972 KB Output is correct
29 Correct 6 ms 5908 KB Output is correct
30 Correct 6 ms 5972 KB Output is correct
31 Correct 6 ms 5972 KB Output is correct
32 Correct 9 ms 5908 KB Output is correct
33 Correct 12 ms 7188 KB Output is correct
34 Correct 12 ms 7124 KB Output is correct
35 Correct 12 ms 7236 KB Output is correct
36 Correct 13 ms 7232 KB Output is correct
37 Correct 11 ms 7192 KB Output is correct
38 Correct 11 ms 7192 KB Output is correct
39 Correct 24 ms 11076 KB Output is correct
40 Correct 25 ms 11068 KB Output is correct
41 Correct 24 ms 11152 KB Output is correct
42 Correct 15 ms 9420 KB Output is correct
43 Correct 11 ms 7764 KB Output is correct
44 Correct 23 ms 9728 KB Output is correct
45 Correct 17 ms 8204 KB Output is correct
46 Correct 12 ms 7920 KB Output is correct
47 Correct 16 ms 9872 KB Output is correct
48 Correct 46 ms 21292 KB Output is correct
49 Correct 29 ms 14284 KB Output is correct
50 Correct 39 ms 18124 KB Output is correct
51 Correct 48 ms 18180 KB Output is correct
52 Correct 59 ms 18000 KB Output is correct
53 Correct 44 ms 15112 KB Output is correct
54 Correct 16 ms 9812 KB Output is correct
55 Correct 16 ms 9812 KB Output is correct
56 Correct 18 ms 9884 KB Output is correct
57 Correct 16 ms 9828 KB Output is correct
58 Correct 17 ms 9812 KB Output is correct
59 Correct 16 ms 9804 KB Output is correct
60 Correct 56 ms 22776 KB Output is correct
61 Correct 58 ms 22836 KB Output is correct
62 Correct 55 ms 22864 KB Output is correct
63 Correct 56 ms 22860 KB Output is correct
64 Correct 53 ms 22824 KB Output is correct
65 Correct 52 ms 22836 KB Output is correct
66 Correct 56 ms 21616 KB Output is correct
67 Correct 65 ms 21612 KB Output is correct
68 Correct 57 ms 21712 KB Output is correct
69 Correct 3 ms 4948 KB Output is correct
70 Correct 3 ms 5004 KB Output is correct
71 Correct 3 ms 5000 KB Output is correct
72 Correct 3 ms 5004 KB Output is correct
73 Correct 3 ms 4948 KB Output is correct
74 Correct 3 ms 4948 KB Output is correct
75 Correct 3 ms 4948 KB Output is correct
76 Correct 3 ms 5000 KB Output is correct
77 Correct 3 ms 4948 KB Output is correct
78 Correct 3 ms 5008 KB Output is correct
79 Correct 4 ms 4948 KB Output is correct
80 Correct 5 ms 4948 KB Output is correct
81 Correct 3 ms 4948 KB Output is correct
82 Correct 5 ms 5076 KB Output is correct
83 Correct 3 ms 4948 KB Output is correct
84 Correct 4 ms 4948 KB Output is correct
85 Correct 3 ms 5076 KB Output is correct
86 Correct 3 ms 4948 KB Output is correct
87 Correct 3 ms 4948 KB Output is correct
88 Correct 3 ms 5012 KB Output is correct
89 Correct 4 ms 4948 KB Output is correct
90 Correct 4 ms 5000 KB Output is correct
91 Correct 3 ms 5076 KB Output is correct
92 Correct 3 ms 5076 KB Output is correct
93 Correct 5 ms 5004 KB Output is correct
94 Correct 5 ms 5000 KB Output is correct
95 Correct 3 ms 5076 KB Output is correct
96 Correct 4 ms 5076 KB Output is correct
97 Correct 4 ms 5008 KB Output is correct
98 Correct 3 ms 5008 KB Output is correct
99 Correct 5 ms 5004 KB Output is correct
100 Correct 3 ms 5076 KB Output is correct
101 Correct 3 ms 5076 KB Output is correct
102 Correct 3 ms 4948 KB Output is correct
103 Correct 4 ms 5044 KB Output is correct
104 Correct 3 ms 4948 KB Output is correct
105 Correct 3 ms 5076 KB Output is correct
106 Correct 3 ms 5004 KB Output is correct
107 Correct 5 ms 5260 KB Output is correct
108 Correct 5 ms 5136 KB Output is correct
109 Correct 5 ms 5184 KB Output is correct
110 Correct 4 ms 5204 KB Output is correct
111 Correct 4 ms 5204 KB Output is correct
112 Correct 4 ms 5332 KB Output is correct
113 Correct 5 ms 5332 KB Output is correct
114 Correct 5 ms 5272 KB Output is correct
115 Correct 3 ms 5172 KB Output is correct
116 Correct 5 ms 5268 KB Output is correct
117 Correct 4 ms 5188 KB Output is correct
118 Correct 21 ms 8660 KB Output is correct
119 Correct 19 ms 9232 KB Output is correct
120 Correct 35 ms 9804 KB Output is correct
121 Correct 5 ms 5460 KB Output is correct
122 Correct 5 ms 5460 KB Output is correct
123 Correct 5 ms 5460 KB Output is correct
124 Correct 5 ms 5460 KB Output is correct
125 Correct 5 ms 5516 KB Output is correct
126 Correct 5 ms 5332 KB Output is correct
127 Correct 5 ms 5332 KB Output is correct
128 Correct 5 ms 5332 KB Output is correct
129 Correct 5 ms 5404 KB Output is correct
130 Correct 4 ms 5332 KB Output is correct
131 Correct 5 ms 5352 KB Output is correct
132 Correct 30 ms 10168 KB Output is correct
133 Correct 42 ms 10128 KB Output is correct
134 Correct 30 ms 10212 KB Output is correct
135 Correct 9 ms 5844 KB Output is correct
136 Correct 251 ms 63660 KB Output is correct
137 Correct 187 ms 30028 KB Output is correct
138 Correct 160 ms 28544 KB Output is correct
139 Correct 190 ms 36404 KB Output is correct
140 Correct 116 ms 20464 KB Output is correct
141 Correct 15 ms 7500 KB Output is correct
142 Correct 15 ms 7252 KB Output is correct
143 Correct 18 ms 7752 KB Output is correct
144 Correct 18 ms 7252 KB Output is correct
145 Correct 16 ms 7636 KB Output is correct
146 Correct 20 ms 7120 KB Output is correct
147 Correct 25 ms 8468 KB Output is correct
148 Correct 8 ms 6160 KB Output is correct
149 Correct 22 ms 8988 KB Output is correct
150 Correct 8 ms 5972 KB Output is correct
151 Correct 24 ms 9464 KB Output is correct
152 Correct 10 ms 6612 KB Output is correct
153 Correct 9 ms 6680 KB Output is correct
154 Correct 12 ms 6996 KB Output is correct
155 Correct 10 ms 6428 KB Output is correct
156 Correct 11 ms 6564 KB Output is correct
157 Correct 6 ms 5908 KB Output is correct
158 Correct 345 ms 85868 KB Output is correct
159 Correct 381 ms 45788 KB Output is correct
160 Correct 310 ms 45796 KB Output is correct
161 Correct 285 ms 45908 KB Output is correct
162 Correct 244 ms 41932 KB Output is correct
163 Correct 20 ms 8340 KB Output is correct
164 Correct 24 ms 8324 KB Output is correct
165 Correct 21 ms 8276 KB Output is correct
166 Correct 21 ms 8264 KB Output is correct
167 Correct 21 ms 8276 KB Output is correct
168 Correct 20 ms 8276 KB Output is correct
169 Correct 30 ms 10768 KB Output is correct
170 Correct 14 ms 6996 KB Output is correct
171 Correct 40 ms 10760 KB Output is correct
172 Correct 11 ms 6992 KB Output is correct
173 Correct 33 ms 10820 KB Output is correct
174 Correct 11 ms 6984 KB Output is correct
175 Correct 14 ms 7380 KB Output is correct
176 Correct 12 ms 7252 KB Output is correct
177 Correct 11 ms 7244 KB Output is correct
178 Correct 11 ms 7160 KB Output is correct
179 Correct 17 ms 7956 KB Output is correct
180 Correct 599 ms 111024 KB Output is correct
181 Correct 1054 ms 158408 KB Output is correct
182 Correct 1476 ms 207096 KB Output is correct
183 Correct 694 ms 104972 KB Output is correct
184 Correct 528 ms 69724 KB Output is correct
185 Correct 34 ms 11724 KB Output is correct
186 Correct 31 ms 14228 KB Output is correct
187 Correct 40 ms 13052 KB Output is correct
188 Correct 26 ms 10280 KB Output is correct
189 Correct 40 ms 13260 KB Output is correct
190 Correct 33 ms 12044 KB Output is correct
191 Correct 45 ms 14156 KB Output is correct
192 Correct 29 ms 9360 KB Output is correct
193 Correct 34 ms 10924 KB Output is correct
194 Correct 20 ms 9868 KB Output is correct
195 Execution timed out 1613 ms 399936 KB Time limit exceeded
196 Halted 0 ms 0 KB -