結果
| 問題 |
No.2090 否定論理積と充足可能性
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-09-30 22:23:45 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 814 bytes |
| コンパイル時間 | 2,537 ms |
| コンパイル使用メモリ | 206,076 KB |
| 最終ジャッジ日時 | 2025-02-07 19:36:57 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef _RUTHEN
#include <debug.hpp>
#else
#define show(...) true
#endif
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)
template <class T> using V = vector<T>;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
V<string> A(6);
rep(i, 6) cin >> A[i];
sort(A.begin(), A.end());
A.erase(unique(A.begin(), A.end()), A.end());
V<int> B(6);
rep(i, 6) B[i] = lower_bound(A.begin(), A.end(), A[i]) - A.begin();
auto f = [](int a, int b) -> bool { return (a & b) ^ 1; };
rep(b, 1 << 6) {
if (f(f(f(b >> B[0] & 1, b >> B[1] & 1), b >> B[2] & 1), f(f(b >> B[3] & 1, b >> B[4] & 1), b >> B[5] & 1))) {
cout << "YES\n";
return 0;
}
}
cout << "NO\n";
return 0;
}