結果
| 問題 | No.69 文字を自由に並び替え | 
| コンテスト | |
| ユーザー |  Maricom_tkg | 
| 提出日時 | 2018-10-24 18:43:31 | 
| 言語 | Rust (1.83.0 + proconio) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1 ms / 5,000 ms | 
| コード長 | 508 bytes | 
| コンパイル時間 | 12,999 ms | 
| コンパイル使用メモリ | 379,640 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-14 07:12:58 | 
| 合計ジャッジ時間 | 13,982 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 15 | 
ソースコード
use std::io::Read;
fn main() {
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();
    
    let mut iter = buf.split_whitespace();
    
    let mut a: Vec<char> = iter.next().unwrap().chars().collect();
    let mut b: Vec<char> = iter.next().unwrap().chars().collect();
    
    a.sort();
    b.sort();
    
    let mut result = "YES";
    
    for i in 0..a.len() {
        if a[i] != b[i] {
            result = "NO";
        }
    }
    
    println!("{}", result);
}
            
            
            
        