結果

問題 No.814 ジジ抜き
ユーザー ahe100ahe100
提出日時 2019-04-13 02:57:24
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 696 bytes
コンパイル時間 2,108 ms
コンパイル使用メモリ 164,432 KB
実行使用メモリ 10,448 KB
最終ジャッジ日時 2023-10-13 09:28:51
合計ジャッジ時間 8,902 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,628 KB
testcase_01 AC 3 ms
7,520 KB
testcase_02 AC 2 ms
7,560 KB
testcase_03 WA -
testcase_04 AC 287 ms
10,444 KB
testcase_05 AC 287 ms
10,448 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0;i<((int)(n));i++)
#define reg(i,a,b) for(int i = ((int)(a));i<=((int)(b));i++)
#define irep(i,n) for(int i = ((int)(n)-1);i>=0;i--)
#define ireg(i,a,b) for(int i = ((int)(b));i>=((int)(a));i--)
typedef long long ll;

/*
AC
全てのカードのxorはx
*/

ll n,k[300010],l[300010],d[300010],ans=0;

ll f(ll x){
	if(x%4==0)return x;
	if(x%4==1)return 1;
	if(x%4==2)return x+1;
	return 0;
}

void init(){
	cin>>n;
	rep(i,n)cin>>k[i]>>l[i]>>d[i];
}

int main(void){
	init();
	rep(i,n){
		ll ue = l[i]>>d[i];
		ans = ans ^ (f(ue + k[i]-1) ^ f(ue-1))*(1<<d[i]) ^ (k[i]%2?(ue<<d[i])^l[i]:0);
	}
	cout<<ans<<endl;
	return 0;
}
0