結果

問題 No.69 文字を自由に並び替え
ユーザー yagi2yagi2
提出日時 2017-04-25 16:31:24
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 503 bytes
コンパイル時間 1,982 ms
コンパイル使用メモリ 72,608 KB
実行使用メモリ 58,088 KB
最終ジャッジ日時 2023-09-09 21:15:45
合計ジャッジ時間 4,568 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 113 ms
56,216 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 112 ms
55,280 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 114 ms
55,824 KB
testcase_10 AC 115 ms
55,920 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 115 ms
53,868 KB
testcase_14 AC 114 ms
53,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        List<String> A = new ArrayList<>(Arrays.asList(sc.next().split("")));
        List<String> B = new ArrayList<>(Arrays.asList(sc.next().split("")));

        A.removeAll(B);
        B.removeAll(A);

        System.out.println((A.size() == 0 && B.size() == 0)? "YES" : "NO");
    }
}
0