結果
問題 |
No.184 たのしい排他的論理和(HARD)
|
ユーザー |
|
提出日時 | 2016-03-31 23:25:31 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 314 bytes |
コンパイル時間 | 1,237 ms |
コンパイル使用メモリ | 157,776 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-04 12:08:50 |
合計ジャッジ時間 | 2,547 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 10 WA * 24 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:14:21: warning: ‘sum’ may be used uninitialized in this function [-Wmaybe-uninitialized] 14 | bitset<61> x(sum); | ^
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int n, tmp, sum; cin >> n; for (int i = 0; i < n; i++) { cin >> tmp; sum |= tmp; } bitset<61> x(sum); cout << (1 << min((int)x.count(), n)) << "\n"; return 0; }