結果
問題 | No.29 パワーアップ |
ユーザー |
![]() |
提出日時 | 2015-09-07 19:04:54 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 366 bytes |
コンパイル時間 | 406 ms |
コンパイル使用メモリ | 54,360 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-19 04:53:45 |
合計ジャッジ時間 | 1,276 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; }