結果
| 問題 |
No.2978 Lexicographically Smallest and Largest Subarray
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-12-02 15:58:38 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 387 bytes |
| コンパイル時間 | 312 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 83,040 KB |
| 平均クエリ数 | 1.00 |
| 最終ジャッジ日時 | 2024-12-02 15:58:53 |
| 合計ジャッジ時間 | 12,031 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 57 |
ソースコード
N,Q=map(int,input().split());s=[];l=[]
for i in range(0,N,2):
print("?",i+1,N,i+2,N)
res=input()
if res=="0":
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,i,N)
res=input()
if res=="0":
sm=i
la=large[0]
for i in large:
print("?",la,N,i,N)
res=input()
if res=="1":
la=i
print("!",sm,sm,la,N)