結果

問題 No.905 Sorted?
ユーザー master3821
提出日時 2019-10-12 13:16:34
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 314 bytes
コンパイル時間 263 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 42,208 KB
最終ジャッジ日時 2024-11-27 19:24:59
合計ジャッジ時間 28,662 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3 WA * 12 TLE * 8
権限があれば一括ダウンロードができます

ソースコード

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