Submission #965841

# Submission time Handle Problem Language Result Execution time Memory
965841 2024-04-19T07:34:26 Z phoenix0423 Painting Walls (APIO20_paint) C++17
40 / 100
1147 ms 524288 KB
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
#define fastio ios::sync_with_stdio(false), cin.tie(0)
#define pb push_back
#define eb emplace_back
#define f first
#define s second
#include "paint.h"
const int INF = 1e9 + 7;
const int maxn = 1e5 + 5;
set<int> st[maxn], ed[maxn];

int minimumInstructions(
    int n, int m, int k, std::vector<int> c,
    std::vector<int> a, std::vector<std::vector<int>> b) {
    vector<vector<int>> pos(k);
    for(int i = 0; i < n; i++) pos[c[i]].pb(i);
    for(int i = 0; i < m; i++){
      for(int j = 0; j < a[i]; j++){
        for(auto x : pos[b[i][j]]){
          if(x >= i) st[x - i].insert(i);
          if(x + m - i < n) ed[x + m - i].insert(i);
        }
      }
    }
    vector<int> valid(n);
    for(int i = 0; i < n; i++){
      int l = m, r = -1;
      while(ed[i].count(l - 1)) l--;
      while(st[i].count(r + 1)) r++;
      // cout<<i<<" : "<<l<<" "<<r<<"\n";
      int len = r - l + 2;
      if(len <= 0) continue;
      // cout<<"add : ["<<i - r<<" - "<<i - r + len - 1<<"]\n";
      valid[i - (m - l)] ++;
      if(i - (m - l) + len < n) valid[i - (m - l) + len] --;
    }
    for(int i = 1; i < n; i++) valid[i] += valid[i - 1];
    // for(int i = 0; i < n; i++) cout<<valid[i]<<" ";
    // cout<<"\n";
    deque<int> dq;
    vector<int> dp(n, INF);
    if(!valid[0]) return -1;
    dq.pb(0), dp[0] = 1;
    for(int i = 1; i < n; i++){
      if(!valid[i]) continue;
      while(dq.size() && dq[0] < i - m) dq.pop_front();
      if(dq.empty()) break;
      // cout<<"ck : "<<i<<" : "<<dq.size()<<"\n";
      // cout<<"top : "<<dq[0]<<" "<<dp[dq[0]]<<"\n";
      dp[i] = dp[dq[0]] + 1;
      while(!dq.empty() && dp[dq.size() - 1] >= dp[i]) dq.pop_back();
      dq.pb(i);
    }
    // for(int i = 0; i < n; i++) cout<<dp[i]<<" ";
    // cout<<"\n";
    int ans = INF;
    for(int i = n - 1; i >= n - m; i--) ans = min(ans, dp[i]);
    return ans < INF ? ans : -1;
}


// int main() {
//   int N, M, K;
//   assert(3 == scanf("%d %d %d", &N, &M, &K));
  
//   std::vector<int> C(N);
//   for (int i = 0; i < N; ++i) {
//     assert(1 == scanf("%d", &C[i]));
//   }

//   std::vector<int> A(M);
//   std::vector<std::vector<int>> B(M);
//   for (int i = 0; i < M; ++i) {
//     assert(1 == scanf("%d", &A[i]));
//     B[i].resize(A[i]);
//     for (int j = 0; j < A[i]; ++j) {
//       assert(1 == scanf("%d", &B[i][j]));
//     }
//   }

//   int minimum_instructions = minimumInstructions(N, M, K, C, A, B);
//   printf("%d\n", minimum_instructions);
  
//   return 0;
// }

/*
8 3 5
3 3 1 3 4 4 2 2
3 0 1 2
2 2 3
2 3 4
*/

