結果
| 問題 |
No.2978 Lexicographically Smallest and Largest Subarray
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-12-02 16:12:30 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 340 ms / 2,000 ms |
| コード長 | 256 bytes |
| コンパイル時間 | 371 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 90,880 KB |
| 平均クエリ数 | 1501.00 |
| 最終ジャッジ日時 | 2024-12-02 16:12:53 |
| 合計ジャッジ時間 | 21,577 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 57 |
ソースコード
t=int;u=input;N,Q=map(t,u().split());k=lambda x,y:print("?",x,N,y,N);m=1;a=1;
for i in range(0,N,2):
k(p:=i+1,q:=i+2)
if t(u()):
k(a,q)
if t(u()):a=q
k(p,m)
if t(u()):m=p
else:
k(a,p)
if t(u()):a=p
k(q,m)
if t(u()):m=q
print("!",m,m,a,N)