結果
問題 |
No.183 たのしい排他的論理和(EASY)
|
ユーザー |
![]() |
提出日時 | 2015-06-13 12:51:13 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 548 bytes |
コンパイル時間 | 558 ms |
コンパイル使用メモリ | 68,372 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-06 16:03:52 |
合計ジャッジ時間 | 3,453 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 2 RE * 16 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <iomanip> using namespace std; typedef long long LL; int main(){ int N; cin >> N; vector<int> a(N); for(int i = 0; i < N; i++){ cin >> a[i]; } vector<int> cnt(16384*2+1); cnt[0] = 1; for(int i = 0; i < N; i++){ for(int j = 0; j <= 16384*2; j++){ cnt[j^a[i]] += cnt[j]; } } int ans = 0; for(int i = 0; i <= 16384*2; i++){ if(cnt[i] > 0) ans++; } cout << ans << endl; return 0; }