結果
問題 | No.513 宝探し2 |
ユーザー | te-sh |
提出日時 | 2018-01-24 16:51:59 |
言語 | D (dmd 2.106.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 607 bytes |
コンパイル時間 | 912 ms |
コンパイル使用メモリ | 85,608 KB |
実行使用メモリ | 24,168 KB |
平均クエリ数 | 2.92 |
最終ジャッジ日時 | 2023-09-03 18:14:42 |
合計ジャッジ時間 | 2,911 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 29 ms
23,292 KB |
testcase_01 | AC | 24 ms
23,340 KB |
testcase_02 | AC | 25 ms
24,168 KB |
testcase_03 | AC | 25 ms
23,916 KB |
testcase_04 | AC | 24 ms
23,340 KB |
testcase_05 | AC | 24 ms
23,352 KB |
testcase_06 | AC | 24 ms
23,556 KB |
testcase_07 | AC | 23 ms
23,340 KB |
testcase_08 | RE | - |
testcase_09 | AC | 23 ms
23,592 KB |
testcase_10 | AC | 24 ms
23,448 KB |
testcase_11 | AC | 25 ms
23,448 KB |
ソースコード
import std.algorithm, std.conv, std.range, std.stdio, std.string; void readV(T...)(ref T t){auto r=readln.splitter;foreach(ref v;t){v=r.front.to!(typeof(v));r.popFront;}} T[] readArray(T)(size_t n){auto a=new T[](n),r=readln.splitter;foreach(ref v;a){v=r.front.to!T;r.popFront;}return a;} T[] readArrayM(T)(size_t n){auto a=new T[](n);foreach(ref v;a)v=readln.chomp.to!T;return a;} void main() { auto m = 100000; auto a = ask(0, 0), b = ask(m, 0); writeln((a-b+m)/2, " ", (a+b-m)/2); stdout.flush(); } auto ask(int x, int y) { writeln(x, " ", y); stdout.flush(); int d; readV(d); return d; }