結果

問題 No.878 Range High-Element Query
ユーザー SchneeSchnee
提出日時 2019-10-30 19:43:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 542 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 10,868 KB
実行使用メモリ 8,376 KB
最終ジャッジ日時 2023-10-12 23:52:08
合計ジャッジ時間 7,827 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,820 KB
testcase_01 AC 313 ms
7,812 KB
testcase_02 AC 805 ms
8,376 KB
testcase_03 AC 222 ms
8,208 KB
testcase_04 AC 457 ms
7,976 KB
testcase_05 AC 318 ms
7,840 KB
testcase_06 AC 51 ms
7,728 KB
testcase_07 AC 43 ms
7,824 KB
testcase_08 AC 604 ms
7,884 KB
testcase_09 AC 792 ms
7,892 KB
testcase_10 AC 32 ms
7,788 KB
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

class No878:
    def get_date(self):
        return list(map(int,input().split()))
    
    def count_highest(self,x):
        k = 1
        for i in range(1,len(x)):
            if x[i] > max(x[:i]):
                k += 1
        print(k)
    
    def solve(self):
        n, q = self.get_date()
        a = self.get_date()
        for _ in range(q):
            query = self.get_date()
            l, r = query[1:]
            b = a[l - 1: r]
            self.count_highest(b)


if __name__ == "__main__":
    pro = No878()
    pro.solve()
0