Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
126894 冯俊淞 19选班长II C++ Wrong Answer 1 MS 272 KB 622 2025-07-22 14:08:36

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int A = 0, B = 0, C = 0, count_1 = 0; for (int i = 1; i < 10000; i++) { int a; cin >> a; if (a == -1) { break; } count_1++; 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" << count_1 << endl; if (A > count_1 / 2) { cout << "A-yes"; } else if (B>count_1/2) { cout << "B-yes"; } else if (C>count_1/2) { cout << "C-yes"; } else { cout << "all-no"; } return 0; }


Run Info:

------Input------
4 3 4 2 1 3 1 4 1 4 1 2 1 3 3 1 3 4 3 1 4 4 4 4 4 4 4 4 1 1 4 4 1 2 4 3 4 2 1 2 1 3 3 3 -1
------Answer-----
A=12 B=5 C=10 Tot=44 all-NO
------Your output-----
A=12 B=5 C=10 Tot44 all-no