結果

問題 No.2823 PEX (Predecessing Excluded Value) Game
コンテスト
ユーザー achapi
提出日時 2024-07-12 23:22:08
言語 C++17
(gcc 15.2.0 + boost 1.90.0)
コンパイル:
g++-15 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 337 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,011 ms
コンパイル使用メモリ 213,212 KB
実行使用メモリ 9,276 KB
最終ジャッジ日時 2026-07-05 05:14:05
合計ジャッジ時間 4,370 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 49 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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