結果
問題 | No.2061 XOR Sort |
ユーザー |
|
提出日時 | 2022-08-26 22:09:20 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 516 bytes |
コンパイル時間 | 492 ms |
コンパイル使用メモリ | 66,432 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-13 22:46:31 |
合計ジャッジ時間 | 7,311 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 WA * 13 |
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | main() | ^~~~
ソースコード
#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;}