社区讨论
哪里错了?
P10292[CCC 2024 J3] Bronze Count参与者 2已保存回复 1
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 1 条
- 当前快照
- 1 份
- 快照标识符
- @lujti9dj
- 此快照首次捕获于
- 2024/04/03 21:02 2 年前
- 此快照最后确认于
- 2024/04/04 08:10 2 年前
CPP
#include <bits/stdc++.h>
using namespace std;
int n,x,a[81],top=3;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cin>>n;
for(int i=0;i<n;i++)
{
cin>>x;
a[x]++;
}
for(int i=75;i>=0;i--)
{
if(a[i]>0)
{
if(top>1) top--;
else if(top==1)
{
cout<<i<<endl<<a[i];
return 0;
}
}
}
}
回复
共 1 条回复,欢迎继续交流。
正在加载回复...