結果
問題 | No.2851 Make Pairs |
ユーザー |
![]() |
提出日時 | 2024-08-25 13:34:09 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 64 ms / 2,000 ms |
コード長 | 300 bytes |
コンパイル時間 | 1,810 ms |
コンパイル使用メモリ | 194,760 KB |
最終ジャッジ日時 | 2025-02-24 00:47:27 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 8 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main() {int n;cin >> n;vector<int> cnt(200010);for (int i = 0; i < n; i++) {int a;cin >> a;cnt[a]++;}int ans = 0;for (int x : cnt) {ans += x / 2;}cout << ans << endl;}