結果
問題 | No.183 たのしい排他的論理和(EASY) |
ユーザー |
|
提出日時 | 2015-04-17 01:56:22 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 221 ms / 5,000 ms |
コード長 | 383 bytes |
コンパイル時間 | 1,206 ms |
コンパイル使用メモリ | 157,644 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-29 01:43:42 |
合計ジャッジ時間 | 3,206 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int(i)=0;(i)<(n);++(i)) const int MOD = int(1e9+7); bool f[32768]; int main(){ int N; cin >> N; f[0] = true; REP(i,N){ int a; cin >> a; REP(j,32768) if(f[j]) f[j^a] = true; } int res = 0; REP(j,32768) if(f[j]) res++; cout << res << endl; return 0; }