/**
____ ____ ____ ____ ____
||a |||t |||o |||d |||o ||
||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|
**/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int W_MAX = 13;
const int K_MAX = 250;
const int D_MAX = 15;
int W, H, K;
map <int, vector <int>> rows;
bool adj[1 << W_MAX][1 << W_MAX];
vector <int> out[1 << W_MAX];
bool check (int u, int v) {
int carry = 0;
for (int y = 0; y < W; y++) {
int cnt = ((u >> y) & 1) + !((v >> y) & 1) - carry;
if (cnt < 0) {
return false;
} else if (cnt == 0) {
carry = 0;
} else if (cnt == 1) {
carry = 2;
} else {
carry = 1;
}
}
return (carry == 0);
}
bitset <(1 << W_MAX)> path[D_MAX + 1][1 << W_MAX];
void build () {
for (int u = 0; u < (1 << W); u++) {
path[0][u][u] = true;
}
for (int d = 1; d <= D_MAX; d++) {
for (int u = 0; u < (1 << W); u++) {
for (int v : out[u]) {
path[d][u] |= path[d - 1][v];
}
}
}
}
bitset <(1 << W_MAX)> reach;
bitset <(1 << W_MAX)> newReach;
void advance (int k) {
if (k > D_MAX) {
k -= (k - D_MAX + 5) / 6 * 6;
}
for (int u = 0; u < (1 << W); u++) {
if (reach[u] == true) {
newReach |= path[k][u];
}
}
swap(reach, newReach); newReach.reset();
}
bool solve () {
reach[(1 << W) - 1] = true;
int x = 0;
for (pair <int, vector <int>> row : rows) {
advance(row.first - x); x = row.first;
int b = 0;
for (int y : row.second) {
b |= (1 << y);
}
for (int u = b; u < (1 << W); u = ((u + 1) | b)) {
newReach[u ^ b] = reach[u];
}
swap(reach, newReach); newReach.reset();
}
advance((H - 1) - x);
return reach[0];
}
int main () {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> W >> H >> K;
for (int i = 0; i < K; i++) {
int x, y;
cin >> y >> x;
x--; y--;
rows[x].push_back(y);
}
for (int u = 0; u < (1 << W); u++) {
for (int v = 0; v < (1 << W); v++) {
if (check(u, v) == true) {
out[u].push_back(v);
}
}
}
build();
cout << (solve() == true ? "YES" : "NO") << "\n";
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
596 KB |
Output is correct |
2 |
Correct |
1 ms |
724 KB |
Output is correct |
3 |
Correct |
1 ms |
664 KB |
Output is correct |
4 |
Correct |
1 ms |
852 KB |
Output is correct |
5 |
Correct |
1 ms |
852 KB |
Output is correct |
6 |
Correct |
1 ms |
1108 KB |
Output is correct |
7 |
Correct |
2 ms |
2644 KB |
Output is correct |
8 |
Correct |
272 ms |
66680 KB |
Output is correct |
9 |
Correct |
101 ms |
33544 KB |
Output is correct |
10 |
Correct |
13 ms |
8860 KB |
Output is correct |
11 |
Correct |
354 ms |
66672 KB |
Output is correct |
12 |
Correct |
32 ms |
17152 KB |
Output is correct |
13 |
Correct |
1 ms |
1108 KB |
Output is correct |
14 |
Correct |
1 ms |
1052 KB |
Output is correct |
15 |
Correct |
299 ms |
66708 KB |
Output is correct |
16 |
Correct |
1129 ms |
133008 KB |
Output is correct |
17 |
Correct |
33 ms |
17120 KB |
Output is correct |
18 |
Correct |
305 ms |
66760 KB |
Output is correct |
19 |
Correct |
3 ms |
2644 KB |
Output is correct |
20 |
Correct |
980 ms |
132944 KB |
Output is correct |
21 |
Correct |
302 ms |
66716 KB |
Output is correct |
22 |
Correct |
1 ms |
1108 KB |
Output is correct |
23 |
Correct |
4 ms |
2644 KB |
Output is correct |
24 |
Correct |
2 ms |
1128 KB |
Output is correct |
25 |
Correct |
948 ms |
132908 KB |
Output is correct |
26 |
Correct |
892 ms |
132964 KB |
Output is correct |
27 |
Correct |
1 ms |
1108 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
2644 KB |
Output is correct |
2 |
Correct |
1 ms |
724 KB |
Output is correct |
3 |
Correct |
1 ms |
596 KB |
Output is correct |
4 |
Correct |
1 ms |
724 KB |
Output is correct |
5 |
Correct |
279 ms |
66712 KB |
Output is correct |
6 |
Correct |
94 ms |
33536 KB |
Output is correct |
7 |
Correct |
41 ms |
17164 KB |
Output is correct |
8 |
Correct |
6 ms |
4820 KB |
Output is correct |
9 |
Correct |
0 ms |
724 KB |
Output is correct |
10 |
Correct |
2 ms |
1620 KB |
Output is correct |
11 |
Correct |
1 ms |
1108 KB |
Output is correct |
12 |
Correct |
1 ms |
596 KB |
Output is correct |
13 |
Correct |
1 ms |
596 KB |
Output is correct |
14 |
Correct |
1 ms |
596 KB |
Output is correct |
15 |
Correct |
1 ms |
724 KB |
Output is correct |
16 |
Correct |
1 ms |
724 KB |
Output is correct |
17 |
Correct |
1 ms |
724 KB |
Output is correct |
18 |
Correct |
891 ms |
132908 KB |
Output is correct |
19 |
Correct |
883 ms |
132924 KB |
Output is correct |
20 |
Correct |
1 ms |
724 KB |
Output is correct |
21 |
Correct |
1 ms |
664 KB |
Output is correct |
22 |
Correct |
13 ms |
8864 KB |
Output is correct |
23 |
Correct |
12 ms |
8868 KB |
Output is correct |
24 |
Correct |
12 ms |
8916 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
596 KB |
Output is correct |
2 |
Correct |
1 ms |
596 KB |
Output is correct |
3 |
Correct |
1 ms |
596 KB |
Output is correct |
4 |
Correct |
1 ms |
596 KB |
Output is correct |
5 |
Correct |
0 ms |
596 KB |
Output is correct |
6 |
Correct |
1 ms |
596 KB |
Output is correct |
7 |
Correct |
1 ms |
724 KB |
Output is correct |
8 |
Correct |
1 ms |
596 KB |
Output is correct |
9 |
Correct |
1 ms |
596 KB |
Output is correct |
10 |
Correct |
1 ms |
596 KB |
Output is correct |
11 |
Correct |
1 ms |
724 KB |
Output is correct |
12 |
Correct |
1 ms |
596 KB |
Output is correct |
13 |
Correct |
0 ms |
596 KB |
Output is correct |
14 |
Correct |
1 ms |
596 KB |
Output is correct |
15 |
Correct |
0 ms |
596 KB |
Output is correct |
16 |
Correct |
0 ms |
724 KB |
Output is correct |
17 |
Correct |
1 ms |
724 KB |
Output is correct |
18 |
Correct |
1 ms |
724 KB |
Output is correct |
19 |
Correct |
1 ms |
724 KB |
Output is correct |
20 |
Correct |
1 ms |
796 KB |
Output is correct |
21 |
Correct |
1 ms |
664 KB |
Output is correct |
22 |
Correct |
1 ms |
664 KB |
Output is correct |
23 |
Correct |
1 ms |
768 KB |
Output is correct |
24 |
Correct |
1 ms |
668 KB |
Output is correct |
25 |
Correct |
1 ms |
724 KB |
Output is correct |
26 |
Correct |
1 ms |
796 KB |
Output is correct |
27 |
Correct |
1 ms |
664 KB |
Output is correct |
28 |
Correct |
1 ms |
660 KB |
Output is correct |
29 |
Correct |
1 ms |
724 KB |
Output is correct |
30 |
Correct |
1 ms |
724 KB |
Output is correct |
31 |
Correct |
1 ms |
724 KB |
Output is correct |
32 |
Correct |
1 ms |
724 KB |
Output is correct |
33 |
Correct |
1 ms |
724 KB |
Output is correct |
34 |
Correct |
1 ms |
668 KB |
Output is correct |
35 |
Correct |
1 ms |
724 KB |
Output is correct |
36 |
Correct |
1 ms |
724 KB |
Output is correct |
37 |
Correct |
1 ms |
724 KB |
Output is correct |
38 |
Correct |
1 ms |
724 KB |
Output is correct |
39 |
Correct |
1 ms |
724 KB |
Output is correct |
40 |
Correct |
1 ms |
724 KB |
Output is correct |
41 |
Correct |
1 ms |
796 KB |
Output is correct |
42 |
Correct |
1 ms |
724 KB |
Output is correct |
43 |
Correct |
1 ms |
724 KB |
Output is correct |
44 |
Correct |
1 ms |
724 KB |
Output is correct |
45 |
Correct |
1 ms |
796 KB |
Output is correct |
46 |
Correct |
1 ms |
724 KB |
Output is correct |
47 |
Correct |
1 ms |
724 KB |
Output is correct |
48 |
Correct |
1 ms |
792 KB |
Output is correct |
49 |
Correct |
1 ms |
724 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
852 KB |
Output is correct |
2 |
Correct |
1 ms |
852 KB |
Output is correct |
3 |
Correct |
1 ms |
1108 KB |
Output is correct |
4 |
Correct |
1 ms |
1108 KB |
Output is correct |
5 |
Correct |
1 ms |
1620 KB |
Output is correct |
6 |
Correct |
1 ms |
1108 KB |
Output is correct |
7 |
Correct |
1 ms |
1108 KB |
Output is correct |
8 |
Correct |
1 ms |
1108 KB |
Output is correct |
9 |
Correct |
1 ms |
1108 KB |
Output is correct |
10 |
Correct |
1 ms |
852 KB |
Output is correct |
11 |
Correct |
1 ms |
1108 KB |
Output is correct |
12 |
Correct |
2 ms |
1620 KB |
Output is correct |
13 |
Correct |
1 ms |
852 KB |
Output is correct |
14 |
Correct |
1 ms |
852 KB |
Output is correct |
15 |
Correct |
1 ms |
1108 KB |
Output is correct |
16 |
Correct |
2 ms |
1672 KB |
Output is correct |
17 |
Correct |
1 ms |
1108 KB |
Output is correct |
18 |
Correct |
1 ms |
1108 KB |
Output is correct |
19 |
Correct |
1 ms |
1620 KB |
Output is correct |
20 |
Correct |
3 ms |
1620 KB |
Output is correct |
21 |
Correct |
1 ms |
1108 KB |
Output is correct |
22 |
Correct |
2 ms |
1620 KB |
Output is correct |
23 |
Correct |
1 ms |
852 KB |
Output is correct |
24 |
Correct |
1 ms |
1108 KB |
Output is correct |
25 |
Correct |
2 ms |
1620 KB |
Output is correct |
26 |
Correct |
1 ms |
852 KB |
Output is correct |
27 |
Correct |
2 ms |
1108 KB |
Output is correct |
28 |
Correct |
2 ms |
1108 KB |
Output is correct |
29 |
Correct |
1 ms |
1108 KB |
Output is correct |
30 |
Correct |
2 ms |
1108 KB |
Output is correct |
31 |
Correct |
1 ms |
1108 KB |
Output is correct |
32 |
Correct |
2 ms |
1620 KB |
Output is correct |
33 |
Correct |
2 ms |
1620 KB |
Output is correct |
34 |
Correct |
2 ms |
1620 KB |
Output is correct |
35 |
Correct |
2 ms |
1620 KB |
Output is correct |
36 |
Correct |
1 ms |
1108 KB |
Output is correct |
37 |
Correct |
2 ms |
1620 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
2644 KB |
Output is correct |
2 |
Correct |
2 ms |
2644 KB |
Output is correct |
3 |
Correct |
5 ms |
4820 KB |
Output is correct |
4 |
Correct |
309 ms |
66760 KB |
Output is correct |
5 |
Correct |
100 ms |
33608 KB |
Output is correct |
6 |
Correct |
113 ms |
33656 KB |
Output is correct |
7 |
Correct |
45 ms |
17072 KB |
Output is correct |
8 |
Correct |
34 ms |
17060 KB |
Output is correct |
9 |
Correct |
32 ms |
17048 KB |
Output is correct |
10 |
Correct |
33 ms |
17108 KB |
Output is correct |
11 |
Correct |
312 ms |
66696 KB |
Output is correct |
12 |
Correct |
104 ms |
33748 KB |
Output is correct |
13 |
Correct |
12 ms |
8916 KB |
Output is correct |
14 |
Correct |
280 ms |
66680 KB |
Output is correct |
15 |
Correct |
3 ms |
2644 KB |
Output is correct |
16 |
Correct |
3 ms |
2644 KB |
Output is correct |
17 |
Correct |
38 ms |
17164 KB |
Output is correct |
18 |
Correct |
6 ms |
4796 KB |
Output is correct |
19 |
Correct |
13 ms |
8944 KB |
Output is correct |
20 |
Correct |
295 ms |
66700 KB |
Output is correct |
21 |
Correct |
107 ms |
33624 KB |
Output is correct |
22 |
Correct |
3 ms |
2644 KB |
Output is correct |
23 |
Correct |
16 ms |
8952 KB |
Output is correct |
24 |
Correct |
949 ms |
133032 KB |
Output is correct |
25 |
Correct |
320 ms |
66772 KB |
Output is correct |
26 |
Correct |
1016 ms |
133028 KB |
Output is correct |
27 |
Correct |
943 ms |
133016 KB |
Output is correct |
28 |
Correct |
871 ms |
132952 KB |
Output is correct |
29 |
Correct |
917 ms |
132940 KB |
Output is correct |
30 |
Correct |
935 ms |
132964 KB |
Output is correct |
31 |
Correct |
916 ms |
133116 KB |
Output is correct |
32 |
Correct |
1000 ms |
133008 KB |
Output is correct |
33 |
Correct |
286 ms |
66796 KB |
Output is correct |
34 |
Correct |
931 ms |
132964 KB |
Output is correct |
35 |
Correct |
969 ms |
133036 KB |
Output is correct |
36 |
Correct |
955 ms |
132952 KB |
Output is correct |
37 |
Correct |
285 ms |
66740 KB |
Output is correct |
38 |
Correct |
321 ms |
66720 KB |
Output is correct |
39 |
Correct |
118 ms |
33652 KB |
Output is correct |
40 |
Correct |
1040 ms |
133028 KB |
Output is correct |
41 |
Correct |
103 ms |
33740 KB |
Output is correct |
42 |
Correct |
990 ms |
132956 KB |
Output is correct |
43 |
Correct |
977 ms |
133040 KB |
Output is correct |
44 |
Correct |
989 ms |
133028 KB |
Output is correct |
45 |
Correct |
1014 ms |
133016 KB |
Output is correct |
46 |
Correct |
310 ms |
66656 KB |
Output is correct |
47 |
Correct |
1028 ms |
133020 KB |
Output is correct |
48 |
Correct |
1072 ms |
132924 KB |
Output is correct |
49 |
Correct |
1063 ms |
132964 KB |
Output is correct |
50 |
Correct |
99 ms |
33664 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
596 KB |
Output is correct |
2 |
Correct |
1 ms |
724 KB |
Output is correct |
3 |
Correct |
1 ms |
664 KB |
Output is correct |
4 |
Correct |
1 ms |
852 KB |
Output is correct |
5 |
Correct |
1 ms |
852 KB |
Output is correct |
6 |
Correct |
1 ms |
1108 KB |
Output is correct |
7 |
Correct |
2 ms |
2644 KB |
Output is correct |
8 |
Correct |
272 ms |
66680 KB |
Output is correct |
9 |
Correct |
101 ms |
33544 KB |
Output is correct |
10 |
Correct |
13 ms |
8860 KB |
Output is correct |
11 |
Correct |
354 ms |
66672 KB |
Output is correct |
12 |
Correct |
32 ms |
17152 KB |
Output is correct |
13 |
Correct |
1 ms |
1108 KB |
Output is correct |
14 |
Correct |
1 ms |
1052 KB |
Output is correct |
15 |
Correct |
299 ms |
66708 KB |
Output is correct |
16 |
Correct |
1129 ms |
133008 KB |
Output is correct |
17 |
Correct |
33 ms |
17120 KB |
Output is correct |
18 |
Correct |
305 ms |
66760 KB |
Output is correct |
19 |
Correct |
3 ms |
2644 KB |
Output is correct |
20 |
Correct |
980 ms |
132944 KB |
Output is correct |
21 |
Correct |
302 ms |
66716 KB |
Output is correct |
22 |
Correct |
1 ms |
1108 KB |
Output is correct |
23 |
Correct |
4 ms |
2644 KB |
Output is correct |
24 |
Correct |
2 ms |
1128 KB |
Output is correct |
25 |
Correct |
948 ms |
132908 KB |
Output is correct |
26 |
Correct |
892 ms |
132964 KB |
Output is correct |
27 |
Correct |
1 ms |
1108 KB |
Output is correct |
28 |
Correct |
3 ms |
2644 KB |
Output is correct |
29 |
Correct |
1 ms |
724 KB |
Output is correct |
30 |
Correct |
1 ms |
596 KB |
Output is correct |
31 |
Correct |
1 ms |
724 KB |
Output is correct |
32 |
Correct |
279 ms |
66712 KB |
Output is correct |
33 |
Correct |
94 ms |
33536 KB |
Output is correct |
34 |
Correct |
41 ms |
17164 KB |
Output is correct |
35 |
Correct |
6 ms |
4820 KB |
Output is correct |
36 |
Correct |
0 ms |
724 KB |
Output is correct |
37 |
Correct |
2 ms |
1620 KB |
Output is correct |
38 |
Correct |
1 ms |
1108 KB |
Output is correct |
39 |
Correct |
1 ms |
596 KB |
Output is correct |
40 |
Correct |
1 ms |
596 KB |
Output is correct |
41 |
Correct |
1 ms |
596 KB |
Output is correct |
42 |
Correct |
1 ms |
724 KB |
Output is correct |
43 |
Correct |
1 ms |
724 KB |
Output is correct |
44 |
Correct |
1 ms |
724 KB |
Output is correct |
45 |
Correct |
891 ms |
132908 KB |
Output is correct |
46 |
Correct |
883 ms |
132924 KB |
Output is correct |
47 |
Correct |
1 ms |
724 KB |
Output is correct |
48 |
Correct |
1 ms |
664 KB |
Output is correct |
49 |
Correct |
13 ms |
8864 KB |
Output is correct |
50 |
Correct |
12 ms |
8868 KB |
Output is correct |
51 |
Correct |
12 ms |
8916 KB |
Output is correct |
52 |
Correct |
0 ms |
596 KB |
Output is correct |
53 |
Correct |
1 ms |
596 KB |
Output is correct |
54 |
Correct |
1 ms |
596 KB |
Output is correct |
55 |
Correct |
1 ms |
596 KB |
Output is correct |
56 |
Correct |
0 ms |
596 KB |
Output is correct |
57 |
Correct |
1 ms |
596 KB |
Output is correct |
58 |
Correct |
1 ms |
724 KB |
Output is correct |
59 |
Correct |
1 ms |
596 KB |
Output is correct |
60 |
Correct |
1 ms |
596 KB |
Output is correct |
61 |
Correct |
1 ms |
596 KB |
Output is correct |
62 |
Correct |
1 ms |
724 KB |
Output is correct |
63 |
Correct |
1 ms |
596 KB |
Output is correct |
64 |
Correct |
0 ms |
596 KB |
Output is correct |
65 |
Correct |
1 ms |
596 KB |
Output is correct |
66 |
Correct |
0 ms |
596 KB |
Output is correct |
67 |
Correct |
0 ms |
724 KB |
Output is correct |
68 |
Correct |
1 ms |
724 KB |
Output is correct |
69 |
Correct |
1 ms |
724 KB |
Output is correct |
70 |
Correct |
1 ms |
724 KB |
Output is correct |
71 |
Correct |
1 ms |
796 KB |
Output is correct |
72 |
Correct |
1 ms |
664 KB |
Output is correct |
73 |
Correct |
1 ms |
664 KB |
Output is correct |
74 |
Correct |
1 ms |
768 KB |
Output is correct |
75 |
Correct |
1 ms |
668 KB |
Output is correct |
76 |
Correct |
1 ms |
724 KB |
Output is correct |
77 |
Correct |
1 ms |
796 KB |
Output is correct |
78 |
Correct |
1 ms |
664 KB |
Output is correct |
79 |
Correct |
1 ms |
660 KB |
Output is correct |
80 |
Correct |
1 ms |
724 KB |
Output is correct |
81 |
Correct |
1 ms |
724 KB |
Output is correct |
82 |
Correct |
1 ms |
724 KB |
Output is correct |
83 |
Correct |
1 ms |
724 KB |
Output is correct |
84 |
Correct |
1 ms |
724 KB |
Output is correct |
85 |
Correct |
1 ms |
668 KB |
Output is correct |
86 |
Correct |
1 ms |
724 KB |
Output is correct |
87 |
Correct |
1 ms |
724 KB |
Output is correct |
88 |
Correct |
1 ms |
724 KB |
Output is correct |
89 |
Correct |
1 ms |
724 KB |
Output is correct |
90 |
Correct |
1 ms |
724 KB |
Output is correct |
91 |
Correct |
1 ms |
724 KB |
Output is correct |
92 |
Correct |
1 ms |
796 KB |
Output is correct |
93 |
Correct |
1 ms |
724 KB |
Output is correct |
94 |
Correct |
1 ms |
724 KB |
Output is correct |
95 |
Correct |
1 ms |
724 KB |
Output is correct |
96 |
Correct |
1 ms |
796 KB |
Output is correct |
97 |
Correct |
1 ms |
724 KB |
Output is correct |
98 |
Correct |
1 ms |
724 KB |
Output is correct |
99 |
Correct |
1 ms |
792 KB |
Output is correct |
100 |
Correct |
1 ms |
724 KB |
Output is correct |
101 |
Correct |
1 ms |
852 KB |
Output is correct |
102 |
Correct |
1 ms |
852 KB |
Output is correct |
103 |
Correct |
1 ms |
1108 KB |
Output is correct |
104 |
Correct |
1 ms |
1108 KB |
Output is correct |
105 |
Correct |
1 ms |
1620 KB |
Output is correct |
106 |
Correct |
1 ms |
1108 KB |
Output is correct |
107 |
Correct |
1 ms |
1108 KB |
Output is correct |
108 |
Correct |
1 ms |
1108 KB |
Output is correct |
109 |
Correct |
1 ms |
1108 KB |
Output is correct |
110 |
Correct |
1 ms |
852 KB |
Output is correct |
111 |
Correct |
1 ms |
1108 KB |
Output is correct |
112 |
Correct |
2 ms |
1620 KB |
Output is correct |
113 |
Correct |
1 ms |
852 KB |
Output is correct |
114 |
Correct |
1 ms |
852 KB |
Output is correct |
115 |
Correct |
1 ms |
1108 KB |
Output is correct |
116 |
Correct |
2 ms |
1672 KB |
Output is correct |
117 |
Correct |
1 ms |
1108 KB |
Output is correct |
118 |
Correct |
1 ms |
1108 KB |
Output is correct |
119 |
Correct |
1 ms |
1620 KB |
Output is correct |
120 |
Correct |
3 ms |
1620 KB |
Output is correct |
121 |
Correct |
1 ms |
1108 KB |
Output is correct |
122 |
Correct |
2 ms |
1620 KB |
Output is correct |
123 |
Correct |
1 ms |
852 KB |
Output is correct |
124 |
Correct |
1 ms |
1108 KB |
Output is correct |
125 |
Correct |
2 ms |
1620 KB |
Output is correct |
126 |
Correct |
1 ms |
852 KB |
Output is correct |
127 |
Correct |
2 ms |
1108 KB |
Output is correct |
128 |
Correct |
2 ms |
1108 KB |
Output is correct |
129 |
Correct |
1 ms |
1108 KB |
Output is correct |
130 |
Correct |
2 ms |
1108 KB |
Output is correct |
131 |
Correct |
1 ms |
1108 KB |
Output is correct |
132 |
Correct |
2 ms |
1620 KB |
Output is correct |
133 |
Correct |
2 ms |
1620 KB |
Output is correct |
134 |
Correct |
2 ms |
1620 KB |
Output is correct |
135 |
Correct |
2 ms |
1620 KB |
Output is correct |
136 |
Correct |
1 ms |
1108 KB |
Output is correct |
137 |
Correct |
2 ms |
1620 KB |
Output is correct |
138 |
Correct |
3 ms |
2644 KB |
Output is correct |
139 |
Correct |
2 ms |
2644 KB |
Output is correct |
140 |
Correct |
5 ms |
4820 KB |
Output is correct |
141 |
Correct |
309 ms |
66760 KB |
Output is correct |
142 |
Correct |
100 ms |
33608 KB |
Output is correct |
143 |
Correct |
113 ms |
33656 KB |
Output is correct |
144 |
Correct |
45 ms |
17072 KB |
Output is correct |
145 |
Correct |
34 ms |
17060 KB |
Output is correct |
146 |
Correct |
32 ms |
17048 KB |
Output is correct |
147 |
Correct |
33 ms |
17108 KB |
Output is correct |
148 |
Correct |
312 ms |
66696 KB |
Output is correct |
149 |
Correct |
104 ms |
33748 KB |
Output is correct |
150 |
Correct |
12 ms |
8916 KB |
Output is correct |
151 |
Correct |
280 ms |
66680 KB |
Output is correct |
152 |
Correct |
3 ms |
2644 KB |
Output is correct |
153 |
Correct |
3 ms |
2644 KB |
Output is correct |
154 |
Correct |
38 ms |
17164 KB |
Output is correct |
155 |
Correct |
6 ms |
4796 KB |
Output is correct |
156 |
Correct |
13 ms |
8944 KB |
Output is correct |
157 |
Correct |
295 ms |
66700 KB |
Output is correct |
158 |
Correct |
107 ms |
33624 KB |
Output is correct |
159 |
Correct |
3 ms |
2644 KB |
Output is correct |
160 |
Correct |
16 ms |
8952 KB |
Output is correct |
161 |
Correct |
949 ms |
133032 KB |
Output is correct |
162 |
Correct |
320 ms |
66772 KB |
Output is correct |
163 |
Correct |
1016 ms |
133028 KB |
Output is correct |
164 |
Correct |
943 ms |
133016 KB |
Output is correct |
165 |
Correct |
871 ms |
132952 KB |
Output is correct |
166 |
Correct |
917 ms |
132940 KB |
Output is correct |
167 |
Correct |
935 ms |
132964 KB |
Output is correct |
168 |
Correct |
916 ms |
133116 KB |
Output is correct |
169 |
Correct |
1000 ms |
133008 KB |
Output is correct |
170 |
Correct |
286 ms |
66796 KB |
Output is correct |
171 |
Correct |
931 ms |
132964 KB |
Output is correct |
172 |
Correct |
969 ms |
133036 KB |
Output is correct |
173 |
Correct |
955 ms |
132952 KB |
Output is correct |
174 |
Correct |
285 ms |
66740 KB |
Output is correct |
175 |
Correct |
321 ms |
66720 KB |
Output is correct |
176 |
Correct |
118 ms |
33652 KB |
Output is correct |
177 |
Correct |
1040 ms |
133028 KB |
Output is correct |
178 |
Correct |
103 ms |
33740 KB |
Output is correct |
179 |
Correct |
990 ms |
132956 KB |
Output is correct |
180 |
Correct |
977 ms |
133040 KB |
Output is correct |
181 |
Correct |
989 ms |
133028 KB |
Output is correct |
182 |
Correct |
1014 ms |
133016 KB |
Output is correct |
183 |
Correct |
310 ms |
66656 KB |
Output is correct |
184 |
Correct |
1028 ms |
133020 KB |
Output is correct |
185 |
Correct |
1072 ms |
132924 KB |
Output is correct |
186 |
Correct |
1063 ms |
132964 KB |
Output is correct |
187 |
Correct |
99 ms |
33664 KB |
Output is correct |
188 |
Correct |
1081 ms |
133000 KB |
Output is correct |
189 |
Correct |
1 ms |
672 KB |
Output is correct |
190 |
Correct |
1 ms |
724 KB |
Output is correct |
191 |
Correct |
1 ms |
596 KB |
Output is correct |
192 |
Correct |
5 ms |
4820 KB |
Output is correct |
193 |
Correct |
2 ms |
2644 KB |
Output is correct |
194 |
Correct |
1 ms |
668 KB |
Output is correct |
195 |
Correct |
1 ms |
1108 KB |
Output is correct |
196 |
Correct |
1 ms |
724 KB |
Output is correct |
197 |
Correct |
1 ms |
724 KB |
Output is correct |
198 |
Correct |
1 ms |
724 KB |
Output is correct |
199 |
Correct |
153 ms |
33664 KB |
Output is correct |
200 |
Correct |
1 ms |
724 KB |
Output is correct |
201 |
Correct |
46 ms |
17052 KB |
Output is correct |
202 |
Correct |
36 ms |
17076 KB |
Output is correct |
203 |
Correct |
1 ms |
1108 KB |
Output is correct |
204 |
Correct |
1 ms |
1108 KB |
Output is correct |
205 |
Correct |
2 ms |
1620 KB |
Output is correct |
206 |
Correct |
1 ms |
1108 KB |
Output is correct |
207 |
Correct |
1 ms |
724 KB |
Output is correct |
208 |
Correct |
1029 ms |
133020 KB |
Output is correct |
209 |
Correct |
1039 ms |
132984 KB |
Output is correct |
210 |
Correct |
3 ms |
2644 KB |
Output is correct |
211 |
Correct |
7 ms |
4820 KB |
Output is correct |
212 |
Correct |
371 ms |
66684 KB |
Output is correct |
213 |
Correct |
1 ms |
724 KB |
Output is correct |
214 |
Correct |
15 ms |
8972 KB |
Output is correct |
215 |
Correct |
2 ms |
1108 KB |
Output is correct |
216 |
Correct |
1040 ms |
133040 KB |
Output is correct |
217 |
Correct |
1079 ms |
132944 KB |
Output is correct |
218 |
Correct |
1 ms |
724 KB |
Output is correct |
219 |
Correct |
1 ms |
792 KB |
Output is correct |
220 |
Correct |
1 ms |
668 KB |
Output is correct |
221 |
Correct |
1 ms |
724 KB |
Output is correct |
222 |
Correct |
1 ms |
792 KB |
Output is correct |
223 |
Correct |
2 ms |
1620 KB |
Output is correct |
224 |
Correct |
1032 ms |
132920 KB |
Output is correct |
225 |
Correct |
1 ms |
724 KB |
Output is correct |
226 |
Correct |
1 ms |
1184 KB |
Output is correct |
227 |
Correct |
1 ms |
1108 KB |
Output is correct |
228 |
Correct |
1020 ms |
132948 KB |
Output is correct |
229 |
Correct |
1045 ms |
132992 KB |
Output is correct |
230 |
Correct |
990 ms |
133004 KB |
Output is correct |
231 |
Correct |
1008 ms |
133016 KB |
Output is correct |
232 |
Correct |
1 ms |
728 KB |
Output is correct |
233 |
Correct |
1 ms |
724 KB |
Output is correct |
234 |
Correct |
1030 ms |
133008 KB |
Output is correct |
235 |
Correct |
1 ms |
724 KB |
Output is correct |
236 |
Correct |
358 ms |
66884 KB |
Output is correct |
237 |
Correct |
2 ms |
1620 KB |
Output is correct |
238 |
Correct |
2 ms |
1108 KB |
Output is correct |
239 |
Correct |
132 ms |
33580 KB |
Output is correct |
240 |
Correct |
1073 ms |
133024 KB |
Output is correct |
241 |
Correct |
1 ms |
1176 KB |
Output is correct |
242 |
Correct |
1 ms |
1176 KB |
Output is correct |
243 |
Correct |
2 ms |
1056 KB |
Output is correct |
244 |
Correct |
1 ms |
1108 KB |
Output is correct |
245 |
Correct |
289 ms |
66656 KB |
Output is correct |