社区讨论
考场若只代码
P14360[CSP-J 2025] 多边形参与者 3已保存回复 5
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 5 条
- 当前快照
- 1 份
- 快照标识符
- @mhiyqg71
- 此快照首次捕获于
- 2025/11/03 17:54 4 个月前
- 此快照最后确认于
- 2025/11/03 17:54 4 个月前
我实在没招了,数学不太好
CPP#include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 5005;
int a[N];
int n;
signed main() {
ios::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
cin >> n;
int sum = 0, maxx = 0, ans = 0;
for (int i = 1; i <= n; i ++) {
cin >> a[i];
sum += a[i];
maxx = max(maxx, a[i]);
}
if (sum > maxx * 2) {
ans ++;
}
cout << ans;
}
成功拿下12pts
顺便问一下,GD242一等概率是否渺茫,50%有没有
回复
共 5 条回复,欢迎继续交流。
正在加载回复...