結果

問題 No.69 文字を自由に並び替え
ユーザー enuo-9
提出日時 2016-09-21 10:55:38
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 585 bytes
コンパイル時間 3,987 ms
コンパイル使用メモリ 74,724 KB
実行使用メモリ 41,324 KB
最終ジャッジ日時 2024-06-27 13:34:47
合計ジャッジ時間 5,794 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No069 {
	public static void main(String args[]){
		String strA = "";
		String strB = "";
		int failFlag = 0;
		Scanner sc = new Scanner(System.in);

		strA = sc.nextLine();
		strB = sc.nextLine();

		String[] argA = strA.split("");
		String[] argB = strB.split("");

		for(int i = 0;i<argA.length;i++){
			for(int n = 0;n<argB.length;n++){
				if(argA[i].equals(argB[n])){
					break;
				}
				if(argB.length-1 <= n){
					failFlag = 1;
				}
			}
		}
		if(failFlag == 1)
			System.out.println("NO");
		else
			System.out.println("YES");

	}
}
0