Run ID:126908

提交时间:2025-07-22 14:21:12

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