結果

問題 No.69 文字を自由に並び替え
ユーザー juger_jvjuger_jv
提出日時 2016-05-03 20:53:39
言語 Java21
(openjdk 21)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 494 bytes
コンパイル時間 3,046 ms
コンパイル使用メモリ 71,976 KB
実行使用メモリ 49,872 KB
最終ジャッジ日時 2023-08-20 23:19:28
合計ジャッジ時間 3,499 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,180 KB
testcase_01 AC 42 ms
48,988 KB
testcase_02 AC 43 ms
49,556 KB
testcase_03 AC 43 ms
49,268 KB
testcase_04 AC 42 ms
49,260 KB
testcase_05 AC 44 ms
49,144 KB
testcase_06 AC 41 ms
49,256 KB
testcase_07 AC 43 ms
49,872 KB
testcase_08 AC 41 ms
49,208 KB
testcase_09 AC 42 ms
49,400 KB
testcase_10 WA -
testcase_11 AC 42 ms
49,212 KB
testcase_12 AC 44 ms
49,388 KB
testcase_13 AC 43 ms
49,100 KB
testcase_14 AC 44 ms
49,100 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
class no69
{
    public static void main(String args[])throws IOException
    {
	BufferedReader sc=new BufferedReader(new InputStreamReader(System.in));
	String a,b;
	a=sc.readLine();
	b=sc.readLine();
	int alpha[]=new int[26];
	for(int i=0;i<a.length();i++)
	    {
		alpha[a.charAt(i)-'a']++;
		alpha[b.charAt(i)-'a']++;
	    }
	boolean flag=true;
	for(int i=0;i<26;i++)if(alpha[i]%2!=0)flag=false;
	if(flag)System.out.println("YES");
	else System.out.println("NO");
    }
}
0