結果
| 問題 |
No.3347 Guess The Array
|
| コンテスト | |
| ユーザー |
回転
|
| 提出日時 | 2025-11-14 03:11:17 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 684 ms / 2,000 ms |
| コード長 | 584 bytes |
| コンパイル時間 | 331 ms |
| コンパイル使用メモリ | 82,772 KB |
| 実行使用メモリ | 96,008 KB |
| 平均クエリ数 | 3924.07 |
| 最終ジャッジ日時 | 2025-11-14 03:11:44 |
| 合計ジャッジ時間 | 25,937 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 46 |
ソースコード
from collections import defaultdict
N = int(input())
memo = defaultdict(str)
ans = []
for i in range(1,N+1):
pos = []
for c in range(1,N+1):
print("?",c,*[i]*c)
yn = input()
if(yn == "No"):break
ok,ng = 0,len(ans)+1
while(ng - ok > 1):
mid = (ok+ng)//2
now = ans[:mid] + [i]*c
print("?",len(now),*now)
if(input() == "Yes"):
ok = mid
else:
ng = mid
pos.append(ok)
for p in pos:
ans.insert(p,i)
print("!",*ans)
回転