結果

問題 No.2044 Infinite Nim
ユーザー merlinmerlin
提出日時 2022-08-19 22:11:11
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 620 bytes
コンパイル時間 2,233 ms
コンパイル使用メモリ 74,252 KB
実行使用メモリ 51,228 KB
最終ジャッジ日時 2024-04-17 00:51:51
合計ジャッジ時間 8,549 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
36,940 KB
testcase_01 AC 59 ms
36,700 KB
testcase_02 AC 59 ms
36,932 KB
testcase_03 AC 57 ms
37,008 KB
testcase_04 AC 57 ms
36,780 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 56 ms
36,696 KB
testcase_08 AC 60 ms
36,944 KB
testcase_09 AC 56 ms
37,168 KB
testcase_10 AC 58 ms
36,684 KB
testcase_11 AC 56 ms
36,748 KB
testcase_12 AC 57 ms
36,820 KB
testcase_13 AC 166 ms
44,972 KB
testcase_14 AC 144 ms
41,440 KB
testcase_15 AC 125 ms
41,168 KB
testcase_16 AC 144 ms
41,676 KB
testcase_17 AC 193 ms
44,536 KB
testcase_18 AC 123 ms
40,848 KB
testcase_19 AC 130 ms
41,676 KB
testcase_20 AC 173 ms
45,104 KB
testcase_21 AC 227 ms
49,252 KB
testcase_22 AC 161 ms
45,000 KB
testcase_23 AC 141 ms
42,180 KB
testcase_24 WA -
testcase_25 AC 150 ms
44,940 KB
testcase_26 WA -
testcase_27 AC 126 ms
41,868 KB
testcase_28 AC 226 ms
48,660 KB
testcase_29 WA -
testcase_30 AC 184 ms
45,760 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 243 ms
51,228 KB
testcase_36 AC 58 ms
36,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        int n=Integer.parseInt(bu.readLine());
        String s[]=bu.readLine().split(" ");
        int xor=0,inf=0,i,a;
        for(i=0;i<n;i++)
        {
            a=Integer.parseInt(s[i]);
            if(a<0) inf++;
            else xor^=a;
        }

        if(xor==0 && inf==0) sb.append("Second");
        else sb.append("First");
        System.out.print(sb);
    }
}
0