結果

問題 No.2442 線形写像
ユーザー mintmint
提出日時 2024-04-04 11:09:39
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 466 bytes
コンパイル時間 2,252 ms
コンパイル使用メモリ 203,576 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-04-04 11:09:42
合計ジャッジ時間 3,696 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n, nn; cin >> n;
    nn = 1 << n;
    vector<ull> a(nn);
    for(auto &e : a) cin >> e;
    for(int i = 0; i < nn; i++){
        for(int j = 0; ; j=(j-1)&i){
            if(a[i] ^ a[j] ^ a[i^j]){
                cout << "No" << '\n';
                return 0;
            }
        }
    }
    cout << "Yes" << '\n';
}
0