結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
hanorver
|
| 提出日時 | 2015-09-07 19:04:54 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 366 bytes |
| 記録 | |
| コンパイル時間 | 403 ms |
| コンパイル使用メモリ | 60,792 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-24 20:54:24 |
| 合計ジャッジ時間 | 1,259 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include<iostream>
int main() {
int n, items[10]={0};
std::cin >> n;
for (int i = 0; i < n * 3; i++) {
int num;
std::cin >> num;
items[num - 1]++;
}
int powerup_count = 0;
int d = 0;
for (int i = 0; i < 10; i++) {
powerup_count += items[i] / 2;
d += items[i] % 2;
}
powerup_count += d / 4;
std::cout << powerup_count << std::endl;
return 0;
}
hanorver