結果

問題 No.2442 線形写像
ユーザー mint
提出日時 2024-04-04 11:09:39
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 466 bytes
コンパイル時間 2,649 ms
コンパイル使用メモリ 195,188 KB
最終ジャッジ日時 2025-02-20 20:00:52
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 12
権限があれば一括ダウンロードができます

ソースコード

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