結果
問題 | No.730 アルファベットパネル |
ユーザー |
|
提出日時 | 2018-09-07 21:47:11 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 412 bytes |
コンパイル時間 | 366 ms |
コンパイル使用メモリ | 23,040 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-29 12:27:35 |
合計ジャッジ時間 | 774 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%s",S); | ~~~~~^~~~~~~~
ソースコード
#include <stdio.h>#include <string.h>int cnt[26];char S[11];int main(){memset(cnt,0,sizeof(cnt));scanf("%s",S);for(int i = 0; i < strlen(S); i++){cnt[S[i]-'A']++;}for(int i = 0; i < 26; i++){if(cnt[i] >= 2){puts("NO");return 0;}}puts("YES");}