Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main () {
- int nombre_partides;
- cin >> nombre_partides;
- for (int i=0; i<nombre_partides; ++i) {
- bool anna=false;
- bool bernat=false;
- vector<string> v(10);
- for (int j=0; j<10; ++j) cin >> v[j];
- for (int j=1; j<10 and not anna and not bernat; ++j) {
- if (v[j-1][v[j-1].size()-1] != v[j][0] and j%2==0) bernat=true;
- if (v[j-1][v[j-1].size()-1] != v[j][0] and j%2!=0) anna=true;
- }
- if (anna) cout << "A" << endl;
- else if (bernat) cout << "B" << endl;
- else cout << "=" << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement