結果

問題 No.69 文字を自由に並び替え
ユーザー jimanojimano
提出日時 2018-01-07 14:34:16
言語 Java21
(openjdk 21)
結果
AC  
実行時間 52 ms / 5,000 ms
コード長 585 bytes
コンパイル時間 3,603 ms
コンパイル使用メモリ 75,156 KB
実行使用メモリ 37,276 KB
最終ジャッジ日時 2024-05-08 05:41:00
合計ジャッジ時間 4,468 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
37,008 KB
testcase_01 AC 52 ms
37,268 KB
testcase_02 AC 50 ms
36,808 KB
testcase_03 AC 51 ms
37,276 KB
testcase_04 AC 50 ms
37,244 KB
testcase_05 AC 51 ms
36,872 KB
testcase_06 AC 50 ms
36,864 KB
testcase_07 AC 48 ms
37,276 KB
testcase_08 AC 48 ms
37,276 KB
testcase_09 AC 49 ms
37,240 KB
testcase_10 AC 51 ms
37,204 KB
testcase_11 AC 50 ms
37,208 KB
testcase_12 AC 49 ms
36,672 KB
testcase_13 AC 50 ms
37,008 KB
testcase_14 AC 51 ms
37,164 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class No0068 {
	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);

			if (Arrays.equals(a, b)) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
0