結果
問題 |
No.2710 How many more?
|
ユーザー |
|
提出日時 | 2024-03-31 14:38:29 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 287 bytes |
コンパイル時間 | 155 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 24,164 KB |
最終ジャッジ日時 | 2024-09-30 19:47:05 |
合計ジャッジ時間 | 3,905 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | TLE * 1 -- * 16 |
ソースコード
n, q = map(int, input().split()) a = list(map(int, input().split())) b = sorted(a, reverse=True) for i in range(q): x, y = map(int, input().split()) if b.index(a[y - 1]) - b.index(a[x - 1]) > 0: print(b.index(a[y - 1]) - b.index(a[x - 1]) - 1) else: print(0)