結果
問題 | No.2619 Sorted Nim |
ユーザー |
![]() |
提出日時 | 2024-01-26 22:51:51 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 27 ms / 2,000 ms |
コード長 | 365 bytes |
コンパイル時間 | 1,462 ms |
コンパイル使用メモリ | 29,696 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-28 08:43:58 |
合計ジャッジ時間 | 5,127 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 62 |
ソースコード
#include <stdio.h>int main () {int n = 0;int a[200001] = {};int res = 0;int ans = 0;res = scanf("%d", &n);for (int i = 0; i < n; i++) {res = scanf("%d", a+(i+1));}for (int i = n; i > 0; i -= 2) {ans ^= a[i]-a[i-1];}if (ans > 0) {printf("First\n");} else {printf("Second\n");}return 0;}