結果

問題 No.69 文字を自由に並び替え
ユーザー iwotiwot
提出日時 2019-04-26 21:54:45
言語 Rust
(1.77.0)
結果
WA  
実行時間 -
コード長 538 bytes
コンパイル時間 1,060 ms
コンパイル使用メモリ 139,104 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-16 14:04:01
合計ジャッジ時間 1,624 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 WA -
testcase_05 AC 1 ms
4,384 KB
testcase_06 AC 1 ms
4,384 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 1 ms
4,384 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: variable does not need to be mutable
 --> Main.rs:4:9
  |
4 |     let mut input_a = input_a.trim();
  |         ----^^^^^^^
  |         |
  |         help: remove this `mut`
  |
  = note: `#[warn(unused_mut)]` on by default

warning: variable does not need to be mutable
 --> Main.rs:8:9
  |
8 |     let mut input_b = input_b.trim();
  |         ----^^^^^^^
  |         |
  |         help: remove this `mut`

warning: 2 warnings emitted

ソースコード

diff #

fn main() {
    let mut input_a = String::new();
    let _ = std::io::stdin().read_line(&mut input_a);
    let mut input_a = input_a.trim();

    let mut input_b = String::new();
    let _ = std::io::stdin().read_line(&mut input_b);
    let mut input_b = input_b.trim();

    let a: Vec<char> = input_a.chars().collect();
    let b: Vec<char> = input_b.chars().collect();
    let mut result = "YES";
    for x in &a {
        if !b.contains(&x) {
            result = "NO";
            break;
        }
    }
    println!("{}", result);
}
0