結果

問題 No.905 Sorted?
ユーザー master3821master3821
提出日時 2019-10-12 13:16:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 314 bytes
コンパイル時間 484 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 9,228 KB
最終ジャッジ日時 2023-08-18 13:55:07
合計ジャッジ時間 4,717 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,896 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
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 inc(a):
    if a == sorted(a,reverse=True):return 1
    else:return 0
    
def dec(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