結果
| 問題 | No.3611 Omega Cat(Judging ver.) |
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2026-08-09 15:58:14 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 17 ms / 2,000 ms |
| + 671µs | |
| コード長 | 941 bytes |
| 記録 | |
| コンパイル時間 | 182 ms |
| コンパイル使用メモリ | 52,780 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-09 15:58:17 |
| 合計ジャッジ時間 | 2,976 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| サンプル | 0 % | AC * 1 |
| 小課題1 | 20 % | AC * 6 |
| 小課題2 | 40 % | AC * 19 |
| 小課題3 | 40 % | AC * 33 |
| 合計 | 1.5 * 100% = 150 点 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 3611.cc: No.3611 Omega Cat・・udging ver.・・- yukicoder
*/
#include<cstdio>
#include<algorithm>
using namespace std;
/* constant */
const int MAX_N = 200000;
/* typedef */
/* global variables */
int hs[MAX_N];
/* subroutines */
/* main */
int main() {
int tn;
scanf("%d", &tn);
while (tn--) {
int n;
scanf("%d", &n);
for (int i = 0; i < n; i++) scanf("%d", hs + i);
int x = 0;
while (x + 1 < n && hs[x] > hs[x + 1]) x++;
if (x <= 0 || x >= n - 1) { puts("No"); continue; }
int y = x;
while (y + 1 < n && hs[y] < hs[y + 1]) y++;
if (y <= x || y >= n - 1) { puts("No"); continue; }
int z = y;
while (z + 1 < n && hs[z] > hs[z + 1]) z++;
if (z <= y || z >= n - 1) { puts("No"); continue; }
int w = z;
while (w + 1 < n && hs[w] < hs[w + 1]) w++;
if (w != n - 1) { puts("No"); continue; }
puts("Yes");
}
return 0;
}
tnakao0123