結果
問題 | No.2270 T0空間 |
ユーザー |
|
提出日時 | 2023-04-14 22:40:35 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 994 ms / 2,000 ms |
コード長 | 386 bytes |
コンパイル時間 | 2,114 ms |
コンパイル使用メモリ | 201,424 KB |
最終ジャッジ日時 | 2025-02-12 07:26:30 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d%d", &N, &M); | ~~~~~^~~~~~~~~~~~~~~~ main.cpp:14:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 14 | scanf(" %c ", &c); | ~~~~~^~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int N, M, i, j; char c; scanf("%d%d", &N, &M); string S[N]; for(i = 0; i < N; ++i){ S[i] = ""; } for(i = 0; i < M; ++i){ for(j = 0;j < N; ++j){ scanf(" %c ", &c); S[j] += c; } } sort(S, S + N); for(i = 0;i < N - 1; ++i){ if(S[i] == S[i + 1]){ printf("No\n"); return 0; } } printf("Yes\n"); }