結果
| 問題 | No.3611 Omega Cat(Judging ver.) |
| コンテスト | |
| ユーザー |
mocchi
|
| 提出日時 | 2026-08-06 14:19:53 |
| 言語 | C++23(gnu拡張gcc16) (gcc 16.1.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,010 bytes |
| 記録 | |
| コンパイル時間 | 2,252 ms |
| コンパイル使用メモリ | 352,672 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-06 14:19:59 |
| 合計ジャッジ時間 | 5,468 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| サンプル | 0 % | AC * 1 |
| 小課題1 | 20 % | WA * 6 |
| 小課題2 | 40 % | AC * 7 WA * 12 |
| 小課題3 | 40 % | AC * 16 WA * 17 |
| 合計 | 1.5 * 0% = 0 点 |
ソースコード
#include <cassert>
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
constexpr int inf = 2e9;
/*
#include <atcoder/all>
using namespace atcoder;
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/math/common_factor_rt.hpp>
namespace mp = boost::multiprecision;
*/
using ll = long long;
int main()
{
int T;
cin >> T;
while (T--)
{
int N;
cin >> N;
vector H(N,0);
rep(i,N) cin >> H[i];
int phase = 0;
for (int i = 0; i < N - 1; i++)
{
if (H[i] == H[i + 1])
{
cout << "No" << endl;
goto a;
}
if (phase % 2 == 0)
{
if (H[i] < H[i + 1]) phase++;
}
if (phase % 2 == 1)
{
if (H[i] > H[i + 1]) phase++;
}
}
if (phase == 3) cout << "Yes" << "\n";
else cout << "No" << "\n";
a:
}
}
mocchi