Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
132918 蒋雨翰 19选班长II C++ Wrong Answer 1 MS 268 KB 442 2025-10-12 16:34:49

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int a[5]; int main(){ int n,Tot,q; while(1){ cin>>q; if(q==-1)break; if(q>=1&&q<=3)a[q]++; Tot++; } printf("A=%d\n",a[1]); printf("B=%d\n",a[2]); printf("C=%d\n",a[3]); printf("Tot=%d\n",Tot); if(a[1]>Tot/2){ cout<<"A-yes"; } else if(a[2]>Tot/2){ cout<<"B-yes"; } else if(a[2]>Tot/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 Tot=4195108 all-NO