結果
問題 |
No.29 パワーアップ
|
ユーザー |
![]() |
提出日時 | 2020-01-15 03:55:08 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 259 bytes |
コンパイル時間 | 1,840 ms |
コンパイル使用メモリ | 166,284 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 20:47:33 |
合計ジャッジ時間 | 2,569 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; int N, a, b, c, i, x, y, I[11] = {}; int main() { cin >> N; while (N-- && cin >> a >> b >> c) I[a]++, I[b]++, I[c]++; for (int i = 1; i < 11; i++) x += I[i] / 2, y += I[i] % 2; cout << x + y / 4 << "\n"; }