結果
| 問題 | No.3611 Omega Cat(Judging ver.) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-08-06 14:16:10 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 297 ms / 2,000 ms |
| + 737µs | |
| コード長 | 1,320 bytes |
| 記録 | |
| コンパイル時間 | 230 ms |
| コンパイル使用メモリ | 95,592 KB |
| 実行使用メモリ | 118,528 KB |
| 最終ジャッジ日時 | 2026-08-06 14:16:27 |
| 合計ジャッジ時間 | 6,907 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| サンプル | 0 % | AC * 1 |
| 小課題1 | 20 % | AC * 6 |
| 小課題2 | 40 % | AC * 19 |
| 小課題3 | 40 % | AC * 33 |
| 合計 | 1.5 * 100% = 150 点 |
ソースコード
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()
now = 0
f = False
if h[0] < h[1]:
print("No")
continue
while h[now] > h[now+1]:
now += 1
if now == n-1:
f = True
break
if f:
print("No")
continue
while h[now] < h[now+1]:
now += 1
if now == n-1:
f = True
break
if f:
print("No")
continue
while h[now] > h[now+1]:
now += 1
if now == n-1:
f = True
break
if f:
print("No")
continue
while h[now] < h[now+1]:
now += 1
if now == n-1:
f = True
break
if f:
print("Yes")
continue
print("No")