結果

問題 No.1592 Tenkei 90
ユーザー kamojiro24e
提出日時 2021-07-09 21:39:40
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 876 bytes
コンパイル時間 13,371 ms
コンパイル使用メモリ 386,012 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-01 15:34:50
合計ジャッジ時間 14,251 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

// -*- coding:utf-8-unix -*-
#![allow(non_snake_case)]

#[cfg(debug_assertions)]
#[allow(unused)]
macro_rules! eprintln {
    ($p:tt, $($x:expr),*) => {
        std::eprintln!($p, $($x,)*);
    };
}

#[cfg(not(debug_assertions))]
#[allow(unused)]
macro_rules! eprintln {
    ($p:tt, $($x:expr),*) => {};
}


use proconio::{fastout, input};
use proconio::marker::Bytes;

#[fastout]
fn main() {
    input!{
        mut S: Bytes,
    }
    let t = "kyoprotenkei90".to_string();
    let mut tenkei: Vec<u8> = t.as_bytes().into_iter().map(|&u| u).collect();
    if S.len() != tenkei.len(){
        println!("No");
        return;
    }
    tenkei.sort();
    S.sort();
    // eprintln!("tenkei {:?}", tenkei);
    // eprintln!("S {:?}", S);
    for i in 0..S.len(){
        if S[i] != tenkei[i]{
            println!("No");
            return;
        }
    }
    println!("Yes")
}
0