結果
| 問題 | No.3523 順路指定最近点 |
| コンテスト | |
| ユーザー |
ゼット
|
| 提出日時 | 2026-05-01 22:53:19 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 63 ms / 2,000 ms |
| コード長 | 363 bytes |
| 記録 | |
| コンパイル時間 | 181 ms |
| コンパイル使用メモリ | 85,760 KB |
| 実行使用メモリ | 71,968 KB |
| 平均クエリ数 | 9.69 |
| 最終ジャッジ日時 | 2026-05-01 22:53:26 |
| 合計ジャッジ時間 | 4,644 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 26 |
ソースコード
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)
h.sort()
print(*h)
ans,pos=map(int,input().split())
if ans==-1:
print('!',-1,flush=True)
exit()
if pos==N:
print('!',ans,flush=True)
exit()
h.append(pos)
ゼット