結果

問題 No.878 Range High-Element Query
ユーザー SchneeSchnee
提出日時 2019-10-30 16:38:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 581 bytes
コンパイル時間 669 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 21,876 KB
最終ジャッジ日時 2023-10-12 23:50:06
合計ジャッジ時間 5,861 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,836 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
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] > x[i - 1]:
                k += 1
            else:
                break
        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