結果
| 問題 | No.2710 How many more? | 
| コンテスト | |
| ユーザー |  Michirakara | 
| 提出日時 | 2024-03-31 13:51:42 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 233 bytes | 
| コンパイル時間 | 395 ms | 
| コンパイル使用メモリ | 82,240 KB | 
| 実行使用メモリ | 123,320 KB | 
| 最終ジャッジ日時 | 2024-09-30 18:30:34 | 
| 合計ジャッジ時間 | 6,523 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 5 WA * 12 | 
ソースコード
n,q=map(int,input().split()) a=[*map(int,input().split())] dists=sorted(set(a)) dic=dict() for i in range(len(dists)): dic[dists[i]]=i for _ in range(q): x,y=map(int,input().split()) x-=1 y-=1 print(max(0,dic[a[x]]-dic[a[y]]-1))
