답안 #256829

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
256829 2020-08-03T09:06:37 Z Bruteforceman Arcade (NOI20_arcade) C++11
85 / 100
1000 ms 40496 KB
#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 10;
int dp[maxn];
int a[maxn], t[maxn];
map <int, int> cmp;
int bit[maxn];
int n, m;
 
struct node {
  int idx;
  int x, y;
  node (int idx, int x, int y) : idx(idx), x(x), y(y) {}
  node () {}
  bool operator < (node p) const {
    return x < p.x;
  }
};
vector <node> v[maxn];
 
void update(int x, int val) {
  for(int i = x; i <= m; i += i & (-i)) {
    bit[i] = max(bit[i], val);  
  }
}
void remove(int x) {
  for(int i = x; i <= m; i += i & (-i)) {
    bit[i] = 0;
  }
}
int query(int x) {
  int ans = 0;
  for(int i = x; i > 0; i -= i & (-i)) {
    ans = max(ans, bit[i]);
  }
  return ans;
}
 
void solve(int l, int r) {
  if(l == r) {
    for(auto i : v[l]) dp[i.idx] = max(dp[i.idx], 1);
    return ;
  }
  int mid = (l + r) >> 1;
  solve(l, mid);
  vector <node> left, right;
  for(int i = l; i <= mid; i++) {
    for(auto j : v[i]) left.push_back(j);
  }
  for(int i = mid + 1; i <= r; i++) {
    for(auto j : v[i]) right.push_back(j);
  }
  sort(left.begin(), left.end());
  sort(right.begin(), right.end());
  int pt = 0;
  for(auto i : right) {
    while(pt < left.size() && left[pt].x < i.x) {
      update(left[pt].y, dp[left[pt].idx]);
      ++pt;
    }
    dp[i.idx] = max(dp[i.idx], 1 + query(i.y - 1));
  }
  for(auto i : left) remove(i.y);
  left.clear();
  right.clear();
  solve(mid + 1, r);
}
int main() {
  scanf("%d %d", &n, &m);
  for(int i = 0; i < m; i++) {
    scanf("%d", &t[i]);
  }
  map <int, int> cmp, cmpY;
  for(int i = 0; i < m; i++) {
    scanf("%d", &a[i]);
    cmp[a[i]];
    cmpY[a[i] - t[i]];
  }
  int idx = 0;
  for(auto &i : cmp) {
    i.second = ++idx;
  }
  int idY = 0;
  for(auto &i : cmpY) {
    i.second = ++idY;
  }
  for(int i = 0; i < m; i++) {
    v[cmp[a[i]]].emplace_back(i, a[i] + t[i], cmpY[a[i] - t[i]]);
  }
  solve(1, m);
  printf("%d\n", *max_element(dp, dp + m));
  return 0;
}

Compilation message

Arcade.cpp: In function 'void solve(int, int)':
Arcade.cpp:57:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     while(pt < left.size() && left[pt].x < i.x) {
           ~~~^~~~~~~~~~~~~
Arcade.cpp: In function 'int main()':
Arcade.cpp:69:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d %d", &n, &m);
   ~~~~~^~~~~~~~~~~~~~~~~
Arcade.cpp:71:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &t[i]);
     ~~~~~^~~~~~~~~~~~~
Arcade.cpp:75:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &a[i]);
     ~~~~~^~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 12032 KB Output is correct
