Run ID:123509

提交时间:2025-07-05 13:05:41

#include<bits/stdc++.h> using namespace std; int main() { int a1 = 0; int a2 = 0; int a3 = 0; int x; cin >> x; if (x == 1) { a1++; } if (x == 2) { a2++; } if (x == 3) { a3++; } int total = 1; while (x != -1) { total++; } if (x == 1) { a1++; } if (x == 2) { a2++; } if (x == 3) { a3++; } cout << "A=" << a1 << endl; cout << "b=" << a2 << endl; cout << "c=" << a3 << endl; cout << "Tot=" << total; if(a1*2>x){ cout<<"A-yes"; } if(a2*2>total){ cout<<"B-yes"; } if(a3*2>total){ cout<<"C-yes"; } if(a1*2<=total&&a2*2<=total&&a3*total){ cout<<"all-NO" } return 0; }