-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1004.cpp~
More file actions
51 lines (40 loc) · 1.1 KB
/
Copy path1004.cpp~
File metadata and controls
51 lines (40 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*************************************************************************
> File Name: 1004.cpp
> Author: dulun
> Mail: dulun@xiyoulinux.org
> Created Time: 2015年11月29日 星期日 15时51分58秒
************************************************************************/
#include<iostream>
#include<stdio.h>
#include<queue>
using namespace std;
char map[4][4];
bool charge(char * map)
{
for(i = 0; i < 4; i++)
{
if(map[i][0] == map[i][1] == map[i][2] == map[i][3] == 'B')
return 1;
if(map[i][0] == map[i][1] == map[i][2] == map[i][3] == 'W')
return 1;
if(map[0][i] == map[1][i] == map[2][i] == map[3][i] == 'B')
return 1;
if(map[0][i] == map[1][i] == map[2][i] == map[3][i] == 'W')
return 1;
}
if(map[0][0] == map[1][1] == map[2][2] == map[3][3]) return 1;
if(map[0][3] == map[1][2] == map[2][1] == map[3][0]) return 1;
return 0;
}
void input():
{
for(int i = 0; i < 4; i++)
{
for(int j = 0; j < 4; j++)
cin>>map[i][j];
}
}
void bfs()
{
queue<char[4][4]> q;
}