結果
問題 | No.2442 線形写像 |
ユーザー |
![]() |
提出日時 | 2024-04-04 10:55:40 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 212 ms / 2,000 ms |
コード長 | 542 bytes |
コンパイル時間 | 2,252 ms |
コンパイル使用メモリ | 195,128 KB |
最終ジャッジ日時 | 2025-02-20 20:00:44 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#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;if(a[0]){cout << "No" << '\n';return 0;}for(int i = 0; i < nn; i++){for(int j = (i-1)& i; j; j=(j-1)&i){if(a[i] ^ a[j] ^ a[i^j]){cout << "No" << '\n';return 0;}}}cout << "Yes" << '\n';}