結果
| 問題 | No.24 数当てゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-09-22 23:10:17 |
| 言語 | Java (openjdk 27.0.1.0.3 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 148 ms / 5,000 ms |
| + 384µs | |
| コード長 | 765 bytes |
| 記録 | |
| コンパイル時間 | 3,015 ms |
| コンパイル使用メモリ | 95,200 KB |
| 実行使用メモリ | 48,656 KB |
| 最終ジャッジ日時 | 2026-11-15 14:13:34 |
| 合計ジャッジ時間 | 6,393 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
import java.util.Scanner;
public class Main_yukicoder24 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] abcd = new int[10];
int y = 0;
for (int i = 0; i < n; i++) {
int[] tmp = new int[4];
for (int j = 0; j < 4; j++) {
tmp[j] = sc.nextInt();
}
int d;
if (sc.next().equals("YES")) {
d = 1;
y++;
} else {
d = -1;
}
for (int j = 0; j < 4; j++) {
abcd[tmp[j]] += d;
}
}
for (int i = 0; i < 10; i++) {
if (y == abcd[i]) {
System.out.println(i);
}
}
sc.close();
}
}