結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
![]() |
提出日時 | 2015-04-29 19:47:47 |
言語 | Java19 (openjdk 19.0.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 591 bytes |
コンパイル時間 | 4,743 ms |
コンパイル使用メモリ | 72,696 KB |
実行使用メモリ | 56,168 KB |
最終ジャッジ日時 | 2023-09-09 16:10:42 |
合計ジャッジ時間 | 6,630 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 115 ms
55,848 KB |
testcase_01 | AC | 113 ms
55,524 KB |
testcase_02 | AC | 113 ms
55,604 KB |
testcase_03 | AC | 114 ms
55,856 KB |
testcase_04 | WA | - |
testcase_05 | AC | 114 ms
55,552 KB |
testcase_06 | AC | 114 ms
55,508 KB |
testcase_07 | AC | 115 ms
54,188 KB |
testcase_08 | AC | 113 ms
55,560 KB |
testcase_09 | AC | 115 ms
55,560 KB |
testcase_10 | AC | 114 ms
55,792 KB |
testcase_11 | AC | 115 ms
55,504 KB |
testcase_12 | AC | 116 ms
55,840 KB |
testcase_13 | AC | 116 ms
55,612 KB |
testcase_14 | AC | 113 ms
56,168 KB |
ソースコード
import java.util.*; public class Yukicoder_69{ public static void main(String[] args){ Scanner stdIn = new Scanner(System.in); String A = stdIn.next(); String B = stdIn.next(); boolean[] judg = new boolean[A.length()]; Arrays.fill(judg,true); for(int i=0;i<B.length();i++){ char ch = B.charAt(i); for(int j=0;j<A.length();j++){ if(judg[j] && ch == A.charAt(j)){ judg[j] = false; } } } for(int i=0;i<judg.length;i++){ if(judg[i]){ System.out.println("NO"); break; } if(i==judg.length-1){ System.out.println("YES"); } } } }