結果
問題 | No.184 たのしい排他的論理和(HARD) |
ユーザー | kakira9618 |
提出日時 | 2015-04-17 01:55:24 |
言語 | C++11 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,598 bytes |
コンパイル時間 | 706 ms |
コンパイル使用メモリ | 94,892 KB |
実行使用メモリ | 60,108 KB |
最終ジャッジ日時 | 2023-09-17 16:28:09 |
合計ジャッジ時間 | 10,030 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,380 KB |
testcase_01 | AC | 1 ms
4,376 KB |
testcase_02 | AC | 2 ms
4,376 KB |
testcase_03 | WA | - |
testcase_04 | AC | 1 ms
4,380 KB |
testcase_05 | AC | 1 ms
4,376 KB |
testcase_06 | WA | - |
testcase_07 | AC | 2 ms
4,376 KB |
testcase_08 | AC | 305 ms
43,444 KB |
testcase_09 | AC | 53 ms
11,584 KB |
testcase_10 | AC | 204 ms
33,968 KB |
testcase_11 | AC | 146 ms
25,264 KB |
testcase_12 | AC | 353 ms
50,088 KB |
testcase_13 | AC | 415 ms
53,876 KB |
testcase_14 | AC | 191 ms
32,428 KB |
testcase_15 | AC | 474 ms
58,164 KB |
testcase_16 | AC | 365 ms
48,956 KB |
testcase_17 | AC | 435 ms
52,616 KB |
testcase_18 | WA | - |
testcase_19 | AC | 2 ms
4,376 KB |
testcase_20 | AC | 308 ms
54,272 KB |
testcase_21 | AC | 445 ms
60,064 KB |
testcase_22 | AC | 425 ms
60,108 KB |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | AC | 229 ms
37,484 KB |
testcase_29 | AC | 367 ms
51,540 KB |
testcase_30 | AC | 311 ms
45,772 KB |
testcase_31 | AC | 242 ms
40,000 KB |
testcase_32 | AC | 326 ms
49,148 KB |
testcase_33 | AC | 450 ms
58,664 KB |
testcase_34 | AC | 470 ms
57,888 KB |
testcase_35 | AC | 478 ms
59,576 KB |
testcase_36 | AC | 500 ms
59,348 KB |
ソースコード
#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>(60, 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; }