結果
| 問題 |
No.3347 Guess The Array
|
| コンテスト | |
| ユーザー |
回転
|
| 提出日時 | 2025-11-14 02:58:31 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 638 bytes |
| コンパイル時間 | 246 ms |
| コンパイル使用メモリ | 82,032 KB |
| 実行使用メモリ | 96,532 KB |
| 平均クエリ数 | 4059.11 |
| 最終ジャッジ日時 | 2025-11-14 02:58:57 |
| 合計ジャッジ時間 | 25,805 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 RE * 12 |
ソースコード
from collections import defaultdict
N = int(input())
memo = defaultdict(str)
ans = []
for i in range(1,N+1):
count = 1
while(True):
print("?",count,*[i]*count)
yn = input()
if(yn == "Yes"):
count += 1
else:
count -= 1
break
for c in range(1,count+1):
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
ans.insert(ok,i)
print("!",*ans)
回転