結果

問題 No.69 文字を自由に並び替え
ユーザー rabirabi
提出日時 2019-06-24 15:00:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 501 bytes
コンパイル時間 3,236 ms
コンパイル使用メモリ 72,080 KB
実行使用メモリ 49,700 KB
最終ジャッジ日時 2023-08-21 00:20:11
合計ジャッジ時間 4,362 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,500 KB
testcase_01 AC 43 ms
49,280 KB
testcase_02 AC 42 ms
49,420 KB
testcase_03 AC 43 ms
49,308 KB
testcase_04 AC 42 ms
49,364 KB
testcase_05 AC 42 ms
49,496 KB
testcase_06 AC 42 ms
49,700 KB
testcase_07 AC 42 ms
49,408 KB
testcase_08 AC 43 ms
49,428 KB
testcase_09 AC 42 ms
49,360 KB
testcase_10 AC 43 ms
49,464 KB
testcase_11 AC 42 ms
47,264 KB
testcase_12 AC 42 ms
49,276 KB
testcase_13 AC 42 ms
49,504 KB
testcase_14 AC 40 ms
49,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Tester2 {
	public static void main(String[] args){
		try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
			char[] a = br.readLine().toCharArray();
			char[] b = br.readLine().toCharArray();
			Arrays.sort(a);
			Arrays.sort(b);
			System.out.println(Arrays.equals(a, b)?"YES":"NO");
		}catch(IOException e) {
			e.printStackTrace();
		}
	}
}
0