|
|
back to boardstupid answer c++ #include <iostream> #include <string> using namespace std; int main(int argc, char* argv[]) { int co1=0,co2=0,co3=0,c=0; //init //1 cin >> co1; int *nm1 = new int[co1]; for (int i = 0; i < co1; i++) { cin >> nm1[i]; } //2 cin >> co2; int *nm2 = new int[co2]; for (int i = 0; i < co2; i++) { cin >> nm2[i]; } //3 cin >> co3; int *nm3 = new int[co3]; for (int i = 0; i < co3; i++) { cin >> nm3[i]; } for(int i=0;i<co1;i++) { for(int k=0;k<co2;k++) { if(nm1[i]==nm2[k]) { for(int j=0;j<co3;j++) { if(nm2[k]==nm3[j]) { c++; break; } } break; } } } cout << c; system("pause"); return 0; } |
|
|