結果
問題 |
No.2851 Make Pairs
|
ユーザー |
|
提出日時 | 2024-08-25 17:30:54 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 21 ms / 2,000 ms |
コード長 | 498 bytes |
コンパイル時間 | 1,818 ms |
コンパイル使用メモリ | 140,036 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-08-25 17:30:56 |
合計ジャッジ時間 | 2,679 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 8 |
ソースコード
#pragma GCC optimize("O2") #ifdef local #include <C++/core/io/debug_print.hpp> #else #define dump(...) void(0); #endif #include <iostream> #include <valarray> #include <ranges> namespace man { } int main() { std::cin.tie(nullptr) -> sync_with_stdio(false); int n; std::cin >> n; std::valarray<int> cnt(n + 1); for([[maybe_unused]] const auto _: std::views::iota(0, n)) { int a; std::cin >> a; cnt[a]++; } std::cout << (cnt / 2).sum() << '\n'; }