ASKukaev
Apr 12th, 2023
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     string Color[4];
  7.     int N[4];
  8.     int i;
  9.     cin >> Color[0] >> N[0];
  10.     cin >> Color[1] >> N[1];
  11.     cin >> Color[2] >> N[2];
  12.     cin >> Color[3] >> N[3];
  13.     for (i=0; i<=2; i++) {
  14.         if (((N[i]==N[3])||(N[3]<0)) && ((Color[i]==Color[3])||(Color[3]=="?"s)))
  15.             cout << i+1 << endl;
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment