結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー troro_kelptroro_kelp
提出日時 2018-10-16 17:29:58
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 380 bytes
コンパイル時間 614 ms
コンパイル使用メモリ 71,808 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-20 20:36:55
合計ジャッジ時間 1,323 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 2 ms
5,376 KB
testcase_06 WA -
testcase_07 AC 3 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 3 ms
5,376 KB
testcase_10 AC 3 ms
5,376 KB
testcase_11 AC 3 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 3 ms
5,376 KB
testcase_15 AC 3 ms
5,376 KB
testcase_16 WA -
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 2 ms
5,376 KB
testcase_19 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;

long long N;
int main(void)
{
    cin >> N;
    int t=0;
    for (int i = 0; i < N; ++i)
    {
        int a; cin >> a;
        t = t|a;
    }
    int ans=1;
    while(t){
        if(t&1) ans*=2;
        t>>=1;
    }
    cout << ans << endl;
        
    return 0;
}
0