結果
問題 | No.2061 XOR Sort |
ユーザー |
|
提出日時 | 2022-08-26 22:04:12 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 432 bytes |
コンパイル時間 | 613 ms |
コンパイル使用メモリ | 67,224 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-13 22:40:13 |
合計ジャッジ時間 | 2,977 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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++){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;}