#include #include #include #include // cout #include // find #include // vector #include using namespace std; int findsame(char ip,char com[]){ int lengt; lengt = sizeof(com); for (int i = 0; i d1[11]; char common[11]; int *p; int *q; int oi = 0; int budeng; scanf("%d",&num); for (int i = 0;ibegin(),d1->end(),resu[k][oi]); if (p !=d1->end){ continue; } else{ d1->push_back(resu[k][oi]) } oi++; } for (int secp = 5;secp < 9;secp++){ p = find(d1->begin(),d1->end(),resu[k][secp]); if (p !=d1->end){ continue; } else{ d1->push_back(resu[k][secp]) } } } else{ budeng = k; continue; } } } for (int fp = 0;fp<4;fp++){ q = find(d1->begin(),d1->end(),resu[budeng][fp]); if (q != d1->end){ if(resu[budeng][9] == 'u'){ printf('%c is the counterfeit coin and it is light.',resu[budeng][fp]); } else{ printf('%c is the counterfeit coin and it is heavy.',resu[budeng][fp]); } break; } } for (int fp1 = 5;fp1<9;fp1++){ q = find(d1->begin(),d1->end(),resu[budeng][fp1]); if (q != d1->end){ if(resu[budeng][9] == 'u'){ printf('%c is the counterfeit coin and it is heavy.',resu[budeng][fp1]); } else{ printf('%c is the counterfeit coin and it is light.',resu[budeng][fp1]); } break; } } }