結果
問題 | No.780 オフ会 |
ユーザー |
|
提出日時 | 2019-01-11 23:05:05 |
言語 | D (dmd 2.099.1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 862 bytes |
コンパイル時間 | 1,303 ms |
使用メモリ | 3,360 KB |
最終ジャッジ日時 | 2023-01-06 18:12:28 |
合計ジャッジ時間 | 2,641 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge10 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
3,360 KB |
testcase_01 | AC | 1 ms
3,352 KB |
testcase_02 | AC | 1 ms
3,328 KB |
testcase_03 | AC | 1 ms
3,232 KB |
testcase_04 | AC | 1 ms
3,280 KB |
testcase_05 | AC | 1 ms
3,184 KB |
testcase_06 | AC | 1 ms
3,224 KB |
testcase_07 | AC | 2 ms
3,228 KB |
testcase_08 | AC | 2 ms
3,304 KB |
testcase_09 | AC | 1 ms
3,276 KB |
testcase_10 | AC | 2 ms
3,352 KB |
testcase_11 | AC | 1 ms
3,324 KB |
testcase_12 | AC | 2 ms
3,344 KB |
testcase_13 | AC | 2 ms
3,344 KB |
testcase_14 | AC | 1 ms
3,308 KB |
testcase_15 | AC | 2 ms
3,304 KB |
testcase_16 | AC | 2 ms
3,224 KB |
testcase_17 | AC | 1 ms
3,316 KB |
testcase_18 | AC | 2 ms
3,236 KB |
testcase_19 | AC | 1 ms
3,296 KB |
testcase_20 | AC | 1 ms
3,280 KB |
testcase_21 | AC | 2 ms
3,296 KB |
testcase_22 | AC | 1 ms
3,232 KB |
ソースコード
import std.stdio, std.string, std.conv; import std.range, std.algorithm, std.array, std.typecons, std.container; import std.math, std.numeric, core.bitop; void main() { int a, b; scan(a, b); if (a + 1 <= b) { writeln("YES"); } else { writeln("NO"); } writeln(abs(a + 1 - b)); } void scan(T...)(ref T args) { import std.stdio : readln; import std.algorithm : splitter; import std.conv : to; import std.range.primitives; auto line = readln().splitter(); foreach (ref arg; args) { arg = line.front.to!(typeof(arg)); line.popFront(); } assert(line.empty); } void fillAll(R, T)(ref R arr, T value) { static if (is(typeof(arr[] = value))) { arr[] = value; } else { foreach (ref e; arr) { fillAll(e, value); } } }