結果
| 問題 | No.3611 Omega Cat(Judging ver.) |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2026-09-22 04:59:50 |
| 言語 | Rust (1.97.1 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 39 ms / 2,000 ms |
| + 638µs | |
| コード長 | 1,062 bytes |
| 記録 | |
| コンパイル時間 | 3,611 ms |
| コンパイル使用メモリ | 198,324 KB |
| 実行使用メモリ | 9,916 KB |
| 最終ジャッジ日時 | 2026-09-22 04:59:58 |
| 合計ジャッジ時間 | 7,394 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge4_0 |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| サンプル | 0 % | AC * 1 |
| 小課題1 | 20 % | AC * 6 |
| 小課題2 | 40 % | AC * 19 |
| 小課題3 | 40 % | AC * 33 |
| 合計 | 1.5 * 100% = 150 点 |
ソースコード
#![allow(non_snake_case, unused_imports)]
use std::collections::{BinaryHeap, HashMap, HashSet};
use proconio::{input, marker::Usize1, marker::Chars};
use itertools::Itertools;
#[allow(unused_macros)]
macro_rules! d {
( $( $x:expr ),* $(,)? ) => {
eprintln!(
concat!( $( stringify!($x), "={:?} " ),* ),
$( $x ),*
);
};
}
#[allow(dead_code)]
fn yn(b: bool) -> &'static str {
if b { "Yes" } else { "No" }
}
fn solve() -> bool {
input! {
N: usize,
H: [i64; N],
}
#[derive(Debug, PartialEq, Eq)]
enum E {
Up,
Down,
}
let a = H.iter()
.tuple_windows::<(_, _)>()
.map(|(a, b)| {
if a < b { E::Up } else { E::Down }
})
.dedup()
.collect_vec();
let ok = match a.as_slice() {
[E::Down, E::Up, E::Down, E::Up] => true,
_ => false,
};
ok
}
fn main() {
input! {
T: usize,
}
for _ in 0..T {
let ans = solve();
println!("{}", yn(ans));
}
}
norioc