結果

問題 No.2090 否定論理積と充足可能性
ユーザー 259_Momone259_Momone
提出日時 2022-09-30 21:44:17
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 679 bytes
コンパイル時間 2,480 ms
コンパイル使用メモリ 258,524 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-24 15:11:06
合計ジャッジ時間 3,451 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 2 ms
4,384 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0