Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
105769 | 冯俊淞 | 19选班长II | C++ | Wrong Answer | 1 MS | 308 KB | 556 | 2025-01-14 13:56:05 |
#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; }
------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