結果

問題 No.2270 T0空間
ユーザー 👑 chro_96chro_96
提出日時 2023-04-14 22:16:04
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 498 bytes
コンパイル時間 1,261 ms
コンパイル使用メモリ 30,080 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-18 19:44:28
合計ジャッジ時間 3,563 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <stdio.h>

int main () {
  int n = 0;
  int m = 0;
  char s[257] = "";
  
  int res = 0;
  
  int v[256] = {};
  int cnt[4] = {};
  
  res = scanf("%d", &n);
  res = scanf("%d", &m);
  for (int i = 0; i < m; i++) {
    res = scanf("%s", s);
    for (int j = 0; j < n; j++) {
      v[j] |= (1<<((int)(s[j]-'0')));
    }
  }
  
  for (int i = 0; i < n; i++) {
    cnt[v[i]]++;
  }
  
  if (cnt[1] > 1 || cnt[2] > 1) {
    printf("No\n");
  } else {
    printf("Yes\n");
  }
  
  return 0;
}
0