結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 1 ms
6,940 KB
testcase_03 AC 2 ms
6,944 KB
testcase_04 AC 2 ms
6,944 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 2 ms
6,944 KB
testcase_08 AC 1 ms
6,940 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 2 ms
6,940 KB
testcase_11 AC 2 ms
6,940 KB
testcase_12 AC 2 ms
6,944 KB
testcase_13 AC 2 ms
6,940 KB
testcase_14 AC 256 ms
6,940 KB
testcase_15 AC 257 ms
6,940 KB
testcase_16 AC 526 ms
6,940 KB
testcase_17 AC 328 ms
6,940 KB
testcase_18 AC 335 ms
6,940 KB
testcase_19 AC 326 ms
6,940 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 257 ms
6,940 KB
testcase_23 WA -
testcase_24 AC 531 ms
6,944 KB
testcase_25 AC 533 ms
6,940 KB
testcase_26 AC 532 ms
6,944 KB
testcase_27 AC 533 ms
6,944 KB
testcase_28 AC 537 ms
6,940 KB
testcase_29 AC 145 ms
6,944 KB
testcase_30 AC 1 ms
6,944 KB
testcase_31 AC 16 ms
6,940 KB
testcase_32 AC 2 ms
6,940 KB
testcase_33 AC 2 ms
6,940 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++)
	{
		bool fn=false;
		for(int l=k+1;l<=30;l++)
		{
			int ev=0,od=0;
			for(int i=0;i<N;i++)
			{
				if(A[i]>>k&1)
				{
					if(A[i]>>l&1)od|=2;
					else od|=1;
				}
				else
				{
					if(A[i]>>l&1)ev|=2;
					else ev|=1;
				}
			}
			if(!(ev&od))fn=true;
		}
		if(!fn)ans*=2;
	}
	cout<<ans.val()<<endl;
}
0