結果
| 問題 |
No.3069 Invisible Speedrun
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-21 22:50:07 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
AC
|
| 実行時間 | 84 ms / 2,000 ms |
| コード長 | 615 bytes |
| コンパイル時間 | 1,079 ms |
| コンパイル使用メモリ | 162,644 KB |
| 実行使用メモリ | 26,308 KB |
| 平均クエリ数 | 585.15 |
| 最終ジャッジ日時 | 2025-03-21 22:50:18 |
| 合計ジャッジ時間 | 8,977 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge7 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 80 |
ソースコード
import std;
void main () {
int N = readln.chomp.to!int;
// ジグザグで通りそう
auto command = new byte[](2 * N);
foreach (i; 0 .. N) {
command[2 * i] = 'R';
command[2 * i + 1] = 'D';
}
foreach (c; command) {
writeln(c.to!char);
stdout.flush;
int v = readln.chomp.to!int;
if (v == 1) return;
if (v == -1) return;
}
}
void read (T...) (string S, ref T args) {
import std.conv : to;
import std.array : split;
auto buf = S.split;
foreach (i, ref arg; args) {
arg = buf[i].to!(typeof(arg));
}
}