結果
| 問題 |
No.24 数当てゲーム
|
| コンテスト | |
| ユーザー |
skyline
|
| 提出日時 | 2020-02-02 16:31:04 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,475 bytes |
| コンパイル時間 | 2,601 ms |
| コンパイル使用メモリ | 78,900 KB |
| 実行使用メモリ | 41,940 KB |
| 最終ジャッジ日時 | 2024-09-18 21:13:44 |
| 合計ジャッジ時間 | 3,720 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 7 RE * 3 |
ソースコード
import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
class Main {
public static void main(String[] args) {
No0021 no = new No0021();
System.out.println(no.result());
}
}
class No0021 {
public final int MAX_NUM = 9;
public final int COL_NUM = 4;
public final String STR_YES = "YES";
public final String STR_NO = "NO";
private int n;
private List<Boolean> boolList;
private String result;
public No0021() {
Scanner sc = new Scanner(System.in);
this.n = sc.nextInt();
this.boolList = new ArrayList<>(MAX_NUM);
for (int i = 0; i < MAX_NUM; i++) {
this.boolList.add(true);
}
for (int i = 0; i < this.n; i++) {
List<Integer> valList = new ArrayList<>(COL_NUM);
for (int j = 0; j < COL_NUM; j++) {
valList.add(sc.nextInt());
}
String ret = sc.next();
if (STR_NO.equals(ret)) {
for (Integer val : valList) {
if (!boolList.get(val)) {
this.boolList.set(val, false);
}
}
}
}
for (int i = 0; i < this.boolList.size(); i++) {
if (this.boolList.get(i)) {
this.result = String.valueOf(i);
}
}
}
public String result() {
return this.result;
}
}
skyline