結果
| 問題 | No.183 たのしい排他的論理和(EASY) |
| コンテスト | |
| ユーザー |
fuu32
|
| 提出日時 | 2018-02-05 15:11:14 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 148 ms / 5,000 ms |
| コード長 | 542 bytes |
| コンパイル時間 | 1,508 ms |
| コンパイル使用メモリ | 168,848 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 04:06:35 |
| 合計ジャッジ時間 | 3,317 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define LOOP(i,x,n) for(int i=x;i<n;i++)
#define ALL(v) (v).begin(),(v).end()
#define PB push_backs
#define MP make_pair
#define FR first
#define SC second
#define int long long
using namespace std;
const int MOD=1000000007;
const int INF=1000000009;
int dp[1<<15];
signed main(){
int n;
cin>>n;
vector<int> a(n);
dp[0]=1;
REP(i,n){
cin>>a[i];
REP(j,1<<15)if(dp[j])dp[j^a[i]]=1;
}
int ans=0;
REP(i,1<<15)if(dp[i])ans++;
cout<<ans<<endl;
return 0;
}
fuu32