結果

問題 No.184 たのしい排他的論理和(HARD)
ユーザー kakira9618kakira9618
提出日時 2015-04-17 01:57:13
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,598 bytes
コンパイル時間 2,133 ms
コンパイル使用メモリ 93,720 KB
実行使用メモリ 60,148 KB
最終ジャッジ日時 2023-09-17 16:28:21
合計ジャッジ時間 11,488 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 WA -
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 WA -
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 307 ms
43,604 KB
testcase_09 AC 52 ms
11,500 KB
testcase_10 AC 204 ms
33,924 KB
testcase_11 AC 143 ms
25,212 KB
testcase_12 AC 378 ms
50,056 KB
testcase_13 AC 404 ms
53,908 KB
testcase_14 AC 194 ms
32,208 KB
testcase_15 AC 456 ms
58,164 KB
testcase_16 AC 382 ms
48,936 KB
testcase_17 AC 420 ms
52,628 KB
testcase_18 WA -
testcase_19 AC 1 ms
4,380 KB
testcase_20 AC 343 ms
54,324 KB
testcase_21 AC 463 ms
60,096 KB
testcase_22 AC 470 ms
60,148 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 237 ms
37,452 KB
testcase_29 AC 369 ms
51,616 KB
testcase_30 AC 311 ms
45,820 KB
testcase_31 AC 251 ms
39,956 KB
testcase_32 AC 359 ms
49,128 KB
testcase_33 AC 446 ms
58,396 KB
testcase_34 AC 445 ms
57,800 KB
testcase_35 AC 475 ms
59,664 KB
testcase_36 AC 475 ms
59,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <map>
#include <set>
#include <list>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdio>
#include <string>
#include <vector>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <functional>
 
#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
 
using namespace std;
 
typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;
 
const int INF=1<<29;
const double EPS=1e-9;
 
const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};
int main(int argc, char const *argv[]) {
    int N;
    cin >> N;

    std::vector<vector<long long int> > m(N, vector<long long int>(61, 0LL));
    for (int i = 0; i < N; ++i) {
        long long int temp;
        cin >> temp;
        for (int j = 0; j < 61; ++j) {
            m[i][j] = ((long long int)temp >> j & 1);
        }
    }

    set<string> se;
    
    for (int j = 0; j < 61; ++j) {
        string target = "";
        for (int i = 0; i < N; ++i) {
            string s;
            if (m[i][j] == 0) {
                s = "0";
            } else {
                s = "1";
            }
            target += s; 
        }
        //cout << target << endl;
        se.insert(target);
    }

    long long int ans = 1LL << (se.size() - 1);
    cout << ans << endl;

    return 0;
}
0