結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
kokatsu
|
| 提出日時 | 2022-09-21 22:15:39 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 377 bytes |
| 記録 | |
| コンパイル時間 | 3,428 ms |
| コンパイル使用メモリ | 196,808 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-24 21:18:43 |
| 合計ジャッジ時間 | 4,197 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
import std;
void main() {
int N;
readf("%d\n", N);
auto cnts = new int[](11);
foreach (_; 0 .. N) {
int a, b, c;
readf("%d %d %d\n", a, b, c);
++cnts[a], ++cnts[b], ++cnts[c];
}
int res;
foreach (ref cnt; cnts) {
int d = cnt / 2;
res += d, cnt -= d * 2;
}
res += cnts.sum / 4;
res.writeln;
}
kokatsu