結果

問題 No.3347 Guess The Array
コンテスト
ユーザー 回転
提出日時 2025-11-14 02:50:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 574 bytes
コンパイル時間 422 ms
コンパイル使用メモリ 82,152 KB
実行使用メモリ 95,164 KB
平均クエリ数 4055.89
最終ジャッジ日時 2025-11-14 02:50:45
合計ジャッジ時間 23,162 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 31 RE * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

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 _ in range(count):
        ok,ng = 0,len(ans)+1
        while(ng - ok > 1):
            mid = (ok+ng)//2
            now = ans[:mid+1] + [i]
            print("?",len(now),*now)
            if(input() == "Yes"):
                ok = mid
            else:
                ng = mid
        ans.insert(ok,i)
print("!",*ans)
0