結果
| 問題 |
No.29 パワーアップ
|
| コンテスト | |
| ユーザー |
ococonomy1
|
| 提出日時 | 2018-12-22 01:10:36 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 510 bytes |
| コンパイル時間 | 447 ms |
| コンパイル使用メモリ | 60,276 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-10-24 21:08:28 |
| 合計ジャッジ時間 | 1,271 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 17 |
ソースコード
#include <iostream>
#define test cout << "test";
using namespace std;
int main(void){
int item[9],temp;
cin >> temp;
const int num = temp;
for(int i = 0; i < 9; i++)item[i] = 0;
for(int i = 0; i < num; i++){
for(int j = 0; j < 3; j++){
cin >> temp;
item[temp - 1]++;
}
}
int count = 0;
temp = 0;
for(int i = 0; i < 9; i++){
while(item[i] >= 2){
count++;
item[i] -= 2;
}
if(item[i] == 1)temp++;
}
cout << count + temp / 4 << endl;
return 0;
}
ococonomy1