結果
| 問題 |
No.730 アルファベットパネル
|
| コンテスト | |
| ユーザー |
fel1_X_925
|
| 提出日時 | 2018-09-16 18:38:43 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 326 bytes |
| コンパイル時間 | 150 ms |
| コンパイル使用メモリ | 22,400 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-18 07:27:49 |
| 合計ジャッジ時間 | 527 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%s", a);
| ~~~~~^~~~~~~~~
main.cpp:11:13: warning: ‘i’ is used uninitialized [-Wuninitialized]
11 | while(i < 11){
| ~~^~~~
ソースコード
#include <stdio.h>
int main(void)
{
char a[11];
int i,j = 0;
int sum = 0;
scanf("%s", a);
while(i < 11){
while(j < 11){
if(a[i] == a[j]){sum++;}
j++;
}
i++;
}
if(sum >= 2){
printf("NO\n");
}
else{
printf("YES\n");
}
}
fel1_X_925