結果
問題 |
No.182 新規性の虜
|
ユーザー |
👑 ![]() |
提出日時 | 2015-11-15 01:11:54 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 31 ms / 5,000 ms |
コード長 | 154 bytes |
コンパイル時間 | 594 ms |
コンパイル使用メモリ | 19,712 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 19:58:06 |
合計ジャッジ時間 | 2,240 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | n,s,a[1<<17];c(int*a,int*b){return*a-*b;}main(){for(;~scanf("%d",a+n++););qsort(a+1,--n,4,c);for(;--n;a[n]-a[n+1]&&a[n+1]-a[n+2]&&s++);s=!printf("%d",s);} | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int] main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int] 1 | n,s,a[1<<17];c(int*a,int*b){return*a-*b;}main(){for(;~scanf("%d",a+n++););qsort(a+1,--n,4,c);for(;--n;a[n]-a[n+1]&&a[n+1]-a[n+2]&&s++);s=!printf("%d",s);} | ^ main.c:1:5: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] 1 | n,s,a[1<<17];c(int*a,int*b){return*a-*b;}main(){for(;~scanf("%d",a+n++););qsort(a+1,--n,4,c);for(;--n;a[n]-a[n+1]&&a[n+1]-a[n+2]&&s++);s=!printf("%d",s);} | ^ main.c:1:14: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | n,s,a[1<<17];c(int*a,int*b){return*a-*b;}main(){for(;~scanf("%d",a+n++););qsort(a+1,--n,4,c);for(;--n;a[n]-a[n+1]&&a[n+1]-a[n+2]&&s++);s=!printf("%d",s);} | ^ main.c:1:42: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | n,s,a[1<<17];c(int*a,int*b){return*a-*b;}main(){for(;~scanf("%d",a+n++););qsort(a+1,--n,4,c);for(;--n;a[n]-a[n+1]&&a[n+1]-a[n+2]&&s++);s=!printf("%d",s);} | ^~~~ main.c: In function ‘main’: main.c:1:55: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 1 | n,s,a[1<<17];c(int*a,int*b){return*a-*b;}main(){for(;~scanf("%d",a+n++););qsort(a+1,--n,4,c);for(;--n;a[n]-a[n+1]&&a[n+1]-a[n+2]&&s++);s=!printf("%d",s);} | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | n,s,a[1<<17];c(int*a,int*b){return*a-*b;}main(){for(;~scanf("%d",a+n++););qsort(a+1,--n,4,c);for(;--n;a[n]
ソースコード
n,s,a[1<<17];c(int*a,int*b){return*a-*b;}main(){for(;~scanf("%d",a+n++););qsort(a+1,--n,4,c);for(;--n;a[n]-a[n+1]&&a[n+1]-a[n+2]&&s++);s=!printf("%d",s);}