結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
hogeover30
|
| 提出日時 | 2015-01-29 02:08:58 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| + 311µs | |
| コード長 | 405 bytes |
| 記録 | |
| コンパイル時間 | 288 ms |
| コンパイル使用メモリ | 74,724 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-15 21:25:42 |
| 合計ジャッジ時間 | 1,555 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int n;
while (cin>>n) {
int v[11]={};
while (n--) {
int a, b, c; cin>>a>>b>>c;
++v[a], ++v[b], ++v[c];
}
int res=0, x=0;
for(int i=1;i<=10;++i) {
res+=v[i]/2;
x+=(v[i]%=2);
}
res+=x/4;
cout<<res<<endl;
}
}
hogeover30