2 Correct 7 ms 12032 KB Output is correct
3 Correct 7 ms 12032 KB Output is correct
4 Correct 8 ms 12032 KB Output is correct
5 Correct 9 ms 12032 KB Output is correct
6 Correct 7 ms 12032 KB Output is correct
7 Correct 8 ms 12032 KB Output is correct
8 Correct 7 ms 12032 KB Output is correct
9 Correct 7 ms 12032 KB Output is correct
10 Correct 8 ms 12032 KB Output is correct
11 Correct 8 ms 12032 KB Output is correct
12 Correct 7 ms 12032 KB Output is correct
13 Correct 7 ms 12032 KB Output is correct
14 Correct 10 ms 12032 KB Output is correct
15 Correct 7 ms 12032 KB Output is correct
16 Correct 7 ms 12032 KB Output is correct
17 Correct 8 ms 12032 KB Output is correct
18 Correct 6 ms 12032 KB Output is correct
19 Correct 7 ms 12032 KB Output is correct
20 Correct 7 ms 12032 KB Output is correct
21 Correct 7 ms 12032 KB Output is correct
22 Correct 7 ms 12032 KB Output is correct
23 Correct 8 ms 12032 KB Output is correct
24 Correct 8 ms 12032 KB Output is correct
25 Correct 7 ms 12032 KB Output is correct
26 Correct 7 ms 12032 KB Output is correct
27 Correct 7 ms 12032 KB Output is correct
28 Correct 7 ms 12032 KB Output is correct
29 Correct 7 ms 12032 KB Output is correct
30 Correct 7 ms 12032 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 12032 KB Output is correct
2 Correct 7 ms 12032 KB Output is correct
3 Correct 7 ms 12032 KB Output is correct
4 Correct 8 ms 12032 KB Output is correct
5 Correct 9 ms 12032 KB Output is correct
6 Correct 7 ms 12032 KB Output is correct
7 Correct 8 ms 12032 KB Output is correct
8 Correct 7 ms 12032 KB Output is correct
9 Correct 7 ms 12032 KB Output is correct
10 Correct 8 ms 12032 KB Output is correct
11 Correct 8 ms 12032 KB Output is correct
12 Correct 7 ms 12032 KB Output is correct
13 Correct 7 ms 12032 KB Output is correct
14 Correct 10 ms 12032 KB Output is correct
15 Correct 7 ms 12032 KB Output is correct
16 Correct 7 ms 12032 KB Output is correct
17 Correct 8 ms 12032 KB Output is correct
18 Correct 6 ms 12032 KB Output is correct
19 Correct 7 ms 12032 KB Output is correct
20 Correct 7 ms 12032 KB Output is correct
21 Correct 7 ms 12032 KB Output is correct
22 Correct 7 ms 12032 KB Output is correct
23 Correct 8 ms 12032 KB Output is correct
24 Correct 8 ms 12032 KB Output is correct
25 Correct 7 ms 12032 KB Output is correct
26 Correct 7 ms 12032 KB Output is correct
27 Correct 7 ms 12032 KB Output is correct
28 Correct 7 ms 12032 KB Output is correct
29 Correct 7 ms 12032 KB Output is correct
30 Correct 7 ms 12032 KB Output is correct
31 Correct 9 ms 12032 KB Output is correct
32 Correct 7 ms 12032 KB Output is correct
33 Correct 10 ms 12032 KB Output is correct
34 Correct 8 ms 12032 KB Output is correct
35 Correct 8 ms 12032 KB Output is correct
36 Correct 8 ms 12032 KB Output is correct
37 Correct 7 ms 12032 KB Output is correct
38 Correct 10 ms 12032 KB Output is correct
39 Correct 10 ms 12032 KB Output is correct
40 Correct 7 ms 12032 KB Output is correct
41 Correct 9 ms 12032 KB Output is correct
42 Correct 9 ms 12032 KB Output is correct
43 Correct 8 ms 12032 KB Output is correct
44 Correct 9 ms 12032 KB Output is correct
45 Correct 9 ms 12032 KB Output is correct
46 Correct 8 ms 12032 KB Output is correct
47 Correct 9 ms 12032 KB Output is correct
48 Correct 8 ms 12032 KB Output is correct
49 Correct 7 ms 12032 KB Output is correct
50 Correct 7 ms 12032 KB Output is correct
51 Correct 7 ms 12032 KB Output is correct
52 Correct 7 ms 12032 KB Output is correct
53 Correct 7 ms 12032 KB Output is correct
54 Correct 7 ms 12032 KB Output is correct
55 Correct 6 ms 12032 KB Output is correct
56 Correct 8 ms 12032 KB Output is correct
57 Correct 7 ms 12032 KB Output is correct
58 Correct 7 ms 12032 KB Output is correct
59 Correct 9 ms 12032 KB Output is correct
60 Correct 7 ms 12032 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 12032 KB Output is correct
2 Correct 7 ms 12032 KB Output is correct
3 Correct 7 ms 12032 KB Output is correct
4 Correct 8 ms 12032 KB Output is correct
5 Correct 9 ms 12032 KB Output is correct
6 Correct 7 ms 12032 KB Output is correct
7 Correct 8 ms 12032 KB Output is correct
8 Correct 7 ms 12032 KB Output is correct
9 Correct 7 ms 12032 KB Output is correct
10 Correct 8 ms 12032 KB Output is correct
11 Correct 8 ms 12032 KB Output is correct
12 Correct 7 ms 12032 KB Output is correct
13 Correct 7 ms 12032 KB Output is correct
14 Correct 10 ms 12032 KB Output is correct
15 Correct 7 ms 12032 KB Output is correct
16 Correct 7 ms 12032 KB Output is correct
17 Correct 8 ms 12032 KB Output is correct
18 Correct 6 ms 12032 KB Output is correct
19 Correct 7 ms 12032 KB Output is correct
20 Correct 7 ms 12032 KB Output is correct
21 Correct 7 ms 12032 KB Output is correct
22 Correct 7 ms 12032 KB Output is correct
23 Correct 8 ms 12032 KB Output is correct
24 Correct 8 ms 12032 KB Output is correct
25 Correct 7 ms 12032 KB Output is correct
26 Correct 7 ms 12032 KB Output is correct
27 Correct 7 ms 12032 KB Output is correct
28 Correct 7 ms 12032 KB Output is correct
29 Correct 7 ms 12032 KB Output is correct
30 Correct 7 ms 12032 KB Output is correct
31 Correct 9 ms 12032 KB Output is correct
32 Correct 7 ms 12032 KB Output is correct
33 Correct 10 ms 12032 KB Output is correct
34 Correct 8 ms 12032 KB Output is correct
35 Correct 8 ms 12032 KB Output is correct
36 Correct 8 ms 12032 KB Output is correct
37 Correct 7 ms 12032 KB Output is correct
38 Correct 10 ms 12032 KB Output is correct
39 Correct 10 ms 12032 KB Output is correct
40 Correct 7 ms 12032 KB Output is correct
41 Correct 9 ms 12032 KB Output is correct
42 Correct 9 ms 12032 KB Output is correct
43 Correct 8 ms 12032 KB Output is correct
44 Correct 9 ms 12032 KB Output is correct
45 Correct 9 ms 12032 KB Output is correct
46 Correct 8 ms 12032 KB Output is correct
47 Correct 9 ms 12032 KB Output is correct
48 Correct 8 ms 12032 KB Output is correct
49 Correct 7 ms 12032 KB Output is correct
50 Correct 7 ms 12032 KB Output is correct
51 Correct 7 ms 12032 KB Output is correct
52 Correct 7 ms 12032 KB Output is correct
53 Correct 7 ms 12032 KB Output is correct
54 Correct 7 ms 12032 KB Output is correct
55 Correct 6 ms 12032 KB Output is correct
56 Correct 8 ms 12032 KB Output is correct
57 Correct 7 ms 12032 KB Output is correct
58 Correct 7 ms 12032 KB Output is correct
59 Correct 9 ms 12032 KB Output is correct
60 Correct 7 ms 12032 KB Output is correct
61 Correct 7 ms 12032 KB Output is correct
62 Correct 7 ms 12032 KB Output is correct
63 Correct 10 ms 12032 KB Output is correct
64 Correct 7 ms 12160 KB Output is correct
65 Correct 8 ms 12032 KB Output is correct
66 Correct 9 ms 12032 KB Output is correct
67 Correct 7 ms 12032 KB Output is correct
68 Correct 7 ms 12032 KB Output is correct
69 Correct 8 ms 12032 KB Output is correct
70 Correct 7 ms 12032 KB Output is correct
71 Correct 8 ms 12032 KB Output is correct
72 Correct 7 ms 12032 KB Output is correct
73 Correct 7 ms 12032 KB Output is correct
74 Correct 8 ms 12032 KB Output is correct
75 Correct 7 ms 12032 KB Output is correct
76 Correct 7 ms 12032 KB Output is correct
77 Correct 7 ms 12032 KB Output is correct
78 Correct 7 ms 12032 KB Output is correct
79 Correct 7 ms 12032 KB Output is correct
80 Correct 7 ms 12032 KB Output is correct
81 Correct 9 ms 12032 KB Output is correct
82 Correct 8 ms 12032 KB Output is correct
83 Correct 7 ms 12032 KB Output is correct
84 Correct 7 ms 12032 KB Output is correct
85 Correct 7 ms 12032 KB Output is correct
86 Correct 8 ms 12032 KB Output is correct
87 Correct 7 ms 12032 KB Output is correct
88 Correct 7 ms 12032 KB Output is correct
89 Correct 7 ms 12032 KB Output is correct
90 Correct 8 ms 12032 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 12032 KB Output is correct
2 Correct 7 ms 12032 KB Output is correct
3 Correct 7 ms 12032 KB Output is correct
4 Correct 8 ms 12032 KB Output is correct
5 Correct 9 ms 12032 KB Output is correct
6 Correct 7 ms 12032 KB Output is correct
7 Correct 8 ms 12032 KB Output is correct
8 Correct 7 ms 12032 KB Output is correct
9 Correct 7 ms 12032 KB Output is correct
10 Correct 8 ms 12032 KB Output is correct
11 Correct 8 ms 12032 KB Output is correct
12 Correct 7 ms 12032 KB Output is correct
13 Correct 7 ms 12032 KB Output is correct
14 Correct 10 ms 12032 KB Output is correct
15 Correct 7 ms 12032 KB Output is correct
16 Correct 7 ms 12032 KB Output is correct
17 Correct 8 ms 12032 KB Output is correct
18 Correct 6 ms 12032 KB Output is correct
19 Correct 7 ms 12032 KB Output is correct
20 Correct 7 ms 12032 KB Output is correct
21 Correct 7 ms 12032 KB Output is correct
22 Correct 7 ms 12032 KB Output is correct
23 Correct 8 ms 12032 KB Output is correct
24 Correct 8 ms 12032 KB Output is correct
25 Correct 7 ms 12032 KB Output is correct
26 Correct 7 ms 12032 KB Output is correct
27 Correct 7 ms 12032 KB Output is correct
28 Correct 7 ms 12032 KB Output is correct
29 Correct 7 ms 12032 KB Output is correct
30 Correct 7 ms 12032 KB Output is correct
31 Correct 9 ms 12032 KB Output is correct
32 Correct 7 ms 12032 KB Output is correct
33 Correct 10 ms 12032 KB Output is correct
34 Correct 8 ms 12032 KB Output is correct
35 Correct 8 ms 12032 KB Output is correct
36 Correct 8 ms 12032 KB Output is correct
37 Correct 7 ms 12032 KB Output is correct
38 Correct 10 ms 12032 KB Output is correct
39 Correct 10 ms 12032 KB Output is correct
40 Correct 7 ms 12032 KB Output is correct
41 Correct 9 ms 12032 KB Output is correct
42 Correct 9 ms 12032 KB Output is correct
43 Correct 8 ms 12032 KB Output is correct
44 Correct 9 ms 12032 KB Output is correct
45 Correct 9 ms 12032 KB Output is correct
46 Correct 8 ms 12032 KB Output is correct
47 Correct 9 ms 12032 KB Output is correct
48 Correct 8 ms 12032 KB Output is correct
49 Correct 7 ms 12032 KB Output is correct
50 Correct 7 ms 12032 KB Output is correct
51 Correct 7 ms 12032 KB Output is correct
52 Correct 7 ms 12032 KB Output is correct
53 Correct 7 ms 12032 KB Output is correct
54 Correct 7 ms 12032 KB Output is correct
55 Correct 6 ms 12032 KB Output is correct
56 Correct 8 ms 12032 KB Output is correct
57 Correct 7 ms 12032 KB Output is correct
58 Correct 7 ms 12032 KB Output is correct
59 Correct 9 ms 12032 KB Output is correct
60 Correct 7 ms 12032 KB Output is correct
61 Correct 7 ms 12032 KB Output is correct
62 Correct 7 ms 12032 KB Output is correct
63 Correct 10 ms 12032 KB Output is correct
64 Correct 7 ms 12160 KB Output is correct
65 Correct 8 ms 12032 KB Output is correct
66 Correct 9 ms 12032 KB Output is correct
67 Correct 7 ms 12032 KB Output is correct
68 Correct 7 ms 12032 KB Output is correct
69 Correct 8 ms 12032 KB Output is correct
70 Correct 7 ms 12032 KB Output is correct
71 Correct 8 ms 12032 KB Output is correct
72 Correct 7 ms 12032 KB Output is correct
73 Correct 7 ms 12032 KB Output is correct
74 Correct 8 ms 12032 KB Output is correct
75 Correct 7 ms 12032 KB Output is correct
76 Correct 7 ms 12032 KB Output is correct
77 Correct 7 ms 12032 KB Output is correct
78 Correct 7 ms 12032 KB Output is correct
79 Correct 7 ms 12032 KB Output is correct
80 Correct 7 ms 12032 KB Output is correct
81 Correct 9 ms 12032 KB Output is correct
82 Correct 8 ms 12032 KB Output is correct
83 Correct 7 ms 12032 KB Output is correct
84 Correct 7 ms 12032 KB Output is correct
85 Correct 7 ms 12032 KB Output is correct
86 Correct 8 ms 12032 KB Output is correct
87 Correct 7 ms 12032 KB Output is correct
88 Correct 7 ms 12032 KB Output is correct
89 Correct 7 ms 12032 KB Output is correct
90 Correct 8 ms 12032 KB Output is correct
91 Correct 7 ms 12160 KB Output is correct
92 Correct 8 ms 12160 KB Output is correct
93 Correct 8 ms 12180 KB Output is correct
94 Correct 8 ms 12160 KB Output is correct
95 Correct 8 ms 12160 KB Output is correct
96 Correct 8 ms 12160 KB Output is correct
97 Correct 8 ms 12160 KB Output is correct
98 Correct 9 ms 12160 KB Output is correct
99 Correct 12 ms 12048 KB Output is correct
100 Correct 9 ms 12160 KB Output is correct
101 Correct 8 ms 12160 KB Output is correct
102 Correct 10 ms 12160 KB Output is correct
103 Correct 8 ms 12032 KB Output is correct
104 Correct 11 ms 12160 KB Output is correct
105 Correct 11 ms 12160 KB Output is correct
106 Correct 9 ms 12160 KB Output is correct
107 Correct 9 ms 12160 KB Output is correct
108 Correct 10 ms 12160 KB Output is correct
109 Correct 10 ms 12160 KB Output is correct
110 Correct 9 ms 12160 KB Output is correct
111 Correct 10 ms 12160 KB Output is correct
112 Correct 10 ms 12160 KB Output is correct
113 Correct 10 ms 12068 KB Output is correct
114 Correct 8 ms 12160 KB Output is correct
115 Correct 9 ms 12160 KB Output is correct
116 Correct 10 ms 12160 KB Output is correct
117 Correct 9 ms 12160 KB Output is correct
118 Correct 10 ms 12160 KB Output is correct
119 Correct 10 ms 12160 KB Output is correct
120 Correct 10 ms 12160 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 12032 KB Output is correct
2 Correct 7 ms 12032 KB Output is correct
3 Correct 7 ms 12032 KB Output is correct
4 Correct 8 ms 12032 KB Output is correct
5 Correct 9 ms 12032 KB Output is correct
6 Correct 7 ms 12032 KB Output is correct
7 Correct 8 ms 12032 KB Output is correct
8 Correct 7 ms 12032 KB Output is correct
9 Correct 7 ms 12032 KB Output is correct
10 Correct 8 ms 12032 KB Output is correct
11 Correct 8 ms 12032 KB Output is correct
12 Correct 7 ms 12032 KB Output is correct
13 Correct 7 ms 12032 KB Output is correct
14 Correct 10 ms 12032 KB Output is correct
15 Correct 7 ms 12032 KB Output is correct
16 Correct 7 ms 12032 KB Output is correct
17 Correct 8 ms 12032 KB Output is correct
18 Correct 6 ms 12032 KB Output is correct
19 Correct 7 ms 12032 KB Output is correct
20 Correct 7 ms 12032 KB Output is correct
21 Correct 7 ms 12032 KB Output is correct
22 Correct 7 ms 12032 KB Output is correct
23 Correct 8 ms 12032 KB Output is correct
24 Correct 8 ms 12032 KB Output is correct
25 Correct 7 ms 12032 KB Output is correct
26 Correct 7 ms 12032 KB Output is correct
27 Correct 7 ms 12032 KB Output is correct
28 Correct 7 ms 12032 KB Output is correct
29 Correct 7 ms 12032 KB Output is correct
30 Correct 7 ms 12032 KB Output is correct
31 Correct 9 ms 12032 KB Output is correct
32 Correct 7 ms 12032 KB Output is correct
33 Correct 10 ms 12032 KB Output is correct
34 Correct 8 ms 12032 KB Output is correct
35 Correct 8 ms 12032 KB Output is correct
36 Correct 8 ms 12032 KB Output is correct
37 Correct 7 ms 12032 KB Output is correct
38 Correct 10 ms 12032 KB Output is correct
39 Correct 10 ms 12032 KB Output is correct
40 Correct 7 ms 12032 KB Output is correct
41 Correct 9 ms 12032 KB Output is correct
42 Correct 9 ms 12032 KB Output is correct
43 Correct 8 ms 12032 KB Output is correct
44 Correct 9 ms 12032 KB Output is correct
45 Correct 9 ms 12032 KB Output is correct
46 Correct 8 ms 12032 KB Output is correct
47 Correct 9 ms 12032 KB Output is correct
48 Correct 8 ms 12032 KB Output is correct
49 Correct 7 ms 12032 KB Output is correct
50 Correct 7 ms 12032 KB Output is correct
51 Correct 7 ms 12032 KB Output is correct
52 Correct 7 ms 12032 KB Output is correct
53 Correct 7 ms 12032 KB Output is correct
54 Correct 7 ms 12032 KB Output is correct
55 Correct 6 ms 12032 KB Output is correct
56 Correct 8 ms 12032 KB Output is correct
57 Correct 7 ms 12032 KB Output is correct
58 Correct 7 ms 12032 KB Output is correct
59 Correct 9 ms 12032 KB Output is correct
60 Correct 7 ms 12032 KB Output is correct
61 Correct 7 ms 12032 KB Output is correct
62 Correct 7 ms 12032 KB Output is correct
63 Correct 10 ms 12032 KB Output is correct
64 Correct 7 ms 12160 KB Output is correct
65 Correct 8 ms 12032 KB Output is correct
66 Correct 9 ms 12032 KB Output is correct
67 Correct 7 ms 12032 KB Output is correct
68 Correct 7 ms 12032 KB Output is correct
69 Correct 8 ms 12032 KB Output is correct
70 Correct 7 ms 12032 KB Output is correct
71 Correct 8 ms 12032 KB Output is correct
72 Correct 7 ms 12032 KB Output is correct
73 Correct 7 ms 12032 KB Output is correct
74 Correct 8 ms 12032 KB Output is correct
75 Correct 7 ms 12032 KB Output is correct
76 Correct 7 ms 12032 KB Output is correct
77 Correct 7 ms 12032 KB Output is correct
78 Correct 7 ms 12032 KB Output is correct
79 Correct 7 ms 12032 KB Output is correct
80 Correct 7 ms 12032 KB Output is correct
81 Correct 9 ms 12032 KB Output is correct
82 Correct 8 ms 12032 KB Output is correct
83 Correct 7 ms 12032 KB Output is correct
84 Correct 7 ms 12032 KB Output is correct
85 Correct 7 ms 12032 KB Output is correct
86 Correct 8 ms 12032 KB Output is correct
87 Correct 7 ms 12032 KB Output is correct
88 Correct 7 ms 12032 KB Output is correct
89 Correct 7 ms 12032 KB Output is correct
90 Correct 8 ms 12032 KB Output is correct
91 Correct 7 ms 12160 KB Output is correct
92 Correct 8 ms 12160 KB Output is correct
93 Correct 8 ms 12180 KB Output is correct
94 Correct 8 ms 12160 KB Output is correct
95 Correct 8 ms 12160 KB Output is correct
96 Correct 8 ms 12160 KB Output is correct
97 Correct 8 ms 12160 KB Output is correct
98 Correct 9 ms 12160 KB Output is correct
99 Correct 12 ms 12048 KB Output is correct
100 Correct 9 ms 12160 KB Output is correct
101 Correct 8 ms 12160 KB Output is correct
102 Correct 10 ms 12160 KB Output is correct
103 Correct 8 ms 12032 KB Output is correct
104 Correct 11 ms 12160 KB Output is correct
105 Correct 11 ms 12160 KB Output is correct
106 Correct 9 ms 12160 KB Output is correct
107 Correct 9 ms 12160 KB Output is correct
108 Correct 10 ms 12160 KB Output is correct
109 Correct 10 ms 12160 KB Output is correct
110 Correct 9 ms 12160 KB Output is correct
111 Correct 10 ms 12160 KB Output is correct
112 Correct 10 ms 12160 KB Output is correct
113 Correct 10 ms 12068 KB Output is correct
114 Correct 8 ms 12160 KB Output is correct
115 Correct 9 ms 12160 KB Output is correct
116 Correct 10 ms 12160 KB Output is correct
117 Correct 9 ms 12160 KB Output is correct
118 Correct 10 ms 12160 KB Output is correct
119 Correct 10 ms 12160 KB Output is correct
120 Correct 10 ms 12160 KB Output is correct
121 Correct 49 ms 14196 KB Output is correct
122 Correct 52 ms 14200 KB Output is correct
123 Correct 44 ms 14096 KB Output is correct
124 Correct 56 ms 14196 KB Output is correct
125 Correct 50 ms 14196 KB Output is correct
126 Correct 49 ms 14196 KB Output is correct
127 Correct 48 ms 14200 KB Output is correct
128 Correct 33 ms 13648 KB Output is correct
129 Correct 29 ms 13056 KB Output is correct
130 Correct 7 ms 12032 KB Output is correct
131 Correct 35 ms 13748 KB Output is correct
132 Correct 50 ms 14096 KB Output is correct
133 Correct 12 ms 12288 KB Output is correct
134 Correct 48 ms 14024 KB Output is correct
135 Correct 11 ms 12288 KB Output is correct
136 Correct 37 ms 14268 KB Output is correct
137 Correct 43 ms 14392 KB Output is correct
138 Correct 47 ms 14392 KB Output is correct
139 Correct 41 ms 14392 KB Output is correct
140 Correct 43 ms 14268 KB Output is correct
141 Correct 39 ms 14392 KB Output is correct
142 Correct 43 ms 14392 KB Output is correct
143 Correct 48 ms 14200 KB Output is correct
144 Correct 38 ms 14392 KB Output is correct
145 Correct 46 ms 14120 KB Output is correct
146 Correct 49 ms 14180 KB Output is correct
147 Correct 45 ms 14180 KB Output is correct
148 Correct 48 ms 14216 KB Output is correct
149 Correct 57 ms 14192 KB Output is correct
150 Correct 46 ms 14092 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 12032 KB Output is correct
2 Correct 7 ms 12032 KB Output is correct
3 Correct 7 ms 12032 KB Output is correct
4 Correct 8 ms 12032 KB Output is correct
5 Correct 9 ms 12032 KB Output is correct
6 Correct 7 ms 12032 KB Output is correct
7 Correct 8 ms 12032 KB Output is correct
8 Correct 7 ms 12032 KB Output is correct
9 Correct 7 ms 12032 KB Output is correct
10 Correct 8 ms 12032 KB Output is correct
11 Correct 8 ms 12032 KB Output is correct
12 Correct 7 ms 12032 KB Output is correct
13 Correct 7 ms 12032 KB Output is correct
14 Correct 10 ms 12032 KB Output is correct
15 Correct 7 ms 12032 KB Output is correct
16 Correct 7 ms 12032 KB Output is correct
17 Correct 8 ms 12032 KB Output is correct
18 Correct 6 ms 12032 KB Output is correct
19 Correct 7 ms 12032 KB Output is correct
20 Correct 7 ms 12032 KB Output is correct
21 Correct 7 ms 12032 KB Output is correct
22 Correct 7 ms 12032 KB Output is correct
23 Correct 8 ms 12032 KB Output is correct
24 Correct 8 ms 12032 KB Output is correct
25 Correct 7 ms 12032 KB Output is correct
26 Correct 7 ms 12032 KB Output is correct
27 Correct 7 ms 12032 KB Output is correct
28 Correct 7 ms 12032 KB Output is correct
29 Correct 7 ms 12032 KB Output is correct
30 Correct 7 ms 12032 KB Output is correct
31 Correct 9 ms 12032 KB Output is correct
32 Correct 7 ms 12032 KB Output is correct
33 Correct 10 ms 12032 KB Output is correct
34 Correct 8 ms 12032 KB Output is correct
35 Correct 8 ms 12032 KB Output is correct
36 Correct 8 ms 12032 KB Output is correct
37 Correct 7 ms 12032 KB Output is correct
38 Correct 10 ms 12032 KB Output is correct
39 Correct 10 ms 12032 KB Output is correct
40 Correct 7 ms 12032 KB Output is correct
41 Correct 9 ms 12032 KB Output is correct
42 Correct 9 ms 12032 KB Output is correct
43 Correct 8 ms 12032 KB Output is correct
44 Correct 9 ms 12032 KB Output is correct
45 Correct 9 ms 12032 KB Output is correct
46 Correct 8 ms 12032 KB Output is correct
47 Correct 9 ms 12032 KB Output is correct
48 Correct 8 ms 12032 KB Output is correct
49 Correct 7 ms 12032 KB Output is correct
50 Correct 7 ms 12032 KB Output is correct
51 Correct 7 ms 12032 KB Output is correct
52 Correct 7 ms 12032 KB Output is correct
53 Correct 7 ms 12032 KB Output is correct
54 Correct 7 ms 12032 KB Output is correct
55 Correct 6 ms 12032 KB Output is correct
56 Correct 8 ms 12032 KB Output is correct
57 Correct 7 ms 12032 KB Output is correct
58 Correct 7 ms 12032 KB Output is correct
59 Correct 9 ms 12032 KB Output is correct
60 Correct 7 ms 12032 KB Output is correct
61 Correct 7 ms 12032 KB Output is correct
62 Correct 7 ms 12032 KB Output is correct
63 Correct 10 ms 12032 KB Output is correct
64 Correct 7 ms 12160 KB Output is correct
65 Correct 8 ms 12032 KB Output is correct
66 Correct 9 ms 12032 KB Output is correct
67 Correct 7 ms 12032 KB Output is correct
68 Correct 7 ms 12032 KB Output is correct
69 Correct 8 ms 12032 KB Output is correct
70 Correct 7 ms 12032 KB Output is correct
71 Correct 8 ms 12032 KB Output is correct
72 Correct 7 ms 12032 KB Output is correct
73 Correct 7 ms 12032 KB Output is correct
74 Correct 8 ms 12032 KB Output is correct
75 Correct 7 ms 12032 KB Output is correct
76 Correct 7 ms 12032 KB Output is correct
77 Correct 7 ms 12032 KB Output is correct
78 Correct 7 ms 12032 KB Output is correct
79 Correct 7 ms 12032 KB Output is correct
80 Correct 7 ms 12032 KB Output is correct
81 Correct 9 ms 12032 KB Output is correct
82 Correct 8 ms 12032 KB Output is correct
83 Correct 7 ms 12032 KB Output is correct
84 Correct 7 ms 12032 KB Output is correct
85 Correct 7 ms 12032 KB Output is correct
86 Correct 8 ms 12032 KB Output is correct
87 Correct 7 ms 12032 KB Output is correct
88 Correct 7 ms 12032 KB Output is correct
89 Correct 7 ms 12032 KB Output is correct
90 Correct 8 ms 12032 KB Output is correct
91 Correct 7 ms 12160 KB Output is correct
92 Correct 8 ms 12160 KB Output is correct
93 Correct 8 ms 12180 KB Output is correct
94 Correct 8 ms 12160 KB Output is correct
95 Correct 8 ms 12160 KB Output is correct
96 Correct 8 ms 12160 KB Output is correct
97 Correct 8 ms 12160 KB Output is correct
98 Correct 9 ms 12160 KB Output is correct
99 Correct 12 ms 12048 KB Output is correct
100 Correct 9 ms 12160 KB Output is correct
101 Correct 8 ms 12160 KB Output is correct
102 Correct 10 ms 12160 KB Output is correct
103 Correct 8 ms 12032 KB Output is correct
104 Correct 11 ms 12160 KB Output is correct
105 Correct 11 ms 12160 KB Output is correct
106 Correct 9 ms 12160 KB Output is correct
107 Correct 9 ms 12160 KB Output is correct
108 Correct 10 ms 12160 KB Output is correct
109 Correct 10 ms 12160 KB Output is correct
110 Correct 9 ms 12160 KB Output is correct
111 Correct 10 ms 12160 KB Output is correct
112 Correct 10 ms 12160 KB Output is correct
113 Correct 10 ms 12068 KB Output is correct
114 Correct 8 ms 12160 KB Output is correct
115 Correct 9 ms 12160 KB Output is correct
116 Correct 10 ms 12160 KB Output is correct
117 Correct 9 ms 12160 KB Output is correct
118 Correct 10 ms 12160 KB Output is correct
119 Correct 10 ms 12160 KB Output is correct
120 Correct 10 ms 12160 KB Output is correct
121 Correct 49 ms 14196 KB Output is correct
122 Correct 52 ms 14200 KB Output is correct
123 Correct 44 ms 14096 KB Output is correct
124 Correct 56 ms 14196 KB Output is correct
125 Correct 50 ms 14196 KB Output is correct
126 Correct 49 ms 14196 KB Output is correct
127 Correct 48 ms 14200 KB Output is correct
128 Correct 33 ms 13648 KB Output is correct
129 Correct 29 ms 13056 KB Output is correct
130 Correct 7 ms 12032 KB Output is correct
131 Correct 35 ms 13748 KB Output is correct
132 Correct 50 ms 14096 KB Output is correct
133 Correct 12 ms 12288 KB Output is correct
134 Correct 48 ms 14024 KB Output is correct
135 Correct 11 ms 12288 KB Output is correct
136 Correct 37 ms 14268 KB Output is correct
137 Correct 43 ms 14392 KB Output is correct
138 Correct 47 ms 14392 KB Output is correct
139 Correct 41 ms 14392 KB Output is correct
140 Correct 43 ms 14268 KB Output is correct
141 Correct 39 ms 14392 KB Output is correct
142 Correct 43 ms 14392 KB Output is correct
143 Correct 48 ms 14200 KB Output is correct
144 Correct 38 ms 14392 KB Output is correct
145 Correct 46 ms 14120 KB Output is correct
146 Correct 49 ms 14180 KB Output is correct
147 Correct 45 ms 14180 KB Output is correct
148 Correct 48 ms 14216 KB Output is correct
149 Correct 57 ms 14192 KB Output is correct
150 Correct 46 ms 14092 KB Output is correct
151 Correct 390 ms 27636 KB Output is correct
152 Correct 379 ms 28164 KB Output is correct
153 Correct 449 ms 28748 KB Output is correct
154 Correct 413 ms 29652 KB Output is correct
155 Correct 399 ms 28840 KB Output is correct
156 Correct 396 ms 29236 KB Output is correct
157 Correct 413 ms 29292 KB Output is correct
158 Correct 12 ms 12544 KB Output is correct
159 Correct 301 ms 25884 KB Output is correct
160 Correct 361 ms 27240 KB Output is correct
161 Correct 169 ms 22140 KB Output is correct
162 Correct 428 ms 29272 KB Output is correct
163 Correct 161 ms 20412 KB Output is correct
164 Correct 91 ms 17300 KB Output is correct
165 Correct 148 ms 20964 KB Output is correct
166 Correct 346 ms 28684 KB Output is correct
167 Correct 321 ms 29384 KB Output is correct
168 Correct 328 ms 29576 KB Output is correct
169 Correct 310 ms 29216 KB Output is correct
170 Correct 323 ms 29308 KB Output is correct
171 Correct 329 ms 29364 KB Output is correct
172 Correct 317 ms 29264 KB Output is correct
173 Correct 420 ms 29640 KB Output is correct
174 Correct 316 ms 29180 KB Output is correct
175 Correct 450 ms 29624 KB Output is correct
176 Correct 420 ms 29604 KB Output is correct
177 Correct 373 ms 28332 KB Output is correct
178 Correct 376 ms 28344 KB Output is correct
179 Correct 420 ms 28832 KB Output is correct
180 Correct 437 ms 29884 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 12032 KB Output is correct
2 Correct 7 ms 12032 KB Output is correct
3 Correct 7 ms 12032 KB Output is correct
4 Correct 8 ms 12032 KB Output is correct
5 Correct 9 ms 12032 KB Output is correct
6 Correct 7 ms 12032 KB Output is correct
7 Correct 8 ms 12032 KB Output is correct
8 Correct 7 ms 12032 KB Output is correct
9 Correct 7 ms 12032 KB Output is correct
10 Correct 8 ms 12032 KB Output is correct
11 Correct 8 ms 12032 KB Output is correct
12 Correct 7 ms 12032 KB Output is correct
13 Correct 7 ms 12032 KB Output is correct
14 Correct 10 ms 12032 KB Output is correct
15 Correct 7 ms 12032 KB Output is correct
16 Correct 7 ms 12032 KB Output is correct
17 Correct 8 ms 12032 KB Output is correct
18 Correct 6 ms 12032 KB Output is correct
19 Correct 7 ms 12032 KB Output is correct
20 Correct 7 ms 12032 KB Output is correct
21 Correct 7 ms 12032 KB Output is correct
22 Correct 7 ms 12032 KB Output is correct
23 Correct 8 ms 12032 KB Output is correct
24 Correct 8 ms 12032 KB Output is correct
25 Correct 7 ms 12032 KB Output is correct
26 Correct 7 ms 12032 KB Output is correct
27 Correct 7 ms 12032 KB Output is correct
28 Correct 7 ms 12032 KB Output is correct
29 Correct 7 ms 12032 KB Output is correct
30 Correct 7 ms 12032 KB Output is correct
31 Correct 9 ms 12032 KB Output is correct
32 Correct 7 ms 12032 KB Output is correct
33 Correct 10 ms 12032 KB Output is correct
34 Correct 8 ms 12032 KB Output is correct
35 Correct 8 ms 12032 KB Output is correct
36 Correct 8 ms 12032 KB Output is correct
37 Correct 7 ms 12032 KB Output is correct
38 Correct 10 ms 12032 KB Output is correct
39 Correct 10 ms 12032 KB Output is correct
40 Correct 7 ms 12032 KB Output is correct
41 Correct 9 ms 12032 KB Output is correct
42 Correct 9 ms 12032 KB Output is correct
43 Correct 8 ms 12032 KB Output is correct
44 Correct 9 ms 12032 KB Output is correct
45 Correct 9 ms 12032 KB Output is correct
46 Correct 8 ms 12032 KB Output is correct
47 Correct 9 ms 12032 KB Output is correct
48 Correct 8 ms 12032 KB Output is correct
49 Correct 7 ms 12032 KB Output is correct
50 Correct 7 ms 12032 KB Output is correct
51 Correct 7 ms 12032 KB Output is correct
52 Correct 7 ms 12032 KB Output is correct
53 Correct 7 ms 12032 KB Output is correct
54 Correct 7 ms 12032 KB Output is correct
55 Correct 6 ms 12032 KB Output is correct
56 Correct 8 ms 12032 KB Output is correct
57 Correct 7 ms 12032 KB Output is correct
58 Correct 7 ms 12032 KB Output is correct
59 Correct 9 ms 12032 KB Output is correct
60 Correct 7 ms 12032 KB Output is correct
61 Correct 7 ms 12032 KB Output is correct
62 Correct 7 ms 12032 KB Output is correct
63 Correct 10 ms 12032 KB Output is correct
64 Correct 7 ms 12160 KB Output is correct
65 Correct 8 ms 12032 KB Output is correct
66 Correct 9 ms 12032 KB Output is correct
67 Correct 7 ms 12032 KB Output is correct
68 Correct 7 ms 12032 KB Output is correct
69 Correct 8 ms 12032 KB Output is correct
70 Correct 7 ms 12032 KB Output is correct
71 Correct 8 ms 12032 KB Output is correct
72 Correct 7 ms 12032 KB Output is correct
73 Correct 7 ms 12032 KB Output is correct
74 Correct 8 ms 12032 KB Output is correct
75 Correct 7 ms 12032 KB Output is correct
76 Correct 7 ms 12032 KB Output is correct
77 Correct 7 ms 12032 KB Output is correct
78 Correct 7 ms 12032 KB Output is correct
79 Correct 7 ms 12032 KB Output is correct
80 Correct 7 ms 12032 KB Output is correct
81 Correct 9 ms 12032 KB Output is correct
82 Correct 8 ms 12032 KB Output is correct
83 Correct 7 ms 12032 KB Output is correct
84 Correct 7 ms 12032 KB Output is correct
85 Correct 7 ms 12032 KB Output is correct
86 Correct 8 ms 12032 KB Output is correct
87 Correct 7 ms 12032 KB Output is correct
88 Correct 7 ms 12032 KB Output is correct
89 Correct 7 ms 12032 KB Output is correct
90 Correct 8 ms 12032 KB Output is correct
91 Correct 7 ms 12160 KB Output is correct
92 Correct 8 ms 12160 KB Output is correct
93 Correct 8 ms 12180 KB Output is correct
94 Correct 8 ms 12160 KB Output is correct
95 Correct 8 ms 12160 KB Output is correct
96 Correct 8 ms 12160 KB Output is correct
97 Correct 8 ms 12160 KB Output is correct
98 Correct 9 ms 12160 KB Output is correct
99 Correct 12 ms 12048 KB Output is correct
100 Correct 9 ms 12160 KB Output is correct
101 Correct 8 ms 12160 KB Output is correct
102 Correct 10 ms 12160 KB Output is correct
103 Correct 8 ms 12032 KB Output is correct
104 Correct 11 ms 12160 KB Output is correct
105 Correct 11 ms 12160 KB Output is correct
106 Correct 9 ms 12160 KB Output is correct
107 Correct 9 ms 12160 KB Output is correct
108 Correct 10 ms 12160 KB Output is correct
109 Correct 10 ms 12160 KB Output is correct
110 Correct 9 ms 12160 KB Output is correct
111 Correct 10 ms 12160 KB Output is correct
112 Correct 10 ms 12160 KB Output is correct
113 Correct 10 ms 12068 KB Output is correct
114 Correct 8 ms 12160 KB Output is correct
115 Correct 9 ms 12160 KB Output is correct
116 Correct 10 ms 12160 KB Output is correct
117 Correct 9 ms 12160 KB Output is correct
118 Correct 10 ms 12160 KB Output is correct
119 Correct 10 ms 12160 KB Output is correct
120 Correct 10 ms 12160 KB Output is correct
121 Correct 49 ms 14196 KB Output is correct
122 Correct 52 ms 14200 KB Output is correct
123 Correct 44 ms 14096 KB Output is correct
124 Correct 56 ms 14196 KB Output is correct
125 Correct 50 ms 14196 KB Output is correct
126 Correct 49 ms 14196 KB Output is correct
127 Correct 48 ms 14200 KB Output is correct
128 Correct 33 ms 13648 KB Output is correct
129 Correct 29 ms 13056 KB Output is correct
130 Correct 7 ms 12032 KB Output is correct
131 Correct 35 ms 13748 KB Output is correct
132 Correct 50 ms 14096 KB Output is correct
133 Correct 12 ms 12288 KB Output is correct
134 Correct 48 ms 14024 KB Output is correct
135 Correct 11 ms 12288 KB Output is correct
136 Correct 37 ms 14268 KB Output is correct
137 Correct 43 ms 14392 KB Output is correct
138 Correct 47 ms 14392 KB Output is correct
139 Correct 41 ms 14392 KB Output is correct
140 Correct 43 ms 14268 KB Output is correct
141 Correct 39 ms 14392 KB Output is correct
142 Correct 43 ms 14392 KB Output is correct
143 Correct 48 ms 14200 KB Output is correct
144 Correct 38 ms 14392 KB Output is correct
145 Correct 46 ms 14120 KB Output is correct
146 Correct 49 ms 14180 KB Output is correct
147 Correct 45 ms 14180 KB Output is correct
148 Correct 48 ms 14216 KB Output is correct
149 Correct 57 ms 14192 KB Output is correct
150 Correct 46 ms 14092 KB Output is correct
151 Correct 390 ms 27636 KB Output is correct
152 Correct 379 ms 28164 KB Output is correct
153 Correct 449 ms 28748 KB Output is correct
154 Correct 413 ms 29652 KB Output is correct
155 Correct 399 ms 28840 KB Output is correct
156 Correct 396 ms 29236 KB Output is correct
157 Correct 413 ms 29292 KB Output is correct
158 Correct 12 ms 12544 KB Output is correct
159 Correct 301 ms 25884 KB Output is correct
160 Correct 361 ms 27240 KB Output is correct
161 Correct 169 ms 22140 KB Output is correct
162 Correct 428 ms 29272 KB Output is correct
163 Correct 161 ms 20412 KB Output is correct
164 Correct 91 ms 17300 KB Output is correct
165 Correct 148 ms 20964 KB Output is correct
166 Correct 346 ms 28684 KB Output is correct
167 Correct 321 ms 29384 KB Output is correct
168 Correct 328 ms 29576 KB Output is correct
169 Correct 310 ms 29216 KB Output is correct
170 Correct 323 ms 29308 KB Output is correct
171 Correct 329 ms 29364 KB Output is correct
172 Correct 317 ms 29264 KB Output is correct
173 Correct 420 ms 29640 KB Output is correct
174 Correct 316 ms 29180 KB Output is correct
175 Correct 450 ms 29624 KB Output is correct
176 Correct 420 ms 29604 KB Output is correct
177 Correct 373 ms 28332 KB Output is correct
178 Correct 376 ms 28344 KB Output is correct
179 Correct 420 ms 28832 KB Output is correct
180 Correct 437 ms 29884 KB Output is correct
181 Execution timed out 1096 ms 40496 KB Time limit exceeded
182 Halted 0 ms 0 KB -