結果

問題 No.3611 Omega Cat(Judging ver.)
コンテスト
ユーザー ルク
提出日時 2026-08-06 14:10:04
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 911 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 229 ms
コンパイル使用メモリ 95,848 KB
実行使用メモリ 118,272 KB
最終ジャッジ日時 2026-08-06 14:10:12
合計ジャッジ時間 6,832 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
サブタスク 配点 結果
サンプル 0 % AC * 1
小課題1 20 % AC * 6
小課題2 40 % AC * 17 WA * 2
小課題3 40 % AC * 27 WA * 6
合計 1.5 * 20% = 30 点
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from itertools import permutations
from bisect import bisect_left, bisect_right
import random
import math
from collections import deque
from collections import Counter
from collections import defaultdict
inf = 1 << 60


def sgn(x):
    if x > 0:
        return 1
    elif x == 0:
        return 0
    else:
        return -1


def popC(x):
    ans = 0
    while x != 0:
        ans += x % 2
        x //= 2
    return ans


def LI():
    return list(map(int, input().split()))


def II():
    return int(input())


def SI():
    return input()


t = II()
for _ in range(t):
    n = II()
    h = LI()
    f = True
    cnt = 0
    for i in range(n-1):
        if not f:
            if h[i] < h[i+1]:
                cnt += 1
                f = True
        else:
            if h[i] > h[i+1]:
                cnt += 1
                f = False
    if cnt == 4:
        print("Yes")
    else:
        print("No")
0