blob: 9d3e8a53f30f7b80572fa99cb273e5854452019b (
plain)
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
|
#include <iostream>
using namespace std;
int main() {
char i;
char black, grey;
cin >> i;
if ( i != '.' )
do {
black = 0;
grey = 0;
while (i != '.') {
if ( i == 'N' )
black = (black+1)%2;
if ( i == 'G' )
grey = (grey+1)%2;
cin >> i;
}
if (black && grey)
cout << "PAREJA MIXTA\n";
else if (black)
cout << "NEGRO SOLITARIO\n";
else if (grey)
cout << "GRIS SOLITARIO\n";
else
cout << "EMPAREJADOS\n";
cin >> i;
} while (i != '.');
}
|