답안 #872462

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
872462 2023-11-13T07:03:44 Z abczz 벽 칠하기 (APIO20_paint) C++14
40 / 100
1500 ms 267272 KB
#include "paint.h"
#include <iostream>
#include <vector>
#include <map>
#include <queue>
#include <array>
#define ll long long

using namespace std;

bool F[100000], ok;
ll f, z, r, cnt[100000];
int minimumInstructions(
    int N, int M, int K, std::vector<int> C,
    std::vector<int> A, std::vector<std::vector<int>> B) {
  vector <ll> X[100000];
  priority_queue<array<ll, 2>> pq;
  for (int i=0; i<N; ++i) F[i] = 0;
  for (int i=0; i<M; ++i) {
    cnt[i] = 0;
    for (int j=0; j<A[i]; ++j) {
      X[B[i][j]].push_back(i);
    }
  }
  for (int i=0; i<M; ++i) {
    for (auto u : X[C[i]]) {
      z = (u-i+M)%M;
      ++cnt[z];
      pq.push({cnt[z], z});
    }
  }
  ok = 0;
  while (!pq.empty()) {
    auto [w, u] = pq.top();
    if (cnt[u] != w) pq.pop();
    else if (w != M) break;
    else {
      ok = 1;
      break;
    }
  }
  if (ok) F[0] = 1;
  for (int i=M; i<N; ++i) {
    for (auto u : X[C[i]]) {
      z = (u-(i%M)+M)%M;
      ++cnt[z];
      pq.push({cnt[z], z});
    }
    for (auto u : X[C[i-M]]) {
      z = (u-((i-M)%M)+M)%M;
      --cnt[z];
      pq.push({cnt[z], z});
    }
    ok = 0;
    while (!pq.empty()) {
      auto [w, u] = pq.top();
      if (cnt[u] != w) pq.pop();
      else if (w != M) break;
      else {
        ok = 1;
        break;
      }
    }
    if (ok) F[i-M+1] = 1;
  }
  if (!F[0]) return -1;
  int i = 0;
  f = 1, r = M;
  while (true) {
    z = -1;
    for (int j=i; j<=min((ll)N, r); ++j) {
      if (j == N) return f;
      if (F[j]) z = max(z, (ll)j);
    }
    if (z == -1) return -1;
    i = r+1;
    r = z+M;
    ++f;
  }
}

Compilation message

paint.cpp: In function 'int minimumInstructions(int, int, int, std::vector<int>, std::vector<int>, std::vector<std::vector<int> >)':
paint.cpp:34:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   34 |     auto [w, u] = pq.top();
      |          ^
