結果

問題 No.814 ジジ抜き
ユーザー kotatsugamekotatsugame
提出日時 2020-03-27 04:35:00
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 280 ms / 3,000 ms
コード長 268 bytes
コンパイル時間 544 ms
コンパイル使用メモリ 63,892 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-30 16:02:47
合計ジャッジ時間 6,907 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 4 ms
4,380 KB
testcase_04 AC 276 ms
4,380 KB
testcase_05 AC 272 ms
4,376 KB
testcase_06 AC 280 ms
4,380 KB
testcase_07 AC 140 ms
4,380 KB
testcase_08 AC 271 ms
4,380 KB
testcase_09 AC 202 ms
4,376 KB
testcase_10 AC 267 ms
4,380 KB
testcase_11 AC 271 ms
4,376 KB
testcase_12 AC 139 ms
4,380 KB
testcase_13 AC 139 ms
4,380 KB
testcase_14 AC 212 ms
4,376 KB
testcase_15 AC 108 ms
4,376 KB
testcase_16 AC 108 ms
4,380 KB
testcase_17 AC 221 ms
4,376 KB
testcase_18 AC 189 ms
4,376 KB
testcase_19 AC 266 ms
4,376 KB
testcase_20 AC 139 ms
4,376 KB
testcase_21 AC 158 ms
4,376 KB
testcase_22 AC 226 ms
4,380 KB
testcase_23 AC 115 ms
4,376 KB
testcase_24 AC 198 ms
4,376 KB
testcase_25 AC 162 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:4:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
    4 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
using namespace std;
int N;
main()
{
	cin>>N;
	long ans=0;
	for(int i=0;i<N;i++)
	{
		long K,L,D;
		cin>>K>>L>>D;
		long L2=L>>D;
		while(K>0&&L2%4)
		{
			ans^=L;
			L+=1<<D;
			L2++;
			K--;
		}
		while(K%4)ans^=L+(--K<<D);
	}
	cout<<ans<<endl;
}
0