用户输出
1
4
5
1
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#49179 | #1260. 初学围棋 | Wrong Answer | 0 | 127 ms | 404 K | C++ / 1018 B | cqbzhwj | 2021-05-23 20:56:39 |
#include <bits/stdc++.h>
using namespace std;
int n, mx;
char board[105];
bool judge(int x) {
bool l = 1, r = 1;
for (int i = x + 1; i <= n; i++) {
if (board[x] == '.') {
r = 1;
break;
}
if (board[x] == 'B') {
r = 0;
break;
}
}
for (int i = x - 1; i > 0; i--) {
if (board[x] == '.') {
l = 1;
break;
}
if (board[x] == 'B') {
l = 0;
break;
}
}
return l | r;
}
int main() {
scanf("%d%s", &n, board + 1);
for (int i = 1; i <= n; i++) {
// if(board[i]!='.') printf("0 0\n");
if (board[i] == '.' && judge(i)) {
printf("%d\n", i);
int tot1 = 0, tot2 = 0;
for (int j = i - 1; j > 0; j--) {
if (board[j] == 'B')
++tot1;
if (board[j] == 'W')
break;
if (board[j] == '.') {
tot1 = 0;
break;
}
}
for (int j = i + 1; j <= n; j++) {
if (board[j] == 'B')
++tot2;
if (board[j] == 'W')
break;
if (board[j] == '.') {
tot2 = 0;
break;
}
}
// printf("%d %d\n",tot1,tot2);
mx = max(mx, max(tot1, tot2));
}
}
printf("%d", mx);
}
用户输出
1
4
5
1
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
5
2
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
4
6
1
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
4
1
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
4
5
3
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 BBBBBBBBBBBBBB.WBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
15
100
83
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 B.WBBBBBBBBBBBBBB.WBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
2
18
100
80
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 BBBBBBB.WBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB.W.WBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB.WBBBB
<5 bytes omitted>
用户输出
8
51
53
91
100
41
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 BBBBBBBBBBBBBBBBBB.W.WBBBBBBBBBBB.WBBBBBBBBBBBBBBBB.WBBBBBBBB.WBBBBBBBBBBBBBBBBBBBBBB.W.WBBBBBBB
<5 bytes omitted>
用户输出
19
21
34
52
62
86
88
100
22
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .W.WBBBBBBBBB.W.W.WBBBBBB.WBBB.WBBBBBBB.WBB.WBB.WBBBBBBBBBBBBB.WBBBBBB.WBBBBBBBBBBBBBBBBBBBBB..W
<5 bytes omitted>
用户输出
1
3
14
16
18
26
31
40
44
48
63
71
94
95
100
21
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBW.BBB
<5 bytes omitted>
用户输出
1
93
90
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBW.BBBBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
75
99
72
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBBBBBBBBBBBBBBBBBBBW.BBBBBBBW.BBBBBBBBBBBBBBW.BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBW.BBBBBBBBBBB
<5 bytes omitted>
用户输出
1
23
32
48
85
35
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBBBBBBBBBBBBW.BBBBBBBBBBBW.BW.BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBW.BBBBBW.BBBBBBW.BBBBBBBBBBW.B
<5 bytes omitted>
用户输出
1
16
29
32
68
75
83
95
34
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBW.BBBBBBBBW.BBBBBBBBBBBW.W.BBBBW.BBBBBBBBWW..BBBBW.BBBBBBW.BBBBBBBBW.BBBBW.BBBBBW.BBW.W.BBBBB
<5 bytes omitted>
用户输出
1
5
15
28
30
36
47
48
54
62
72
78
85
89
91
11
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
20
18
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
40
38
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
60
58
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
80
78
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 WBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
100
98
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
18
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
38
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
58
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1
78
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
98
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 WBBBBBBBBBBBBBBBBBB..BB.BBBBBBBBBBB..BBBBBBBBBBBBBBB.BBBBBBBBBBBB.BBBBBBB.BBBBBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
20
21
24
36
37
53
66
74
97
18
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 BBBBBB.B.BBBB.BBB.B.WBBBBBBBBBBBBBBBBBB..BBBB.BBBBBBBBBBBBB.BB..BBBBBB..B.BBBBBBBB.....BBBBBBBBB
<5 bytes omitted>
用户输出
7
9
14
18
20
40
41
46
60
63
64
71
72
74
83
84
85
86
87
97
98
99
18
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 BBB.BBBBBBBBBBB.BBBBBBBBBBBBBBBBBBBB.BB.WBBBBBBBBBBBBBBBBBB...BBBBB..BBBB.BBBBBBBB.BBBBBB.BBB.BB
<5 bytes omitted>
用户输出
4
16
37
40
60
61
62
68
69
74
83
90
94
100
18
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBBB..B.BB.BBBBBBB.B.BB.BBBBBBBB.B.BB.B..B.BB.BBBBBBBBBBBB.WBBBBBBBBBBBBBBBBBB..BBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
6
7
9
12
20
22
25
34
36
39
41
42
44
47
60
80
81
100
18
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .B.B.BBBBBBBBBBBBBBBBBB.BBBBBBBBB.BBBBBBBB.BBBBBBB..BBBBBBBB.BBB.BBB.BBB.BBBBBB.WBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
3
5
24
34
43
51
52
61
65
69
73
80
100
18
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBBB.B..BB.B.BBBBBBBB.BB.BBBBBB..BBB.B.BBBB.B.BBBB.BBB.BB.BBBBB.BBBBBBBBBBBBBB..BBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
6
8
9
12
14
23
26
33
34
38
40
45
47
52
56
59
65
80
81
18
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 B.BBBBB.BBBBB.B.BBB.BBBBBBBBBBBBBBB..BB.BB.BB.B..BBBBBBB.BB..BBBBBBBBBBBBBBBBBBW.BBBBBBBBBBB.BBB
<5 bytes omitted>
用户输出
2
8
14
16
20
36
37
40
43
46
48
49
57
60
61
81
93
100
18
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 BBBBBB.BBBBBBB.B..BBBBB..BBB.BBBB.B.BBB..BBBBBBBBBBBBBBBBBBW.BBBB.BBBBBB.BBBBB.BBBBBB.BBBBBBBBBB
<5 bytes omitted>
用户输出
7
15
17
18
24
25
29
34
36
40
41
61
66
73
79
86
98
18
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .B.BBBB.BBBBB.BB.BB..BBBBBBBBBBBBBBBBBBW..B.BBBBBBBBBBBBBB.BBBBBBBBBBBBBBBBB.BBBB.B.B.BBBBBB.BBB
<5 bytes omitted>
用户输出
1
3
8
14
17
20
21
41
42
44
59
77
82
84
86
93
18
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBBBBBBBBBBBBBBBBBW.BBB.BBBBBBBBBBBB.BB.BB.BBB.BBBBBBBBBB..BBBBBBBBBBB.BBBBBBBBBB..B.BBB.BBBBB.
<5 bytes omitted>
用户输出
1
21
25
38
41
44
48
59
60
72
83
84
86
90
96
99
18
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
100
0
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB.BBBBBBBBW.BBBBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
65
75
98
100
8
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBW.BBBBBBBBBBBBBBBBBB.BB.BBBBBBBBB.BBBBBW.BBB.BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
5
24
27
37
44
48
100
5
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 ..BBBBBBBBBB.BBBBB.WBB.BBBBBB.BBBBW.BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBW.BBBBBBBBBBBBBBB.BBBBBBBB
<5 bytes omitted>
用户输出
1
2
13
19
23
30
36
72
88
100
34
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BB.BBBBBBB.BBBBBBBB.WBBBBBBBBBBBBBB.BBBW.B.WB.BBBBBBBBBBBBBBBBBBBBB.BBBB.BBBBBBBBBBBB.WBBBBBBBB
<5 bytes omitted>
用户输出
1
4
12
21
37
42
44
47
69
74
87
97
99
100
14
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .WBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB.WWWWWBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
55
100
52
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBWWWWWWWWWWWWW.BBBBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
75
100
60
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .WBBBBBBBB.WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWBBBBBBBBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
11
99
100
27
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBBBB.BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB.BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
7
44
100
54
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .WBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB.WWWBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB.BBBBBBB.BBB
<5 bytes omitted>
用户输出
1
48
85
93
100
45
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBBBBBBBB.BWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.BBBBWWW.BBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
11
69
77
100
21
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .W.WWWBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB.WWWWWWWWWWWWWWWWWWWWWBBBBBB.BBBBBBBBBBBBBBBBB.BBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
3
37
65
83
100
30
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.BBBBBBBB.BBBBBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
65
74
100
24
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .WBBBBBBBBBBBBBBBBBBBBB.WWWWWWWWWWWWBBBB..WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.WWWWWWBBBBB.WWWWWWW
<5 bytes omitted>
用户输出
1
24
41
42
77
89
100
21
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 .BBBBBBBBBBBBBBBBBBBBBBBBBBB.BBBBBBBBBBBWWWWW.WWWWWWWWWWWWWWWWWW.WW.WWWWWWWWWWWWW.BBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
1
29
46
65
68
82
100
16
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
<5 bytes omitted>
用户输出
100
99
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0