結果

問題 No.2619 Sorted Nim
ユーザー startcppstartcpp
提出日時 2022-10-02 10:29:20
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 359 bytes
コンパイル時間 915 ms
コンパイル使用メモリ 63,484 KB
実行使用メモリ 5,060 KB
最終ジャッジ日時 2023-08-26 05:50:20
合計ジャッジ時間 7,295 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 56 ms
4,588 KB
testcase_03 AC 67 ms
4,868 KB
testcase_04 AC 58 ms
4,532 KB
testcase_05 AC 58 ms
4,540 KB
testcase_06 AC 73 ms
4,832 KB
testcase_07 AC 56 ms
4,508 KB
testcase_08 AC 68 ms
4,724 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 67 ms
4,704 KB
testcase_11 AC 61 ms
4,576 KB
testcase_12 AC 66 ms
4,680 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 67 ms
4,968 KB
testcase_15 AC 61 ms
4,692 KB
testcase_16 AC 69 ms
4,872 KB
testcase_17 AC 71 ms
4,812 KB
testcase_18 AC 69 ms
4,788 KB
testcase_19 AC 55 ms
4,488 KB
testcase_20 AC 56 ms
4,540 KB
testcase_21 AC 74 ms
5,004 KB
testcase_22 AC 61 ms
4,620 KB
testcase_23 AC 66 ms
4,776 KB
testcase_24 AC 70 ms
4,892 KB
testcase_25 AC 68 ms
4,848 KB
testcase_26 AC 63 ms
4,624 KB
testcase_27 AC 56 ms
4,508 KB
testcase_28 AC 73 ms
4,856 KB
testcase_29 AC 70 ms
4,976 KB
testcase_30 AC 64 ms
4,624 KB
testcase_31 AC 2 ms
4,376 KB
testcase_32 AC 58 ms
4,516 KB
testcase_33 AC 62 ms
4,596 KB
testcase_34 AC 57 ms
4,480 KB
testcase_35 AC 63 ms
4,892 KB
testcase_36 AC 67 ms
4,808 KB
testcase_37 AC 2 ms
4,380 KB
testcase_38 AC 57 ms
4,680 KB
testcase_39 AC 68 ms
4,752 KB
testcase_40 AC 60 ms
4,560 KB
testcase_41 AC 61 ms
4,644 KB
testcase_42 AC 56 ms
4,700 KB
testcase_43 AC 68 ms
4,728 KB
testcase_44 AC 65 ms
4,744 KB
testcase_45 AC 68 ms
4,756 KB
testcase_46 AC 63 ms
4,636 KB
testcase_47 AC 56 ms
4,668 KB
testcase_48 AC 2 ms
4,376 KB
testcase_49 AC 61 ms
4,660 KB
testcase_50 AC 56 ms
4,740 KB
testcase_51 AC 62 ms
4,648 KB
testcase_52 AC 1 ms
4,384 KB
testcase_53 AC 73 ms
4,868 KB
testcase_54 AC 59 ms
4,800 KB
testcase_55 AC 71 ms
5,060 KB
testcase_56 AC 61 ms
4,572 KB
testcase_57 AC 70 ms
4,804 KB
testcase_58 AC 70 ms
4,820 KB
testcase_59 AC 61 ms
4,588 KB
testcase_60 AC 58 ms
4,508 KB
testcase_61 AC 60 ms
4,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int n;
int a[200000];
int b[200000];

int main() {
	cin >> n;
	for (int i = 0; i < n; i++) cin >> a[i];
	
	b[0] = a[0];
	for (int i = 1; i < n; i++) b[i] = a[i] - a[i - 1];
	
	int x = 0;
	for (int i = n - 1; i >= 0; i -= 2) x ^= b[i];
	if (x == 0) cout << "Second" << endl;
	else cout << "First" << endl;
	return 0;
}
0