結果
| 問題 |
No.2851 Make Pairs
|
| コンテスト | |
| ユーザー |
manabeai
|
| 提出日時 | 2024-08-25 13:42:25 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 387 bytes |
| コンパイル時間 | 3,508 ms |
| コンパイル使用メモリ | 282,720 KB |
| 実行使用メモリ | 17,408 KB |
| 最終ジャッジ日時 | 2024-08-25 13:42:36 |
| 合計ジャッジ時間 | 4,708 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve() {
ll n;
cin >> n;
vector<ll> A(n);
for (ll i = 0; i < n; ++i) cin >> A[i];
map<ll,ll> mp;
for (ll i = 0; i < n; ++i) mp[A[i]]++;
ll ans = 0;
for (auto m : mp) {
ans += m.second / 2;
}
cout << ans << endl;
}
int main() {
solve();
return 1;
}
manabeai