結果

問題 No.69 文字を自由に並び替え
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-09 14:14:39
言語 Java21
(openjdk 21)
結果
AC  
実行時間 115 ms / 5,000 ms
コード長 377 bytes
コンパイル時間 1,811 ms
コンパイル使用メモリ 71,424 KB
実行使用メモリ 56,368 KB
最終ジャッジ日時 2023-08-20 23:57:57
合計ジャッジ時間 4,322 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
56,184 KB
testcase_01 AC 114 ms
55,400 KB
testcase_02 AC 113 ms
55,724 KB
testcase_03 AC 112 ms
55,616 KB
testcase_04 AC 112 ms
56,068 KB
testcase_05 AC 112 ms
56,048 KB
testcase_06 AC 111 ms
56,124 KB
testcase_07 AC 112 ms
55,724 KB
testcase_08 AC 114 ms
56,164 KB
testcase_09 AC 114 ms
56,368 KB
testcase_10 AC 115 ms
56,240 KB
testcase_11 AC 114 ms
55,664 KB
testcase_12 AC 113 ms
56,016 KB
testcase_13 AC 113 ms
55,804 KB
testcase_14 AC 115 ms
56,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		char[] a = sc.next().toCharArray();
		char[] b = sc.next().toCharArray();
		Arrays.sort(a);
		Arrays.sort(b);
		boolean F = true;
		for (int i=0; i<a.length; i++) {
			if (a[i]!=b[i]) {F = false;}
		}
		System.out.println(F==true?"YES":"NO");
	}
}
0