結果

問題 No.2557 緑以下コンテスト
ユーザー Motoki saitoMotoki saito
提出日時 2023-12-02 14:32:03
言語 Rust
(1.77.0 + proconio)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 992 bytes
コンパイル時間 15,084 ms
コンパイル使用メモリ 379,484 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-26 16:44:29
合計ジャッジ時間 12,603 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
6,812 KB
testcase_01 AC 1 ms
6,816 KB
testcase_02 AC 1 ms
6,820 KB
testcase_03 AC 1 ms
6,820 KB
testcase_04 AC 1 ms
6,940 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 1 ms
6,944 KB
testcase_08 AC 1 ms
6,940 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused imports: `BTreeSet`, `HashMap`
 --> src/main.rs:2:25
  |
2 | use std::collections::{ HashMap, BTreeSet };
  |                         ^^^^^^^  ^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

ソースコード

diff #

use proconio::input;
use std::collections::{ HashMap, BTreeSet };

fn main() {
    /*
    input! {
        n: usize,
        q: usize,
        mut a: [u128; n],
    }

    let mut not_include: BTreeSet<u128> = (0..=n).map(|i| i as u128).collect();
    let mut counter: HashMap<u128, u128> = (0..=n).map(|i| (i as u128, 0)).collect();
    let n = n as u128;

    for e in &a {
        if e <= &n {
            *counter.get_mut(e).unwrap() += 1;
            not_include.remove(e);
        }
    }

    for _ in 0..q {
        input! {
            i: usize,
            x: u128,
        }
        let old = a[i];
        *counter.get_mut(&old).unwrap() -= 1;
        if *counter.get_mut(&old).unwrap() == 0 {
            not_include.insert(old);
        }
        a[i] = x;
        *counter.get_mut(&x).unwrap() += 1;
        not_include.remove(&x);
    }
    */
    input! {
        x: u64,
    }
    if x < 1200 {
        println!("green");
    } else {
        println!("difficult");
    }
}
0