Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
105783 张永良 19选班长II C++ Wrong Answer 1 MS 312 KB 560 2025-01-14 14:09:30

Tests(0/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int x=0,c=0,b=0,n=0; cin>>n; int a[10086]={}; for(int z=1;z<=3*n;z++) { cin>>x; a[x]++; } for(int z=1;z<=n;z++) { if(a[z]>b) { b=a[z]; c=z; } } cout<<c; 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-----
1