結果

問題 No.3644 Division by Shitoshitoto Sequence
コンテスト
ユーザー norioc
提出日時 2026-09-24 01:59:26
言語 Rust
(1.97.1 + proconio + num + itertools + ACL)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 97 ms / 2,000 ms
+ 914µs
コード長 906 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,262 ms
コンパイル使用メモリ 195,804 KB
実行使用メモリ 10,924 KB
最終ジャッジ日時 2026-09-24 01:59:38
合計ジャッジ時間 7,260 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
サブタスク 配点 結果
サンプル 0 % AC * 1
小課題1 10 % AC * 3
小課題2 20 % AC * 2
小課題3 70 % AC * 21
合計 100 点
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#![allow(non_snake_case, unused_imports)]

use itertools::Itertools;
use proconio::{input, marker::Chars, marker::Usize1};
use std::cmp::{Reverse, max, min};
use std::collections::{BinaryHeap, HashMap, HashSet, VecDeque};

#[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 f(xs: &[i64]) -> bool {
    let [a, b, c, d, e] = xs else {
        unreachable!();
    };

    a == c && b == d && d == e && a != b
}

fn main() {
    input! {
        T: usize,
    }

    for _ in 0..T {
        input! {
            N: usize,
            A: [i64; 5 * N],
        }

        let ans = A
            .chunks(5)
            .all(|a| f(a));

        println!("{}", yn(ans));
    }
}
0