結果

問題 No.905 Sorted?
ユーザー master3821master3821
提出日時 2019-10-12 13:19:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 314 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 10,548 KB
実行使用メモリ 19,120 KB
最終ジャッジ日時 2023-08-18 14:01:30
合計ジャッジ時間 4,818 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
7,984 KB
testcase_01 AC 13 ms
7,760 KB
testcase_02 AC 13 ms
7,852 KB
testcase_03 AC 13 ms
7,824 KB
testcase_04 AC 14 ms
7,760 KB
testcase_05 AC 25 ms
8,584 KB
testcase_06 AC 16 ms
8,272 KB
testcase_07 AC 64 ms
9,192 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

def dec(a):
    if a == sorted(a,reverse=True):return 1
    else:return 0
    
def inc(a):
    if a == sorted(a):return 1
    else:return 0

N = int(input())
a = list(map(int,input().split()))
Q = int(input())
for _ in range(Q):
    b,c = map(int,input().split())
    targ = a[b:c+1]
    print(inc(targ),dec(targ))
0