結果
| 問題 |
No.2851 Make Pairs
|
| コンテスト | |
| ユーザー |
SnowBeenDiding
|
| 提出日時 | 2024-08-25 13:32:46 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 62 ms / 2,000 ms |
| コード長 | 361 bytes |
| コンパイル時間 | 2,874 ms |
| コンパイル使用メモリ | 245,000 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-08-25 13:32:50 |
| 合計ジャッジ時間 | 3,482 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 |
ソースコード
#include <bits/stdc++.h>
#define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
vector<int> ct(n + 1);
int ans = 0;
rep(i, 0, n) {
int x;
cin >> x;
ct[x]++;
if (ct[x] % 2 == 0)
ans++;
}
cout << ans << endl;
}
SnowBeenDiding