結果

問題 No.3069 Invisible Speedrun
ユーザー Nichi10p
提出日時 2025-03-21 22:28:41
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 650 bytes
コンパイル時間 2,353 ms
コンパイル使用メモリ 194,296 KB
実行使用メモリ 26,356 KB
平均クエリ数 586.38
最終ジャッジ日時 2025-03-21 22:28:57
合計ジャッジ時間 9,172 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 54 WA * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;
#define  rep(i, s, t) for (auto i=s; i != t; ++i)
#define rrep(i, s, t) for (auto i=t; i-- != s;)

int main() {
  int n, v;
  cin >> n;

  rep(i,0,n) {
    cout << 'D' << endl;
    cin >> v;
    if (v)
      return 0;
  }
  rep(j,0,n) {
    cout << 'R' << endl;
    cin >> v;
    if (v)
      return 0;
  }

  cout << 'U' << endl;
  cin >> v;
  if (v)
    return 0;
  cout << 'R' << endl;
  cin >> v;
  if (v)
    return 0;
  cout << 'R' << endl;
  cin >> v;
  if (v)
    return 0;
  cout << 'D' << endl;
  cin >> v;
  if (v)
    return 0;

  while (v == 0) {
    cout << 'R' << endl;
    cin >> v;
  }
}
0