結果
問題 | No.2090 否定論理積と充足可能性 |
ユーザー |
![]() |
提出日時 | 2022-09-30 21:44:17 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 679 bytes |
コンパイル時間 | 3,147 ms |
コンパイル使用メモリ | 249,124 KB |
最終ジャッジ日時 | 2025-02-07 19:18:59 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 WA * 2 |
ソースコード
#include <bits/extc++.h>int main() {using namespace std;vector<unsigned long> A(6), V(6);for(unsigned long i{}; i < 6; ++i){cin >> A[i];[&]{for(unsigned long j{}; j < i; ++j)if(A[j] == A[i])return V[i] = V[j];return V[i] = *max_element(begin(V), begin(V) + i) + 1;}();}for(auto&& a : V)--a;for(unsigned long i{}; i < 64; ++i){transform(begin(V), end(V), begin(A), [&i](auto x){return 1UL & (i >> x);});if((!(A[0] && A[1]) && A[2]) || (!(A[3] && A[4]) && A[5])){cout << "YES" << endl;return 0;}}cout << "NO" << endl;return 0;}