結果
| 問題 |
No.24 数当てゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2014-11-12 03:51:25 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 634 bytes |
| コンパイル時間 | 2,325 ms |
| コンパイル使用メモリ | 77,688 KB |
| 実行使用メモリ | 54,480 KB |
| 最終ジャッジ日時 | 2024-12-31 09:58:26 |
| 合計ジャッジ時間 | 4,528 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 2 |
ソースコード
import java.util.Scanner;
/**
* yukicoder no.24
* @author scache
*
*/
public class Main {
public static void main(String[] args) {
Main p = new Main();
}
public Main() {
solve();
}
public void solve() {
Scanner sc = new Scanner(System.in);
int n =sc.nextInt();
int res = 0x3fe;
for(int i=0;i<n;i++){
int cur = 0;
for(int j=0;j<4;j++)
cur |= 1 << sc.nextInt();
if(sc.next().equals("NO"))
res &= 0xfff ^ cur;
else
res &= cur;
}
for(int i=1;i<=9;i++){
if((res & (1<<i))>0){
System.out.println(i);
return ;
}
}
}
}