結果

問題 No.3523 順路指定最近点
コンテスト
ユーザー ゼット
提出日時 2026-05-01 22:51:01
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
RE  
実行時間 -
コード長 351 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 169 ms
コンパイル使用メモリ 85,248 KB
実行使用メモリ 85,920 KB
平均クエリ数 8.92
最終ジャッジ日時 2026-05-01 22:51:15
合計ジャッジ時間 9,354 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 RE * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N=int(input())
if N==2:
  print('?',1,flush=True)
  print(1)
  ans,pos=map(int,input().split())
  print('!',ans,flush=True)
  exit()
h=[1]
while True:
  print('?',len(h),flush=True)
  print(*h)
  ans,pos=map(int,input().split())
  if ans==-1:
    print('!',-1,flush=True)
    exit()
  if pos==N:
    print('!',ans,flush=Tru)
    exit()
  h.append(pos)
0