paint.cpp:56:12: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   56 |       auto [w, u] = pq.top();
      |            ^
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2652 KB Output is correct
2 Correct 1 ms 2652 KB Output is correct
3 Correct 1 ms 2652 KB Output is correct
4 Correct 2 ms 2652 KB Output is correct
5 Correct 1 ms 2652 KB Output is correct
6 Correct 1 ms 2652 KB Output is correct
7 Correct 1 ms 2652 KB Output is correct
8 Correct 2 ms 2652 KB Output is correct
9 Correct 2 ms 2812 KB Output is correct
10 Correct 2 ms 2652 KB Output is correct
11 Correct 2 ms 2604 KB Output is correct
12 Correct 2 ms 2652 KB Output is correct
13 Correct 2 ms 2904 KB Output is correct
14 Correct 2 ms 2652 KB Output is correct
15 Correct 2 ms 2652 KB Output is correct
16 Correct 2 ms 2652 KB Output is correct
17 Correct 2 ms 2652 KB Output is correct
18 Correct 2 ms 2652 KB Output is correct
19 Correct 2 ms 2652 KB Output is correct
20 Correct 2 ms 2652 KB Output is correct
21 Correct 2 ms 2652 KB Output is correct
22 Correct 19 ms 7116 KB Output is correct
23 Correct 16 ms 7236 KB Output is correct
24 Correct 15 ms 7260 KB Output is correct
25 Correct 5 ms 3544 KB Output is correct
26 Correct 5 ms 3544 KB Output is correct
27 Correct 6 ms 3544 KB Output is correct
28 Correct 7 ms 3544 KB Output is correct
29 Correct 7 ms 3544 KB Output is correct
30 Correct 7 ms 3500 KB Output is correct
31 Correct 11 ms 4604 KB Output is correct
32 Correct 12 ms 4568 KB Output is correct
33 Correct 9 ms 4564 KB Output is correct
34 Correct 9 ms 4772 KB Output is correct
35 Correct 9 ms 4568 KB Output is correct
36 Correct 9 ms 4568 KB Output is correct
37 Correct 21 ms 8716 KB Output is correct
38 Correct 19 ms 8720 KB Output is correct
39 Correct 20 ms 8920 KB Output is correct
40 Correct 18 ms 5856 KB Output is correct
41 Correct 11 ms 4564 KB Output is correct
42 Correct 25 ms 5896 KB Output is correct
43 Correct 19 ms 5588 KB Output is correct
44 Correct 17 ms 4564 KB Output is correct
45 Correct 28 ms 5832 KB Output is correct
46 Correct 39 ms 15520 KB Output is correct
47 Correct 25 ms 9692 KB Output is correct
48 Correct 27 ms 12504 KB Output is correct
49 Correct 31 ms 13912 KB Output is correct
50 Correct 34 ms 13516 KB Output is correct
51 Correct 32 ms 11048 KB Output is correct
52 Correct 19 ms 5840 KB Output is correct
53 Correct 22 ms 5840 KB Output is correct
54 Correct 25 ms 6060 KB Output is correct
55 Correct 27 ms 5840 KB Output is correct
56 Correct 27 ms 5840 KB Output is correct
57 Correct 28 ms 5832 KB Output is correct
58 Correct 45 ms 16332 KB Output is correct
59 Correct 49 ms 16716 KB Output is correct
60 Correct 44 ms 16328 KB Output is correct
61 Correct 46 ms 16308 KB Output is correct
62 Correct 43 ms 16336 KB Output is correct
63 Correct 45 ms 16328 KB Output is correct
64 Correct 43 ms 17948 KB Output is correct
65 Correct 47 ms 18848 KB Output is correct
66 Correct 43 ms 18372 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2652 KB Output is correct
2 Correct 1 ms 2652 KB Output is correct
3 Correct 1 ms 2652 KB Output is correct
4 Correct 2 ms 2652 KB Output is correct
5 Correct 1 ms 2652 KB Output is correct
6 Correct 1 ms 2652 KB Output is correct
7 Correct 1 ms 2652 KB Output is correct
8 Correct 2 ms 2652 KB Output is correct
9 Correct 2 ms 2812 KB Output is correct
10 Correct 2 ms 2652 KB Output is correct
11 Correct 2 ms 2604 KB Output is correct
12 Correct 2 ms 2652 KB Output is correct
13 Correct 2 ms 2904 KB Output is correct
14 Correct 2 ms 2652 KB Output is correct
15 Correct 2 ms 2652 KB Output is correct
16 Correct 2 ms 2652 KB Output is correct
17 Correct 2 ms 2652 KB Output is correct
18 Correct 2 ms 2652 KB Output is correct
19 Correct 2 ms 2652 KB Output is correct
20 Correct 2 ms 2652 KB Output is correct
21 Correct 2 ms 2652 KB Output is correct
22 Correct 2 ms 2652 KB Output is correct
23 Correct 2 ms 2708 KB Output is correct
24 Correct 2 ms 2652 KB Output is correct
25 Correct 2 ms 2652 KB Output is correct
26 Correct 2 ms 2652 KB Output is correct
27 Correct 2 ms 2652 KB Output is correct
28 Correct 3 ms 3164 KB Output is correct
29 Correct 2 ms 2908 KB Output is correct
30 Correct 3 ms 2908 KB Output is correct
31 Correct 2 ms 2908 KB Output is correct
32 Correct 2 ms 2908 KB Output is correct
33 Correct 2 ms 2652 KB Output is correct
34 Correct 2 ms 2652 KB Output is correct
35 Correct 2 ms 2652 KB Output is correct
36 Correct 2 ms 2652 KB Output is correct
37 Correct 2 ms 2652 KB Output is correct
38 Correct 2 ms 2652 KB Output is correct
39 Correct 2 ms 2652 KB Output is correct
40 Correct 2 ms 2652 KB Output is correct
41 Correct 2 ms 2652 KB Output is correct
42 Correct 2 ms 2748 KB Output is correct
43 Correct 2 ms 2652 KB Output is correct
44 Correct 2 ms 2652 KB Output is correct
45 Correct 4 ms 3164 KB Output is correct
46 Correct 3 ms 3288 KB Output is correct
47 Correct 2 ms 3164 KB Output is correct
48 Correct 2 ms 3164 KB Output is correct
49 Correct 2 ms 3164 KB Output is correct
50 Correct 2 ms 2652 KB Output is correct
51 Correct 2 ms 2652 KB Output is correct
52 Correct 2 ms 2652 KB Output is correct
53 Correct 2 ms 2652 KB Output is correct
54 Correct 2 ms 2652 KB Output is correct
55 Correct 2 ms 2652 KB Output is correct
56 Correct 2 ms 2652 KB Output is correct
57 Correct 2 ms 2652 KB Output is correct
58 Correct 2 ms 2652 KB Output is correct
59 Correct 2 ms 2652 KB Output is correct
60 Correct 2 ms 2652 KB Output is correct
61 Correct 2 ms 2652 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2652 KB Output is correct
2 Correct 2 ms 2708 KB Output is correct
3 Correct 2 ms 2652 KB Output is correct
4 Correct 1 ms 2652 KB Output is correct
5 Correct 1 ms 2652 KB Output is correct
6 Correct 2 ms 2652 KB Output is correct
7 Correct 1 ms 2652 KB Output is correct
8 Correct 1 ms 2652 KB Output is correct
9 Correct 1 ms 2652 KB Output is correct
10 Correct 2 ms 2652 KB Output is correct
11 Correct 2 ms 2812 KB Output is correct
12 Correct 2 ms 2652 KB Output is correct
13 Correct 2 ms 2604 KB Output is correct
14 Correct 2 ms 2652 KB Output is correct
15 Correct 2 ms 2904 KB Output is correct
16 Correct 2 ms 2652 KB Output is correct
17 Correct 2 ms 2652 KB Output is correct
18 Correct 2 ms 2652 KB Output is correct
19 Correct 2 ms 2652 KB Output is correct
20 Correct 2 ms 2652 KB Output is correct
21 Correct 2 ms 2652 KB Output is correct
22 Correct 2 ms 2652 KB Output is correct
23 Correct 2 ms 2652 KB Output is correct
24 Correct 19 ms 7116 KB Output is correct
25 Correct 16 ms 7236 KB Output is correct
26 Correct 15 ms 7260 KB Output is correct
27 Correct 2 ms 2652 KB Output is correct
28 Correct 2 ms 2652 KB Output is correct
29 Correct 2 ms 2652 KB Output is correct
30 Correct 2 ms 2652 KB Output is correct
31 Correct 3 ms 3164 KB Output is correct
32 Correct 2 ms 2908 KB Output is correct
33 Correct 3 ms 2908 KB Output is correct
34 Correct 2 ms 2908 KB Output is correct
35 Correct 2 ms 2908 KB Output is correct
36 Correct 2 ms 2652 KB Output is correct
37 Correct 2 ms 2652 KB Output is correct
38 Correct 2 ms 2652 KB Output is correct
39 Correct 2 ms 2652 KB Output is correct
40 Correct 2 ms 2652 KB Output is correct
41 Correct 2 ms 2652 KB Output is correct
42 Correct 2 ms 2652 KB Output is correct
43 Correct 2 ms 2652 KB Output is correct
44 Correct 2 ms 2652 KB Output is correct
45 Correct 2 ms 2748 KB Output is correct
46 Correct 2 ms 2652 KB Output is correct
47 Correct 2 ms 2652 KB Output is correct
48 Correct 4 ms 3164 KB Output is correct
49 Correct 3 ms 3288 KB Output is correct
50 Correct 2 ms 3164 KB Output is correct
51 Correct 2 ms 3164 KB Output is correct
52 Correct 2 ms 3164 KB Output is correct
53 Correct 2 ms 2652 KB Output is correct
54 Correct 2 ms 2652 KB Output is correct
55 Correct 2 ms 2652 KB Output is correct
56 Correct 2 ms 2652 KB Output is correct
57 Correct 2 ms 2652 KB Output is correct
58 Correct 2 ms 2652 KB Output is correct
59 Correct 2 ms 2652 KB Output is correct
60 Correct 2 ms 2652 KB Output is correct
61 Correct 2 ms 2652 KB Output is correct
62 Correct 2 ms 2652 KB Output is correct
63 Correct 2 ms 2652 KB Output is correct
64 Correct 2 ms 2652 KB Output is correct
65 Correct 5 ms 3792 KB Output is correct
66 Correct 4 ms 3288 KB Output is correct
67 Correct 8 ms 3796 KB Output is correct
68 Correct 7 ms 3796 KB Output is correct
69 Correct 8 ms 3796 KB Output is correct
70 Correct 3 ms 3420 KB Output is correct
71 Correct 4 ms 3548 KB Output is correct
72 Correct 4 ms 3420 KB Output is correct
73 Correct 3 ms 3164 KB Output is correct
74 Correct 4 ms 3420 KB Output is correct
75 Correct 3 ms 3420 KB Output is correct
76 Correct 16 ms 6340 KB Output is correct
77 Correct 17 ms 7004 KB Output is correct
78 Correct 20 ms 7452 KB Output is correct
79 Correct 11 ms 4816 KB Output is correct
80 Correct 11 ms 4816 KB Output is correct
81 Correct 13 ms 4968 KB Output is correct
82 Correct 11 ms 4816 KB Output is correct
83 Correct 12 ms 4816 KB Output is correct
84 Correct 4 ms 3796 KB Output is correct
85 Correct 4 ms 3744 KB Output is correct
86 Correct 4 ms 4052 KB Output is correct
87 Correct 4 ms 3804 KB Output is correct
88 Correct 4 ms 3800 KB Output is correct
89 Correct 4 ms 3800 KB Output is correct
90 Correct 21 ms 7764 KB Output is correct
91 Correct 22 ms 7772 KB Output is correct
92 Correct 22 ms 7812 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2652 KB Output is correct
2 Correct 2 ms 2708 KB Output is correct
3 Correct 2 ms 2652 KB Output is correct
4 Correct 1 ms 2652 KB Output is correct
5 Correct 1 ms 2652 KB Output is correct
6 Correct 2 ms 2652 KB Output is correct
7 Correct 1 ms 2652 KB Output is correct
8 Correct 1 ms 2652 KB Output is correct
9 Correct 1 ms 2652 KB Output is correct
10 Correct 2 ms 2652 KB Output is correct
11 Correct 2 ms 2812 KB Output is correct
12 Correct 2 ms 2652 KB Output is correct
13 Correct 2 ms 2604 KB Output is correct
14 Correct 2 ms 2652 KB Output is correct
15 Correct 2 ms 2904 KB Output is correct
16 Correct 2 ms 2652 KB Output is correct
17 Correct 2 ms 2652 KB Output is correct
18 Correct 2 ms 2652 KB Output is correct
19 Correct 2 ms 2652 KB Output is correct
20 Correct 2 ms 2652 KB Output is correct
21 Correct 2 ms 2652 KB Output is correct
22 Correct 2 ms 2652 KB Output is correct
23 Correct 2 ms 2652 KB Output is correct
24 Correct 19 ms 7116 KB Output is correct
25 Correct 16 ms 7236 KB Output is correct
26 Correct 15 ms 7260 KB Output is correct
27 Correct 5 ms 3544 KB Output is correct
28 Correct 5 ms 3544 KB Output is correct
29 Correct 6 ms 3544 KB Output is correct
30 Correct 7 ms 3544 KB Output is correct
31 Correct 7 ms 3544 KB Output is correct
32 Correct 7 ms 3500 KB Output is correct
33 Correct 11 ms 4604 KB Output is correct
34 Correct 12 ms 4568 KB Output is correct
35 Correct 9 ms 4564 KB Output is correct
36 Correct 9 ms 4772 KB Output is correct
37 Correct 9 ms 4568 KB Output is correct
38 Correct 9 ms 4568 KB Output is correct
39 Correct 21 ms 8716 KB Output is correct
40 Correct 19 ms 8720 KB Output is correct
41 Correct 20 ms 8920 KB Output is correct
42 Correct 2 ms 2652 KB Output is correct
43 Correct 2 ms 2652 KB Output is correct
44 Correct 2 ms 2652 KB Output is correct
45 Correct 2 ms 2652 KB Output is correct
46 Correct 3 ms 3164 KB Output is correct
47 Correct 2 ms 2908 KB Output is correct
48 Correct 3 ms 2908 KB Output is correct
49 Correct 2 ms 2908 KB Output is correct
50 Correct 2 ms 2908 KB Output is correct
51 Correct 2 ms 2652 KB Output is correct
52 Correct 2 ms 2652 KB Output is correct
53 Correct 2 ms 2652 KB Output is correct
54 Correct 2 ms 2652 KB Output is correct
55 Correct 2 ms 2652 KB Output is correct
56 Correct 2 ms 2652 KB Output is correct
57 Correct 2 ms 2652 KB Output is correct
58 Correct 2 ms 2652 KB Output is correct
59 Correct 2 ms 2652 KB Output is correct
60 Correct 2 ms 2748 KB Output is correct
61 Correct 2 ms 2652 KB Output is correct
62 Correct 2 ms 2652 KB Output is correct
63 Correct 4 ms 3164 KB Output is correct
64 Correct 3 ms 3288 KB Output is correct
65 Correct 2 ms 3164 KB Output is correct
66 Correct 2 ms 3164 KB Output is correct
67 Correct 2 ms 3164 KB Output is correct
68 Correct 2 ms 2652 KB Output is correct
69 Correct 2 ms 2652 KB Output is correct
70 Correct 2 ms 2652 KB Output is correct
71 Correct 2 ms 2652 KB Output is correct
72 Correct 2 ms 2652 KB Output is correct
73 Correct 2 ms 2652 KB Output is correct
74 Correct 2 ms 2652 KB Output is correct
75 Correct 2 ms 2652 KB Output is correct
76 Correct 2 ms 2652 KB Output is correct
77 Correct 2 ms 2652 KB Output is correct
78 Correct 2 ms 2652 KB Output is correct
79 Correct 2 ms 2652 KB Output is correct
80 Correct 5 ms 3792 KB Output is correct
81 Correct 4 ms 3288 KB Output is correct
82 Correct 8 ms 3796 KB Output is correct
83 Correct 7 ms 3796 KB Output is correct
84 Correct 8 ms 3796 KB Output is correct
85 Correct 3 ms 3420 KB Output is correct
86 Correct 4 ms 3548 KB Output is correct
87 Correct 4 ms 3420 KB Output is correct
88 Correct 3 ms 3164 KB Output is correct
89 Correct 4 ms 3420 KB Output is correct
90 Correct 3 ms 3420 KB Output is correct
91 Correct 16 ms 6340 KB Output is correct
92 Correct 17 ms 7004 KB Output is correct
93 Correct 20 ms 7452 KB Output is correct
94 Correct 11 ms 4816 KB Output is correct
95 Correct 11 ms 4816 KB Output is correct
96 Correct 13 ms 4968 KB Output is correct
97 Correct 11 ms 4816 KB Output is correct
98 Correct 12 ms 4816 KB Output is correct
99 Correct 4 ms 3796 KB Output is correct
100 Correct 4 ms 3744 KB Output is correct
101 Correct 4 ms 4052 KB Output is correct
102 Correct 4 ms 3804 KB Output is correct
103 Correct 4 ms 3800 KB Output is correct
104 Correct 4 ms 3800 KB Output is correct
105 Correct 21 ms 7764 KB Output is correct
106 Correct 22 ms 7772 KB Output is correct
107 Correct 22 ms 7812 KB Output is correct
108 Correct 8 ms 4052 KB Output is correct
109 Correct 1349 ms 266212 KB Output is correct
110 Correct 375 ms 266636 KB Output is correct
111 Correct 236 ms 134816 KB Output is correct
112 Correct 266 ms 135068 KB Output is correct
113 Correct 174 ms 135068 KB Output is correct
114 Correct 15 ms 6924 KB Output is correct
115 Correct 16 ms 6864 KB Output is correct
116 Correct 19 ms 7120 KB Output is correct
117 Correct 14 ms 6864 KB Output is correct
118 Correct 17 ms 7120 KB Output is correct
119 Correct 14 ms 6608 KB Output is correct
120 Correct 17 ms 6556 KB Output is correct
121 Correct 7 ms 4816 KB Output is correct
122 Correct 20 ms 7644 KB Output is correct
123 Correct 7 ms 4564 KB Output is correct
124 Correct 24 ms 8036 KB Output is correct
125 Correct 11 ms 4820 KB Output is correct
126 Correct 10 ms 4316 KB Output is correct
127 Correct 11 ms 4568 KB Output is correct
128 Correct 9 ms 4236 KB Output is correct
129 Correct 9 ms 4320 KB Output is correct
130 Correct 8 ms 4052 KB Output is correct
131 Execution timed out 1580 ms 267272 KB Time limit exceeded
132 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2652 KB Output is correct
2 Correct 2 ms 2708 KB Output is correct
3 Correct 2 ms 2652 KB Output is correct
4 Correct 1 ms 2652 KB Output is correct
5 Correct 1 ms 2652 KB Output is correct
6 Correct 2 ms 2652 KB Output is correct
7 Correct 1 ms 2652 KB Output is correct
8 Correct 1 ms 2652 KB Output is correct
9 Correct 1 ms 2652 KB Output is correct
10 Correct 2 ms 2652 KB Output is correct
11 Correct 2 ms 2812 KB Output is correct
12 Correct 2 ms 2652 KB Output is correct
13 Correct 2 ms 2604 KB Output is correct
14 Correct 2 ms 2652 KB Output is correct
15 Correct 2 ms 2904 KB Output is correct
16 Correct 2 ms 2652 KB Output is correct
17 Correct 2 ms 2652 KB Output is correct
18 Correct 2 ms 2652 KB Output is correct
19 Correct 2 ms 2652 KB Output is correct
20 Correct 2 ms 2652 KB Output is correct
21 Correct 2 ms 2652 KB Output is correct
22 Correct 2 ms 2652 KB Output is correct
23 Correct 2 ms 2652 KB Output is correct
24 Correct 19 ms 7116 KB Output is correct
25 Correct 16 ms 7236 KB Output is correct
26 Correct 15 ms 7260 KB Output is correct
27 Correct 5 ms 3544 KB Output is correct
28 Correct 5 ms 3544 KB Output is correct
29 Correct 6 ms 3544 KB Output is correct
30 Correct 7 ms 3544 KB Output is correct
31 Correct 7 ms 3544 KB Output is correct
32 Correct 7 ms 3500 KB Output is correct
33 Correct 11 ms 4604 KB Output is correct
34 Correct 12 ms 4568 KB Output is correct
35 Correct 9 ms 4564 KB Output is correct
36 Correct 9 ms 4772 KB Output is correct
37 Correct 9 ms 4568 KB Output is correct
38 Correct 9 ms 4568 KB Output is correct
39 Correct 21 ms 8716 KB Output is correct
40 Correct 19 ms 8720 KB Output is correct
41 Correct 20 ms 8920 KB Output is correct
42 Correct 18 ms 5856 KB Output is correct
43 Correct 11 ms 4564 KB Output is correct
44 Correct 25 ms 5896 KB Output is correct
45 Correct 19 ms 5588 KB Output is correct
46 Correct 17 ms 4564 KB Output is correct
47 Correct 28 ms 5832 KB Output is correct
48 Correct 39 ms 15520 KB Output is correct
49 Correct 25 ms 9692 KB Output is correct
50 Correct 27 ms 12504 KB Output is correct
51 Correct 31 ms 13912 KB Output is correct
52 Correct 34 ms 13516 KB Output is correct
53 Correct 32 ms 11048 KB Output is correct
54 Correct 19 ms 5840 KB Output is correct
55 Correct 22 ms 5840 KB Output is correct
56 Correct 25 ms 6060 KB Output is correct
57 Correct 27 ms 5840 KB Output is correct
58 Correct 27 ms 5840 KB Output is correct
59 Correct 28 ms 5832 KB Output is correct
60 Correct 45 ms 16332 KB Output is correct
61 Correct 49 ms 16716 KB Output is correct
62 Correct 44 ms 16328 KB Output is correct
63 Correct 46 ms 16308 KB Output is correct
64 Correct 43 ms 16336 KB Output is correct
65 Correct 45 ms 16328 KB Output is correct
66 Correct 43 ms 17948 KB Output is correct
67 Correct 47 ms 18848 KB Output is correct
68 Correct 43 ms 18372 KB Output is correct
69 Correct 2 ms 2652 KB Output is correct
70 Correct 2 ms 2652 KB Output is correct
71 Correct 2 ms 2652 KB Output is correct
72 Correct 2 ms 2652 KB Output is correct
73 Correct 3 ms 3164 KB Output is correct
74 Correct 2 ms 2908 KB Output is correct
75 Correct 3 ms 2908 KB Output is correct
76 Correct 2 ms 2908 KB Output is correct
77 Correct 2 ms 2908 KB Output is correct
78 Correct 2 ms 2652 KB Output is correct
79 Correct 2 ms 2652 KB Output is correct
80 Correct 2 ms 2652 KB Output is correct
81 Correct 2 ms 2652 KB Output is correct
82 Correct 2 ms 2652 KB Output is correct
83 Correct 2 ms 2652 KB Output is correct
84 Correct 2 ms 2652 KB Output is correct
85 Correct 2 ms 2652 KB Output is correct
86 Correct 2 ms 2652 KB Output is correct
87 Correct 2 ms 2748 KB Output is correct
88 Correct 2 ms 2652 KB Output is correct
89 Correct 2 ms 2652 KB Output is correct
90 Correct 4 ms 3164 KB Output is correct
91 Correct 3 ms 3288 KB Output is correct
92 Correct 2 ms 3164 KB Output is correct
93 Correct 2 ms 3164 KB Output is correct
94 Correct 2 ms 3164 KB Output is correct
95 Correct 2 ms 2652 KB Output is correct
96 Correct 2 ms 2652 KB Output is correct
97 Correct 2 ms 2652 KB Output is correct
98 Correct 2 ms 2652 KB Output is correct
99 Correct 2 ms 2652 KB Output is correct
100 Correct 2 ms 2652 KB Output is correct
101 Correct 2 ms 2652 KB Output is correct
102 Correct 2 ms 2652 KB Output is correct
103 Correct 2 ms 2652 KB Output is correct
104 Correct 2 ms 2652 KB Output is correct
105 Correct 2 ms 2652 KB Output is correct
106 Correct 2 ms 2652 KB Output is correct
107 Correct 5 ms 3792 KB Output is correct
108 Correct 4 ms 3288 KB Output is correct
109 Correct 8 ms 3796 KB Output is correct
110 Correct 7 ms 3796 KB Output is correct
111 Correct 8 ms 3796 KB Output is correct
112 Correct 3 ms 3420 KB Output is correct
113 Correct 4 ms 3548 KB Output is correct
114 Correct 4 ms 3420 KB Output is correct
115 Correct 3 ms 3164 KB Output is correct
116 Correct 4 ms 3420 KB Output is correct
117 Correct 3 ms 3420 KB Output is correct
118 Correct 16 ms 6340 KB Output is correct
119 Correct 17 ms 7004 KB Output is correct
120 Correct 20 ms 7452 KB Output is correct
121 Correct 11 ms 4816 KB Output is correct
122 Correct 11 ms 4816 KB Output is correct
123 Correct 13 ms 4968 KB Output is correct
124 Correct 11 ms 4816 KB Output is correct
125 Correct 12 ms 4816 KB Output is correct
126 Correct 4 ms 3796 KB Output is correct
127 Correct 4 ms 3744 KB Output is correct
128 Correct 4 ms 4052 KB Output is correct
129 Correct 4 ms 3804 KB Output is correct
130 Correct 4 ms 3800 KB Output is correct
131 Correct 4 ms 3800 KB Output is correct
132 Correct 21 ms 7764 KB Output is correct
133 Correct 22 ms 7772 KB Output is correct
134 Correct 22 ms 7812 KB Output is correct
135 Correct 8 ms 4052 KB Output is correct
136 Correct 1349 ms 266212 KB Output is correct
137 Correct 375 ms 266636 KB Output is correct
138 Correct 236 ms 134816 KB Output is correct
139 Correct 266 ms 135068 KB Output is correct
140 Correct 174 ms 135068 KB Output is correct
141 Correct 15 ms 6924 KB Output is correct
142 Correct 16 ms 6864 KB Output is correct
143 Correct 19 ms 7120 KB Output is correct
144 Correct 14 ms 6864 KB Output is correct
145 Correct 17 ms 7120 KB Output is correct
146 Correct 14 ms 6608 KB Output is correct
147 Correct 17 ms 6556 KB Output is correct
148 Correct 7 ms 4816 KB Output is correct
149 Correct 20 ms 7644 KB Output is correct
150 Correct 7 ms 4564 KB Output is correct
151 Correct 24 ms 8036 KB Output is correct
152 Correct 11 ms 4820 KB Output is correct
153 Correct 10 ms 4316 KB Output is correct
154 Correct 11 ms 4568 KB Output is correct
155 Correct 9 ms 4236 KB Output is correct
156 Correct 9 ms 4320 KB Output is correct
157 Correct 8 ms 4052 KB Output is correct
158 Execution timed out 1580 ms 267272 KB Time limit exceeded
159 Halted 0 ms 0 KB -