結果

問題 No.2796 Small Matryoshka
ユーザー atcoder8atcoder8
提出日時 2024-06-28 23:00:01
言語 Rust
(1.77.0)
結果
WA  
実行時間 -
コード長 380 bytes
コンパイル時間 11,993 ms
コンパイル使用メモリ 405,416 KB
実行使用メモリ 8,960 KB
最終ジャッジ日時 2024-06-28 23:00:25
合計ジャッジ時間 13,524 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 WA -
testcase_05 AC 5 ms
5,376 KB
testcase_06 AC 24 ms
8,192 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 19 ms
6,784 KB
testcase_09 AC 27 ms
8,960 KB
testcase_10 AC 21 ms
8,960 KB
testcase_11 AC 23 ms
8,960 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

use proconio::input;

fn main() {
    input! {
        n: usize,
        mut io: [(usize, usize); n],
    }

    io.sort_unstable_by_key(|&(_inner, outer)| outer);

    let ans = io
        .windows(2)
        .filter(|window| {
            let prev = window[0];
            let cur = window[1];

            prev.1 > cur.0
        })
        .count();
    println!("{}", ans);
}
0