結果
問題 | No.290 1010 |
ユーザー | notetonous |
提出日時 | 2016-04-14 23:50:45 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 5 ms / 5,000 ms |
コード長 | 405 bytes |
コンパイル時間 | 155 ms |
コンパイル使用メモリ | 19,328 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-04 09:07:36 |
合計ジャッジ時間 | 945 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,248 KB |
testcase_02 | AC | 1 ms
5,248 KB |
testcase_03 | AC | 1 ms
5,248 KB |
testcase_04 | AC | 1 ms
5,248 KB |
testcase_05 | AC | 2 ms
5,248 KB |
testcase_06 | AC | 1 ms
5,248 KB |
testcase_07 | AC | 1 ms
5,248 KB |
testcase_08 | AC | 1 ms
5,248 KB |
testcase_09 | AC | 1 ms
5,248 KB |
testcase_10 | AC | 1 ms
5,248 KB |
testcase_11 | AC | 1 ms
5,248 KB |
testcase_12 | AC | 1 ms
5,248 KB |
testcase_13 | AC | 2 ms
5,248 KB |
testcase_14 | AC | 1 ms
5,248 KB |
testcase_15 | AC | 1 ms
5,248 KB |
testcase_16 | AC | 1 ms
5,248 KB |
testcase_17 | AC | 1 ms
5,248 KB |
testcase_18 | AC | 1 ms
5,248 KB |
testcase_19 | AC | 1 ms
5,248 KB |
testcase_20 | AC | 5 ms
5,248 KB |
testcase_21 | AC | 5 ms
5,248 KB |
testcase_22 | AC | 4 ms
5,248 KB |
testcase_23 | AC | 5 ms
5,248 KB |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:3: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 6 | scanf("%d",&n); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | int main(){ main.c:6:3: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 6 | scanf("%d",&n); | ^~~~~ main.c:6:3: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:8:11: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 8 | if(n==1)printf("NO\n"); | ^~~~~~ main.c:8:11: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:8:11: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:8:11: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:10:20: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] 10 | if(s[0]!=s[1]) printf("NO\n"); | ^~~~~~ main.c:10:20: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:11:10: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] 11 | else printf("YES\n"); | ^~~~~~ main.c:11:10: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:14:44: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] 14 | if(s[0]=='0' && s[1]=='1' && s[2]=='0')printf("NO\n"); | ^~~~~~ main.c:14:44: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:15:49: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration
ソースコード
int main(){ int n; char s[1000000]; int i,j; scanf("%d",&n); scanf("%s",s); if(n==1)printf("NO\n"); else if (n==2){ if(s[0]!=s[1]) printf("NO\n"); else printf("YES\n"); } else if(n==3){ if(s[0]=='0' && s[1]=='1' && s[2]=='0')printf("NO\n"); else if(s[0]=='1' && s[1]=='0' && s[2]=='1')printf("NO\n"); else printf("YES\n"); } else printf("YES\n"); return 0; }