結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
t_murano
|
| 提出日時 | 2014-11-25 18:04:28 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| + 310µs | |
| コード長 | 483 bytes |
| 記録 | |
| コンパイル時間 | 300 ms |
| コンパイル使用メモリ | 78,048 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-15 21:23:57 |
| 合計ジャッジ時間 | 1,553 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:12:9: warning: 'up' is used uninitialized [-Wuninitialized]
12 | int up, tmp;
| ^~
main.cpp:12:13: warning: 'tmp' is used uninitialized [-Wuninitialized]
12 | int up, tmp;
| ^~~
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;
int items[11];
int main() {
int n;
int a, b, c;
int up, tmp;
cin >> n;
REP(i, n) {
cin >> a >> b >> c;
items[a]++;
items[b]++;
items[c]++;
}
REP(i, 11) {
up += items[i] / 2;
tmp += items[i] % 2;
}
up += tmp / 4;
cout << up << endl;
return 0;
}
t_murano