結果
問題 |
No.183 たのしい排他的論理和(EASY)
|
ユーザー |
![]() |
提出日時 | 2017-03-18 15:42:30 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 325 bytes |
コンパイル時間 | 1,435 ms |
コンパイル使用メモリ | 166,096 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-04 19:13:11 |
合計ジャッジ時間 | 2,819 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 3 WA * 15 |
ソースコード
#include <bits/stdc++.h> #define REP(i,n,N) for(int i=n;i<N;i++) #define p(S) cout<<(S)<<endl using namespace std; bool dp[2<<14]={}; int main(){ int N; cin>>N; int A[5002]; REP(i,0,N) cin>>A[i]; dp[0]=true; REP(i,0,N) REP(X,0,2<<14) dp[X ^ A[i]]=dp[X]; int cnt=count(dp,dp+(2<<14),true); p(cnt); return 0; }