Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- const int MAXN = 100000 + 100;
- const int N = 8;
- int main(){
- int mas[N][N];
- for (int i = 0; i < N; ++i){
- mas[0][i] = ((i + 1) % 2);
- }
- for (int i = 1; i < N; ++i){
- for (int j = 0; j < N; ++j){
- if (mas[i - 1][j] == 0){
- mas[i][j] = 1;
- } else {
- mas[i][j] = 0;
- }
- }
- }
- int i, j;
- char c;
- cin >> c;
- i = c - 'A';
- cin >> c;
- j = c - '1';
- if (mas[i][j] == 1){
- cout << "BLACK" << endl;
- } else {
- cout << "WHITE" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement