結果

問題 No.2270 T0空間
ユーザー t98slidert98slider
提出日時 2023-04-14 22:30:14
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 413 ms / 2,000 ms
コード長 589 bytes
コンパイル時間 1,878 ms
コンパイル使用メモリ 167,292 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-18 20:01:42
合計ジャッジ時間 5,661 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 96 ms
5,376 KB
testcase_12 AC 46 ms
5,376 KB
testcase_13 AC 166 ms
5,376 KB
testcase_14 AC 167 ms
5,376 KB
testcase_15 AC 167 ms
5,376 KB
testcase_16 AC 250 ms
5,376 KB
testcase_17 AC 411 ms
5,376 KB
testcase_18 AC 413 ms
5,376 KB
testcase_19 AC 142 ms
5,376 KB
testcase_20 AC 140 ms
5,376 KB
testcase_21 AC 140 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n, m;
    cin >> n >> m;
    vector<bitset<256>> B(256);
    for(int i = 0; i < m; i++){
        bitset<256> b;
        cin >> b;
        for(int j = 0; j < n; j++){
            if(b[j] == 0) B[j] |= b;
        }
    }
    for(int i = 0; i < n; i++){
        for(int j = i + 1; j < n; j++){
            if(!(B[i][j] | B[j][i])){
                cout << "No" << '\n';
                return 0;
            }
        }
    }
    cout << "Yes" << '\n';
}
0