結果
問題 | No.2911 位相の公理 |
ユーザー |
|
提出日時 | 2024-10-12 12:48:30 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 640 bytes |
コンパイル時間 | 2,069 ms |
コンパイル使用メモリ | 197,520 KB |
最終ジャッジ日時 | 2025-02-24 17:28:27 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 WA * 5 RE * 6 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){ios::sync_with_stdio(false);cin.tie(0);int n, m;cin >> n >> m;vector<bool> tb(1 << n), dp(1 << n);vector<int> a(m);dp[0] = true;for(auto &&v : a){cin >> v;tb[v] = true;for(int j = dp.size() - 1; j >= 0; j--){if(dp[j]) dp[j | v] = true;}}for(int i = 0; i < n; i++){for(int j = 0; j < i; j++){if(!tb[a[i] & a[j]]){cout << "No\n";exit(0);}}}cout << (dp == tb && tb.back() ? "Yes" : "No") << '\n';}