結果
問題 |
No.2978 Lexicographically Smallest and Largest Subarray
|
ユーザー |
|
提出日時 | 2024-12-02 14:49:39 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 409 bytes |
コンパイル時間 | 653 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 89,736 KB |
平均クエリ数 | 501.00 |
最終ジャッジ日時 | 2024-12-02 14:49:58 |
合計ジャッジ時間 | 18,605 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 57 |
ソースコード
N,Q=map(int,input().split()) small=[] large=[] for i in range(0,N,2): print("?",i+1,N-1,i+2,N-1) res=input() if res=="1": large.append(i+1) small.append(i+2) else: large.append(i+2) small.append(i+1) sm=small[0] for i in small: print("?",sm,N-1,i,N-1) res=input() if res=="1": sm=i la=large[0] for i in large: print("?",la,N-1,i,N-1) res=input() if res=="0": la=i print("!",sm,sm,la,N-1)