結果
| 問題 |
No.2978 Lexicographically Smallest and Largest Subarray
|
| コンテスト | |
| ユーザー |
むつある
|
| 提出日時 | 2024-12-02 12:48:18 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 336 ms / 2,000 ms |
| コード長 | 285 bytes |
| コンパイル時間 | 317 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 90,216 KB |
| 平均クエリ数 | 1499.00 |
| 最終ジャッジ日時 | 2024-12-02 12:48:42 |
| 合計ジャッジ時間 | 21,536 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 57 |
ソースコード
n,q=map(int,input().split())
x=[]
for i in range(2,1001,2):
print('?',i-1,n,i,n)
v=input()=='1'
x+=[[i-v,i-(v^1)]]
a,b=x[0]
for i in range(1,500):
p,q=x[i]
print('?',a,a,p,p)
if input()=='0':
a=p
print('?',b,n,q,n)
if input()=='1':
b=q
print('!',a,a,b,n)
むつある