結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
nak2yoshi
|
| 提出日時 | 2016-02-17 22:41:49 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 516 bytes |
| 記録 | |
| コンパイル時間 | 2,694 ms |
| コンパイル使用メモリ | 93,224 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-24 20:56:24 |
| 合計ジャッジ時間 | 1,485 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
import std.stdio,
std.conv,
std.string,
std.range,
std.algorithm;
void main()
{
auto N = readln.strip.to!int;
int[] A, B, C;
foreach (_; 0 .. N)
{
auto input = readln.split.to!(int[]);
A ~= input[0];
B ~= input[1];
C ~= input[2];
}
auto inventory = new int[11];
int ans;
chain(A, B, C).each!(item => inventory[item]++);
ans = inventory.map!"a/2".sum;
ans += inventory.map!"a%2".count!"a>0" / 4;
ans.writeln;
}
nak2yoshi