結果
問題 | No.24 数当てゲーム |
ユーザー |
![]() |
提出日時 | 2015-04-03 04:27:59 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 130 ms / 5,000 ms |
コード長 | 1,041 bytes |
コンパイル時間 | 3,066 ms |
コンパイル使用メモリ | 77,664 KB |
実行使用メモリ | 41,660 KB |
最終ジャッジ日時 | 2024-07-04 01:33:33 |
合計ジャッジ時間 | 4,905 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
//No.24 数当てゲーム import java.util.*; import java.io.*; import static java.util.Arrays.*; import static java.lang.Math.*; public class No24 { static final Scanner sc = new Scanner(System.in); static final PrintWriter out = new PrintWriter(System.out,false); static void solve() { int n = sc.nextInt(); int f = 0; for (int i=0; i<n; i++) { int a = 0; for (int j=0; j<4; j++) { a |= 1<<sc.nextInt(); } if (sc.next().equals("YES")) f |= ~a; else f |= a; } for (int i=0; i<10; i++) { if ((f>>i&1) == 0) { out.println(i); } } } public static void main(String[] args) { long start = System.currentTimeMillis(); solve(); out.flush(); long end = System.currentTimeMillis(); //trace(end-start + "ms"); sc.close(); } static void trace(Object... o) { System.out.println(deepToString(o));} }