結果
問題 |
No.69 文字を自由に並び替え
|
ユーザー |
|
提出日時 | 2019-04-26 21:55:46 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 493 bytes |
コンパイル時間 | 12,978 ms |
コンパイル使用メモリ | 396,604 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-14 07:26:06 |
合計ジャッジ時間 | 13,592 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
コンパイルメッセージ
warning: variable does not need to be mutable --> src/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 --> src/main.rs:8:9 | 8 | let mut input_b = input_b.trim(); | ----^^^^^^^ | | | help: remove this `mut`
ソースコード
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 mut a: Vec<char> = input_a.chars().collect(); let mut b: Vec<char> = input_b.chars().collect(); a.sort(); b.sort(); if a == b { println!("YES"); } else { println!("NO"); } }