結果

問題 No.2061 XOR Sort
ユーザー kotatsugamekotatsugame
提出日時 2022-08-26 22:04:12
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 432 bytes
コンパイル時間 539 ms
コンパイル使用メモリ 67,720 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-22 00:09:05
合計ジャッジ時間 3,221 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 61 ms
5,376 KB
testcase_15 AC 59 ms
5,376 KB
testcase_16 AC 120 ms
5,376 KB
testcase_17 AC 77 ms
5,376 KB
testcase_18 AC 79 ms
5,376 KB
testcase_19 AC 77 ms
5,376 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 61 ms
5,376 KB
testcase_23 WA -
testcase_24 AC 124 ms
5,376 KB
testcase_25 AC 124 ms
5,376 KB
testcase_26 AC 124 ms
5,376 KB
testcase_27 AC 125 ms
5,376 KB
testcase_28 AC 124 ms
5,376 KB
testcase_29 AC 28 ms
5,376 KB
testcase_30 AC 2 ms
5,376 KB
testcase_31 AC 5 ms
5,376 KB
testcase_32 AC 2 ms
5,376 KB
testcase_33 AC 2 ms
5,376 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
#include<atcoder/modint>
using namespace std;
using mint=atcoder::modint998244353;
int N,A[2<<17];
main()
{
	cin>>N;
	for(int i=0;i<N;i++)cin>>A[i];
	mint ans=1;
	for(int k=0;k<30;k++)
	{
		int ev=0,od=0;
		for(int i=0;i<N;i++)
		{
			if(A[i]>>k&1)
			{
				if(A[i]>>k+1&1)od|=2;
				else od|=1;
			}
			else
			{
				if(A[i]>>k+1&1)ev|=2;
				else ev|=1;
			}
		}
		if(ev&od)ans*=2;
	}
	cout<<ans.val()<<endl;
}
0