結果
| 問題 |
No.2851 Make Pairs
|
| コンテスト | |
| ユーザー |
startcpp
|
| 提出日時 | 2024-08-25 14:17:20 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 60 ms / 2,000 ms |
| コード長 | 274 bytes |
| コンパイル時間 | 521 ms |
| コンパイル使用メモリ | 64,572 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-08-25 14:17:21 |
| 合計ジャッジ時間 | 1,307 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 |
ソースコード
#include <iostream>
#define rep(i, n) for(i = 0; i < n; i++)
using namespace std;
int n, cnt[200000];
int main() {
int i;
cin >> n;
rep(i, n) {
int x;
cin >> x;
cnt[x - 1]++;
}
int ans = 0;
rep(i, n) {
ans += cnt[i] / 2;
}
cout << ans << endl;
return 0;
}
startcpp