結果
| 問題 | No.3216 Slightly Strong Fairies |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-08-01 21:44:00 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 185µs | |
| コード長 | 787 bytes |
| 記録 | |
| コンパイル時間 | 908 ms |
| コンパイル使用メモリ | 160,996 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-13 16:44:48 |
| 合計ジャッジ時間 | 2,150 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 |
ソースコード
#include <iostream>
#include <cstdint>
#include <vector>
static inline constexpr uint_fast32_t prepare(const uint_fast32_t N, const std::vector<uint_fast32_t>& A) noexcept
{
uint_fast32_t ans = 0;
for (uint_fast32_t i = 0; i != N; ++i)
ans += A[i];
return ans / N;
}
static inline constexpr uint_fast32_t solve(const uint_fast32_t N, const std::vector<uint_fast32_t>& A) noexcept
{
const uint_fast32_t ave = prepare(N, A);
uint_fast32_t ans = 0;
for (uint_fast32_t i = 0; i != N; ++i)
if (A[i] >= ave + 100)
++ans;
return ans;
}
int main()
{
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
uint_fast32_t N, i;
std::cin >> N;
std::vector<uint_fast32_t> A(N);
for (i = 0; i != N; ++i)
std::cin >> A[i];
std::cout << solve(N, A) << '\n';
return 0;
}