結果

問題 No.69 文字を自由に並び替え
ユーザー 37zigen37zigen
提出日時 2016-04-01 11:37:28
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 5,000 ms
コード長 461 bytes
コンパイル時間 1,938 ms
コンパイル使用メモリ 72,180 KB
実行使用メモリ 56,260 KB
最終ジャッジ日時 2023-08-20 23:17:15
合計ジャッジ時間 4,567 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
55,692 KB
testcase_01 AC 115 ms
55,604 KB
testcase_02 AC 114 ms
53,788 KB
testcase_03 AC 115 ms
55,872 KB
testcase_04 AC 114 ms
55,568 KB
testcase_05 AC 113 ms
55,508 KB
testcase_06 AC 116 ms
55,728 KB
testcase_07 AC 114 ms
55,956 KB
testcase_08 AC 118 ms
56,032 KB
testcase_09 AC 117 ms
56,260 KB
testcase_10 AC 116 ms
55,492 KB
testcase_11 AC 115 ms
55,696 KB
testcase_12 AC 116 ms
55,728 KB
testcase_13 AC 112 ms
55,964 KB
testcase_14 AC 116 ms
55,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder069;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		String str1=sc.next();
		String str2=sc.next();
		char[] c1=str1.toCharArray();
		char[] c2=str2.toCharArray();
		Arrays.sort(c1);
		Arrays.sort(c2);
		for(int i=0;i<c1.length;i++){
			if(c1[i]!=c2[i]){
				System.out.println("NO");
				return;
			}
		}
		System.out.println("YES");
	}
}
0