結果
問題 |
No.878 Range High-Element Query
|
ユーザー |
![]() |
提出日時 | 2019-10-30 16:38:17 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 581 bytes |
コンパイル時間 | 82 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 29,584 KB |
最終ジャッジ日時 | 2024-09-14 21:54:03 |
合計ジャッジ時間 | 5,010 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 10 TLE * 1 -- * 7 |
ソースコード
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()