結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
ococonomy1
|
| 提出日時 | 2018-12-22 01:10:36 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 510 bytes |
| 記録 | |
| コンパイル時間 | 273 ms |
| コンパイル使用メモリ | 70,504 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-15 22:10:23 |
| 合計ジャッジ時間 | 1,604 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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