結果
問題 | No.2535 多重同値 |
ユーザー | kusagame12 |
提出日時 | 2024-03-04 19:09:06 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 866 bytes |
コンパイル時間 | 2,202 ms |
コンパイル使用メモリ | 74,372 KB |
実行使用メモリ | 70,756 KB |
最終ジャッジ日時 | 2024-03-04 19:09:16 |
合計ジャッジ時間 | 9,402 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 133 ms
57,816 KB |
testcase_01 | AC | 147 ms
57,568 KB |
testcase_02 | AC | 126 ms
57,696 KB |
testcase_03 | AC | 150 ms
57,704 KB |
testcase_04 | AC | 157 ms
57,540 KB |
testcase_05 | AC | 127 ms
57,564 KB |
testcase_06 | AC | 128 ms
57,580 KB |
testcase_07 | WA | - |
testcase_08 | AC | 132 ms
57,824 KB |
testcase_09 | WA | - |
testcase_10 | AC | 128 ms
57,824 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); boolean[] isTrue = new boolean[N]; for(int i = 0 ; i < N ; i++){ String yOrN = sc.next(); if(yOrN.equals("Yes")){ isTrue[i] = true; }else{ isTrue[i] = false; } } if(isTrue[0]){ System.out.println("Yes"); }else{ System.out.println("No"); } for(int i = 1 ; i < N ; i++){ if(isTrue[i] == isTrue[0]){ System.out.println("Yes"); }else{ System.out.println("No"); } } } }