/*

*/
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9832 KB Output is correct
2 Correct 4 ms 9832 KB Output is correct
3 Correct 2 ms 9820 KB Output is correct
4 Correct 2 ms 9820 KB Output is correct
5 Correct 2 ms 9820 KB Output is correct
6 Correct 2 ms 9820 KB Output is correct
7 Correct 2 ms 9820 KB Output is correct
8 Correct 2 ms 9820 KB Output is correct
9 Correct 2 ms 9816 KB Output is correct
10 Correct 2 ms 9820 KB Output is correct
11 Correct 3 ms 9820 KB Output is correct
12 Correct 2 ms 9820 KB Output is correct
13 Correct 4 ms 12124 KB Output is correct
14 Correct 3 ms 12124 KB Output is correct
15 Correct 5 ms 12124 KB Output is correct
16 Correct 4 ms 12124 KB Output is correct
17 Correct 4 ms 12124 KB Output is correct
18 Correct 4 ms 12124 KB Output is correct
19 Correct 4 ms 12128 KB Output is correct
20 Correct 3 ms 12136 KB Output is correct
21 Correct 4 ms 12120 KB Output is correct
22 Correct 12 ms 12876 KB Output is correct
23 Correct 13 ms 12892 KB Output is correct
24 Correct 12 ms 12892 KB Output is correct
25 Correct 6 ms 11868 KB Output is correct
26 Correct 8 ms 11960 KB Output is correct
27 Correct 7 ms 11868 KB Output is correct
28 Correct 7 ms 11964 KB Output is correct
29 Correct 6 ms 12124 KB Output is correct
30 Correct 7 ms 12032 KB Output is correct
31 Correct 15 ms 15192 KB Output is correct
32 Correct 16 ms 15196 KB Output is correct
33 Correct 15 ms 15092 KB Output is correct
34 Correct 15 ms 15196 KB Output is correct
35 Correct 16 ms 15196 KB Output is correct
36 Correct 18 ms 15448 KB Output is correct
37 Correct 23 ms 15708 KB Output is correct
38 Correct 25 ms 15708 KB Output is correct
39 Correct 24 ms 15864 KB Output is correct
40 Correct 18 ms 19924 KB Output is correct
41 Correct 15 ms 16088 KB Output is correct
42 Correct 21 ms 20948 KB Output is correct
43 Correct 15 ms 17308 KB Output is correct
44 Correct 15 ms 16472 KB Output is correct
45 Correct 26 ms 21072 KB Output is correct
46 Correct 62 ms 28244 KB Output is correct
47 Correct 45 ms 21072 KB Output is correct
48 Correct 36 ms 22356 KB Output is correct
49 Correct 41 ms 22364 KB Output is correct
50 Correct 52 ms 23380 KB Output is correct
51 Correct 54 ms 22360 KB Output is correct
52 Correct 21 ms 20944 KB Output is correct
53 Correct 22 ms 20948 KB Output is correct
54 Correct 23 ms 20952 KB Output is correct
55 Correct 26 ms 21144 KB Output is correct
56 Correct 31 ms 20960 KB Output is correct
57 Correct 30 ms 21072 KB Output is correct
58 Correct 71 ms 29708 KB Output is correct
59 Correct 78 ms 29780 KB Output is correct
60 Correct 70 ms 29776 KB Output is correct
61 Correct 70 ms 29780 KB Output is correct
62 Correct 71 ms 29780 KB Output is correct
63 Correct 89 ms 29780 KB Output is correct
64 Correct 71 ms 27980 KB Output is correct
65 Correct 68 ms 28240 KB Output is correct
66 Correct 80 ms 27984 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9832 KB Output is correct
2 Correct 4 ms 9832 KB Output is correct
3 Correct 2 ms 9820 KB Output is correct
4 Correct 2 ms 9820 KB Output is correct
5 Correct 2 ms 9820 KB Output is correct
6 Correct 2 ms 9820 KB Output is correct
7 Correct 2 ms 9820 KB Output is correct
8 Correct 2 ms 9820 KB Output is correct
9 Correct 2 ms 9816 KB Output is correct
10 Correct 2 ms 9820 KB Output is correct
11 Correct 3 ms 9820 KB Output is correct
12 Correct 2 ms 9820 KB Output is correct
13 Correct 4 ms 12124 KB Output is correct
14 Correct 3 ms 12124 KB Output is correct
15 Correct 5 ms 12124 KB Output is correct
16 Correct 4 ms 12124 KB Output is correct
17 Correct 4 ms 12124 KB Output is correct
18 Correct 4 ms 12124 KB Output is correct
19 Correct 4 ms 12128 KB Output is correct
20 Correct 3 ms 12136 KB Output is correct
21 Correct 4 ms 12120 KB Output is correct
22 Correct 2 ms 9820 KB Output is correct
23 Correct 3 ms 9820 KB Output is correct
24 Correct 2 ms 9820 KB Output is correct
25 Correct 2 ms 9820 KB Output is correct
26 Correct 3 ms 9820 KB Output is correct
27 Correct 2 ms 9816 KB Output is correct
28 Correct 3 ms 10588 KB Output is correct
29 Correct 3 ms 10076 KB Output is correct
30 Correct 3 ms 10076 KB Output is correct
31 Correct 3 ms 10072 KB Output is correct
32 Correct 3 ms 10076 KB Output is correct
33 Correct 4 ms 11876 KB Output is correct
34 Correct 3 ms 11352 KB Output is correct
35 Correct 3 ms 11100 KB Output is correct
36 Correct 4 ms 12124 KB Output is correct
37 Correct 3 ms 11608 KB Output is correct
38 Correct 4 ms 11868 KB Output is correct
39 Correct 2 ms 9820 KB Output is correct
40 Correct 3 ms 11612 KB Output is correct
41 Correct 3 ms 9820 KB Output is correct
42 Correct 3 ms 11868 KB Output is correct
43 Correct 4 ms 11868 KB Output is correct
44 Correct 2 ms 9820 KB Output is correct
45 Correct 4 ms 11032 KB Output is correct
46 Correct 4 ms 10588 KB Output is correct
47 Correct 4 ms 10588 KB Output is correct
48 Correct 4 ms 10328 KB Output is correct
49 Correct 3 ms 10328 KB Output is correct
50 Correct 5 ms 12124 KB Output is correct
51 Correct 4 ms 12124 KB Output is correct
52 Correct 4 ms 12124 KB Output is correct
53 Correct 4 ms 12216 KB Output is correct
54 Correct 3 ms 12120 KB Output is correct
55 Correct 7 ms 12124 KB Output is correct
56 Correct 4 ms 12220 KB Output is correct
57 Correct 3 ms 9820 KB Output is correct
58 Correct 4 ms 12124 KB Output is correct
59 Correct 3 ms 9820 KB Output is correct
60 Correct 4 ms 12124 KB Output is correct
61 Correct 3 ms 9820 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 9820 KB Output is correct
2 Correct 3 ms 9820 KB Output is correct
3 Correct 4 ms 9832 KB Output is correct
4 Correct 4 ms 9832 KB Output is correct
5 Correct 2 ms 9820 KB Output is correct
6 Correct 2 ms 9820 KB Output is correct
7 Correct 2 ms 9820 KB Output is correct
8 Correct 2 ms 9820 KB Output is correct
9 Correct 2 ms 9820 KB Output is correct
10 Correct 2 ms 9820 KB Output is correct
11 Correct 2 ms 9816 KB Output is correct
12 Correct 2 ms 9820 KB Output is correct
13 Correct 3 ms 9820 KB Output is correct
14 Correct 2 ms 9820 KB Output is correct
15 Correct 4 ms 12124 KB Output is correct
16 Correct 3 ms 12124 KB Output is correct
17 Correct 5 ms 12124 KB Output is correct
18 Correct 4 ms 12124 KB Output is correct
19 Correct 4 ms 12124 KB Output is correct
20 Correct 4 ms 12124 KB Output is correct
21 Correct 4 ms 12128 KB Output is correct
22 Correct 3 ms 12136 KB Output is correct
23 Correct 4 ms 12120 KB Output is correct
24 Correct 12 ms 12876 KB Output is correct
25 Correct 13 ms 12892 KB Output is correct
26 Correct 12 ms 12892 KB Output is correct
27 Correct 2 ms 9820 KB Output is correct
28 Correct 2 ms 9820 KB Output is correct
29 Correct 3 ms 9820 KB Output is correct
30 Correct 2 ms 9816 KB Output is correct
31 Correct 3 ms 10588 KB Output is correct
32 Correct 3 ms 10076 KB Output is correct
33 Correct 3 ms 10076 KB Output is correct
34 Correct 3 ms 10072 KB Output is correct
35 Correct 3 ms 10076 KB Output is correct
36 Correct 4 ms 11876 KB Output is correct
37 Correct 3 ms 11352 KB Output is correct
38 Correct 3 ms 11100 KB Output is correct
39 Correct 4 ms 12124 KB Output is correct
40 Correct 3 ms 11608 KB Output is correct
41 Correct 4 ms 11868 KB Output is correct
42 Correct 2 ms 9820 KB Output is correct
43 Correct 3 ms 11612 KB Output is correct
44 Correct 3 ms 9820 KB Output is correct
45 Correct 3 ms 11868 KB Output is correct
46 Correct 4 ms 11868 KB Output is correct
47 Correct 2 ms 9820 KB Output is correct
48 Correct 4 ms 11032 KB Output is correct
49 Correct 4 ms 10588 KB Output is correct
50 Correct 4 ms 10588 KB Output is correct
51 Correct 4 ms 10328 KB Output is correct
52 Correct 3 ms 10328 KB Output is correct
53 Correct 5 ms 12124 KB Output is correct
54 Correct 4 ms 12124 KB Output is correct
55 Correct 4 ms 12124 KB Output is correct
56 Correct 4 ms 12216 KB Output is correct
57 Correct 3 ms 12120 KB Output is correct
58 Correct 7 ms 12124 KB Output is correct
59 Correct 4 ms 12220 KB Output is correct
60 Correct 3 ms 9820 KB Output is correct
61 Correct 4 ms 12124 KB Output is correct
62 Correct 3 ms 9820 KB Output is correct
63 Correct 4 ms 12124 KB Output is correct
64 Correct 3 ms 9820 KB Output is correct
65 Correct 10 ms 12636 KB Output is correct
66 Correct 6 ms 11568 KB Output is correct
67 Correct 16 ms 14684 KB Output is correct
68 Correct 10 ms 12892 KB Output is correct
69 Correct 14 ms 14072 KB Output is correct
70 Correct 7 ms 12632 KB Output is correct
71 Correct 6 ms 12528 KB Output is correct
72 Correct 7 ms 12124 KB Output is correct
73 Correct 5 ms 12124 KB Output is correct
74 Correct 6 ms 12636 KB Output is correct
75 Correct 6 ms 12712 KB Output is correct
76 Correct 13 ms 12892 KB Output is correct
77 Correct 14 ms 13400 KB Output is correct
78 Correct 15 ms 13652 KB Output is correct
79 Correct 21 ms 17328 KB Output is correct
80 Correct 22 ms 17388 KB Output is correct
81 Correct 26 ms 17240 KB Output is correct
82 Correct 27 ms 17256 KB Output is correct
83 Correct 27 ms 17244 KB Output is correct
84 Correct 8 ms 13404 KB Output is correct
85 Correct 8 ms 13404 KB Output is correct
86 Correct 8 ms 13404 KB Output is correct
87 Correct 10 ms 13744 KB Output is correct
88 Correct 8 ms 13400 KB Output is correct
89 Correct 9 ms 13404 KB Output is correct
90 Correct 17 ms 14136 KB Output is correct
91 Correct 18 ms 13912 KB Output is correct
92 Correct 16 ms 14132 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 9820 KB Output is correct
2 Correct 3 ms 9820 KB Output is correct
3 Correct 4 ms 9832 KB Output is correct
4 Correct 4 ms 9832 KB Output is correct
5 Correct 2 ms 9820 KB Output is correct
6 Correct 2 ms 9820 KB Output is correct
7 Correct 2 ms 9820 KB Output is correct
8 Correct 2 ms 9820 KB Output is correct
9 Correct 2 ms 9820 KB Output is correct
10 Correct 2 ms 9820 KB Output is correct
11 Correct 2 ms 9816 KB Output is correct
12 Correct 2 ms 9820 KB Output is correct
13 Correct 3 ms 9820 KB Output is correct
14 Correct 2 ms 9820 KB Output is correct
15 Correct 4 ms 12124 KB Output is correct
16 Correct 3 ms 12124 KB Output is correct
17 Correct 5 ms 12124 KB Output is correct
18 Correct 4 ms 12124 KB Output is correct
19 Correct 4 ms 12124 KB Output is correct
20 Correct 4 ms 12124 KB Output is correct
21 Correct 4 ms 12128 KB Output is correct
22 Correct 3 ms 12136 KB Output is correct
23 Correct 4 ms 12120 KB Output is correct
24 Correct 12 ms 12876 KB Output is correct
25 Correct 13 ms 12892 KB Output is correct
26 Correct 12 ms 12892 KB Output is correct
27 Correct 6 ms 11868 KB Output is correct
28 Correct 8 ms 11960 KB Output is correct
29 Correct 7 ms 11868 KB Output is correct
30 Correct 7 ms 11964 KB Output is correct
31 Correct 6 ms 12124 KB Output is correct
32 Correct 7 ms 12032 KB Output is correct
33 Correct 15 ms 15192 KB Output is correct
34 Correct 16 ms 15196 KB Output is correct
35 Correct 15 ms 15092 KB Output is correct
36 Correct 15 ms 15196 KB Output is correct
37 Correct 16 ms 15196 KB Output is correct
38 Correct 18 ms 15448 KB Output is correct
39 Correct 23 ms 15708 KB Output is correct
40 Correct 25 ms 15708 KB Output is correct
41 Correct 24 ms 15864 KB Output is correct
42 Correct 2 ms 9820 KB Output is correct
43 Correct 2 ms 9820 KB Output is correct
44 Correct 3 ms 9820 KB Output is correct
45 Correct 2 ms 9816 KB Output is correct
46 Correct 3 ms 10588 KB Output is correct
47 Correct 3 ms 10076 KB Output is correct
48 Correct 3 ms 10076 KB Output is correct
49 Correct 3 ms 10072 KB Output is correct
50 Correct 3 ms 10076 KB Output is correct
51 Correct 4 ms 11876 KB Output is correct
52 Correct 3 ms 11352 KB Output is correct
53 Correct 3 ms 11100 KB Output is correct
54 Correct 4 ms 12124 KB Output is correct
55 Correct 3 ms 11608 KB Output is correct
56 Correct 4 ms 11868 KB Output is correct
57 Correct 2 ms 9820 KB Output is correct
58 Correct 3 ms 11612 KB Output is correct
59 Correct 3 ms 9820 KB Output is correct
60 Correct 3 ms 11868 KB Output is correct
61 Correct 4 ms 11868 KB Output is correct
62 Correct 2 ms 9820 KB Output is correct
63 Correct 4 ms 11032 KB Output is correct
64 Correct 4 ms 10588 KB Output is correct
65 Correct 4 ms 10588 KB Output is correct
66 Correct 4 ms 10328 KB Output is correct
67 Correct 3 ms 10328 KB Output is correct
68 Correct 5 ms 12124 KB Output is correct
69 Correct 4 ms 12124 KB Output is correct
70 Correct 4 ms 12124 KB Output is correct
71 Correct 4 ms 12216 KB Output is correct
72 Correct 3 ms 12120 KB Output is correct
73 Correct 7 ms 12124 KB Output is correct
74 Correct 4 ms 12220 KB Output is correct
75 Correct 3 ms 9820 KB Output is correct
76 Correct 4 ms 12124 KB Output is correct
77 Correct 3 ms 9820 KB Output is correct
78 Correct 4 ms 12124 KB Output is correct
79 Correct 3 ms 9820 KB Output is correct
80 Correct 10 ms 12636 KB Output is correct
81 Correct 6 ms 11568 KB Output is correct
82 Correct 16 ms 14684 KB Output is correct
83 Correct 10 ms 12892 KB Output is correct
84 Correct 14 ms 14072 KB Output is correct
85 Correct 7 ms 12632 KB Output is correct
86 Correct 6 ms 12528 KB Output is correct
87 Correct 7 ms 12124 KB Output is correct
88 Correct 5 ms 12124 KB Output is correct
89 Correct 6 ms 12636 KB Output is correct
90 Correct 6 ms 12712 KB Output is correct
91 Correct 13 ms 12892 KB Output is correct
92 Correct 14 ms 13400 KB Output is correct
93 Correct 15 ms 13652 KB Output is correct
94 Correct 21 ms 17328 KB Output is correct
95 Correct 22 ms 17388 KB Output is correct
96 Correct 26 ms 17240 KB Output is correct
97 Correct 27 ms 17256 KB Output is correct
98 Correct 27 ms 17244 KB Output is correct
99 Correct 8 ms 13404 KB Output is correct
100 Correct 8 ms 13404 KB Output is correct
101 Correct 8 ms 13404 KB Output is correct
102 Correct 10 ms 13744 KB Output is correct
103 Correct 8 ms 13400 KB Output is correct
104 Correct 9 ms 13404 KB Output is correct
105 Correct 17 ms 14136 KB Output is correct
106 Correct 18 ms 13912 KB Output is correct
107 Correct 16 ms 14132 KB Output is correct
108 Correct 8 ms 13972 KB Output is correct
109 Runtime error 1147 ms 524288 KB Execution killed with signal 9
110 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 9820 KB Output is correct
2 Correct 3 ms 9820 KB Output is correct
3 Correct 4 ms 9832 KB Output is correct
4 Correct 4 ms 9832 KB Output is correct
5 Correct 2 ms 9820 KB Output is correct
6 Correct 2 ms 9820 KB Output is correct
7 Correct 2 ms 9820 KB Output is correct
8 Correct 2 ms 9820 KB Output is correct
9 Correct 2 ms 9820 KB Output is correct
10 Correct 2 ms 9820 KB Output is correct
11 Correct 2 ms 9816 KB Output is correct
12 Correct 2 ms 9820 KB Output is correct
13 Correct 3 ms 9820 KB Output is correct
14 Correct 2 ms 9820 KB Output is correct
15 Correct 4 ms 12124 KB Output is correct
16 Correct 3 ms 12124 KB Output is correct
17 Correct 5 ms 12124 KB Output is correct
18 Correct 4 ms 12124 KB Output is correct
19 Correct 4 ms 12124 KB Output is correct
20 Correct 4 ms 12124 KB Output is correct
21 Correct 4 ms 12128 KB Output is correct
22 Correct 3 ms 12136 KB Output is correct
23 Correct 4 ms 12120 KB Output is correct
24 Correct 12 ms 12876 KB Output is correct
25 Correct 13 ms 12892 KB Output is correct
26 Correct 12 ms 12892 KB Output is correct
27 Correct 6 ms 11868 KB Output is correct
28 Correct 8 ms 11960 KB Output is correct
29 Correct 7 ms 11868 KB Output is correct
30 Correct 7 ms 11964 KB Output is correct
31 Correct 6 ms 12124 KB Output is correct
32 Correct 7 ms 12032 KB Output is correct
33 Correct 15 ms 15192 KB Output is correct
34 Correct 16 ms 15196 KB Output is correct
35 Correct 15 ms 15092 KB Output is correct
36 Correct 15 ms 15196 KB Output is correct
37 Correct 16 ms 15196 KB Output is correct
38 Correct 18 ms 15448 KB Output is correct
39 Correct 23 ms 15708 KB Output is correct
40 Correct 25 ms 15708 KB Output is correct
41 Correct 24 ms 15864 KB Output is correct
42 Correct 18 ms 19924 KB Output is correct
43 Correct 15 ms 16088 KB Output is correct
44 Correct 21 ms 20948 KB Output is correct
45 Correct 15 ms 17308 KB Output is correct
46 Correct 15 ms 16472 KB Output is correct
47 Correct 26 ms 21072 KB Output is correct
48 Correct 62 ms 28244 KB Output is correct
49 Correct 45 ms 21072 KB Output is correct
50 Correct 36 ms 22356 KB Output is correct
51 Correct 41 ms 22364 KB Output is correct
52 Correct 52 ms 23380 KB Output is correct
53 Correct 54 ms 22360 KB Output is correct
54 Correct 21 ms 20944 KB Output is correct
55 Correct 22 ms 20948 KB Output is correct
56 Correct 23 ms 20952 KB Output is correct
57 Correct 26 ms 21144 KB Output is correct
58 Correct 31 ms 20960 KB Output is correct
59 Correct 30 ms 21072 KB Output is correct
60 Correct 71 ms 29708 KB Output is correct
61 Correct 78 ms 29780 KB Output is correct
62 Correct 70 ms 29776 KB Output is correct
63 Correct 70 ms 29780 KB Output is correct
64 Correct 71 ms 29780 KB Output is correct
65 Correct 89 ms 29780 KB Output is correct
66 Correct 71 ms 27980 KB Output is correct
67 Correct 68 ms 28240 KB Output is correct
68 Correct 80 ms 27984 KB Output is correct
69 Correct 2 ms 9820 KB Output is correct
70 Correct 2 ms 9820 KB Output is correct
71 Correct 3 ms 9820 KB Output is correct
72 Correct 2 ms 9816 KB Output is correct
73 Correct 3 ms 10588 KB Output is correct
74 Correct 3 ms 10076 KB Output is correct
75 Correct 3 ms 10076 KB Output is correct
76 Correct 3 ms 10072 KB Output is correct
77 Correct 3 ms 10076 KB Output is correct
78 Correct 4 ms 11876 KB Output is correct
79 Correct 3 ms 11352 KB Output is correct
80 Correct 3 ms 11100 KB Output is correct
81 Correct 4 ms 12124 KB Output is correct
82 Correct 3 ms 11608 KB Output is correct
83 Correct 4 ms 11868 KB Output is correct
84 Correct 2 ms 9820 KB Output is correct
85 Correct 3 ms 11612 KB Output is correct
86 Correct 3 ms 9820 KB Output is correct
87 Correct 3 ms 11868 KB Output is correct
88 Correct 4 ms 11868 KB Output is correct
89 Correct 2 ms 9820 KB Output is correct
90 Correct 4 ms 11032 KB Output is correct
91 Correct 4 ms 10588 KB Output is correct
92 Correct 4 ms 10588 KB Output is correct
93 Correct 4 ms 10328 KB Output is correct
94 Correct 3 ms 10328 KB Output is correct
95 Correct 5 ms 12124 KB Output is correct
96 Correct 4 ms 12124 KB Output is correct
97 Correct 4 ms 12124 KB Output is correct
98 Correct 4 ms 12216 KB Output is correct
99 Correct 3 ms 12120 KB Output is correct
100 Correct 7 ms 12124 KB Output is correct
101 Correct 4 ms 12220 KB Output is correct
102 Correct 3 ms 9820 KB Output is correct
103 Correct 4 ms 12124 KB Output is correct
104 Correct 3 ms 9820 KB Output is correct
105 Correct 4 ms 12124 KB Output is correct
106 Correct 3 ms 9820 KB Output is correct
107 Correct 10 ms 12636 KB Output is correct
108 Correct 6 ms 11568 KB Output is correct
109 Correct 16 ms 14684 KB Output is correct
110 Correct 10 ms 12892 KB Output is correct
111 Correct 14 ms 14072 KB Output is correct
112 Correct 7 ms 12632 KB Output is correct
113 Correct 6 ms 12528 KB Output is correct
114 Correct 7 ms 12124 KB Output is correct
115 Correct 5 ms 12124 KB Output is correct
116 Correct 6 ms 12636 KB Output is correct
117 Correct 6 ms 12712 KB Output is correct
118 Correct 13 ms 12892 KB Output is correct
119 Correct 14 ms 13400 KB Output is correct
120 Correct 15 ms 13652 KB Output is correct
121 Correct 21 ms 17328 KB Output is correct
122 Correct 22 ms 17388 KB Output is correct
123 Correct 26 ms 17240 KB Output is correct
124 Correct 27 ms 17256 KB Output is correct
125 Correct 27 ms 17244 KB Output is correct
126 Correct 8 ms 13404 KB Output is correct
127 Correct 8 ms 13404 KB Output is correct
128 Correct 8 ms 13404 KB Output is correct
129 Correct 10 ms 13744 KB Output is correct
130 Correct 8 ms 13400 KB Output is correct
131 Correct 9 ms 13404 KB Output is correct
132 Correct 17 ms 14136 KB Output is correct
133 Correct 18 ms 13912 KB Output is correct
134 Correct 16 ms 14132 KB Output is correct
135 Correct 8 ms 13972 KB Output is correct
136 Runtime error 1147 ms 524288 KB Execution killed with signal 9
137 Halted 0 ms 0 KB -