結果

問題 No.2710 How many more?
ユーザー Meso Meso
提出日時 2024-05-21 09:08:55
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 256 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 37,684 KB
最終ジャッジ日時 2024-12-20 18:05:29
合計ジャッジ時間 49,598 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 1 TLE * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

n, q = map(int, input().split())
A = list(map(int, input().split()))

for i in range(q):
    cnt = 0
    x, y = map(int, input().split())
    a = A[x-1]
    b = A[y-1]
    for j in range(len(A)):
        if b < A[j] < a:
            cnt += 1
    print(cnt)
0