結果
| 問題 |
No.24 数当てゲーム
|
| コンテスト | |
| ユーザー |
m2543315647
|
| 提出日時 | 2015-05-13 10:22:40 |
| 言語 | Java (openjdk 23) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 693 bytes |
| コンパイル時間 | 3,349 ms |
| コンパイル使用メモリ | 76,260 KB |
| 実行使用メモリ | 41,528 KB |
| 最終ジャッジ日時 | 2024-07-06 01:13:31 |
| 合計ジャッジ時間 | 4,591 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 10 |
ソースコード
import java.util.Arrays;
import java.util.Scanner;
public class No24 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
final int n = sc.nextInt();
int a, b, c, d;
boolean r[] = new boolean[10];
Arrays.fill(r, true);
for (int i = 0; i < n; i++) {
a = sc.nextInt();
b = sc.nextInt();
c = sc.nextInt();
d = sc.nextInt();
if (args[(i + 1) * 5].length() == 3) {
for (int j = 0; j < 10; j++)
if (j != a && j != b && j != c && j != d)
r[j] = false;
} else {
r[a] = r[b] = r[c] = r[d] = false;
}
if(Arrays.asList(r).lastIndexOf(true)==Arrays.asList(r).indexOf(true)){
System.out.println(i);
return;
}
}
}
}
m2543315647