結果
| 問題 |
No.2535 多重同値
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-04 19:09:06 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 866 bytes |
| コンパイル時間 | 2,327 ms |
| コンパイル使用メモリ | 74,136 KB |
| 実行使用メモリ | 67,048 KB |
| 最終ジャッジ日時 | 2024-09-29 17:31:03 |
| 合計ジャッジ時間 | 8,322 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 11 |
ソースコード
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");
}
}
}
}