結果

問題 No.2823 PEX (Predecessing Excluded Value) Game
ユーザー achapi
提出日時 2024-07-12 23:22:08
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 337 bytes
コンパイル時間 2,150 ms
コンパイル使用メモリ 193,068 KB
最終ジャッジ日時 2025-02-22 05:30:26
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 49 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
	int N;
	cin >> N;
	int g = 0;
	long long k = 0, _R = 0;
	for (int i = 0; i < N; i++){
		long long L, R;
		cin >> L >> R;
		k += L - _R - 1;
		if (k % 2 == 1){
			g ^= R - L + 1;
		}
		_R = R;
	}
	if (g != 0){
		cout << "First" << endl;
	} else {
		cout << "Second" << endl;
	}
}
0