結果
| 問題 |
No.29 パワーアップ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-03 10:44:04 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 388 bytes |
| コンパイル時間 | 460 ms |
| コンパイル使用メモリ | 98,256 KB |
| 最終ジャッジ日時 | 2025-10-24 21:04:42 |
| 合計ジャッジ時間 | 708 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
/home/linuxbrew/.linuxbrew/opt/dmd/include/dlang/dmd/std/algorithm/iteration.d(974): Error: template `__lambda5` is not callable using argument types `!()(int, uint)`
Main.d(7): Candidate is: `__lambda5(__T2)(x)`
Main.d(7): Error: template instance `Main.main.each!(Group!("a == b", SortedRange!(int[], "a < b", SortedRangeOptions.assumeSorted)))` error instantiating
ソースコード
import std.stdio, std.string, std.conv, std.algorithm, std.numeric;
import std.range, std.array, std.math, std.typecons, std.container, core.bitop;
void main() {
int n = readln.chomp.to!int;
int level, amari;
iota(n).map!(i => readln.split.to!(int[])).array.joiner.array.sort().group.each!(x => (level += x[1]/2, amari += x[1]%2));
level += amari/4;
writeln(level);
}