Run ID:126912

提交时间:2025-07-22 14:24:42

#include<bits/stdc++.h> using namespace std; int main() { int b[4], a = 0, b1 = 0, c = 0; for (int i = 1; i < 4; i++) { b[i] = 0; } int tot=0; for (;;) { int x; cin >> x; if (x == -1) { break; }else{ tot++; } if (x == 1) { a++; } if (x == 2) { b1++; } if (x == 3) { c++; } } cout << "A=" << a << endl << "B=" << b1 << endl << "C=" << c << endl << "Tot=" << tot << endl; if (a * 2 > tot) { cout << "A-yes"; } else if (b1 * 2 > tot) { cout << "B-yes"; } else if (c * 2 > tot) { cout << "C-yes"; } else { cout << "all-NO"; } return 0; }