結果
問題 |
No.29 パワーアップ
|
ユーザー |
|
提出日時 | 2023-08-27 20:39:48 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 320 bytes |
コンパイル時間 | 1,327 ms |
コンパイル使用メモリ | 77,880 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-28 03:38:06 |
合計ジャッジ時間 | 1,888 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <iostream> using namespace std; int main() { int n, a, b, c; cin >> n; int cnt[10]; for (int i = 0; i < 10; i++) cnt[i] = 0; while (n--) { cin >> a >> b >> c; cnt[--a]++; cnt[--b]++; cnt[--c]++; } int s = 0, t = 0; for (int i: cnt) { s += i / 2; t += i % 2; } cout << s + t / 4 << '\n'; }