結果
問題 |
No.182 新規性の虜
|
ユーザー |
👑 ![]() |
提出日時 | 2015-12-18 16:02:02 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 27 ms / 5,000 ms |
コード長 | 152 bytes |
コンパイル時間 | 260 ms |
コンパイル使用メモリ | 19,712 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 20:00:25 |
合計ジャッジ時間 | 1,719 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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;s+=a[n]-a[n+1]&&a[n+1]-a[n+2]);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;s+=a[n]-a[n+1]&&a[n+1]-a[n+2]);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;s+=a[n]-a[n+1]&&a[n+1]-a[n+2]);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;s+=a[n]-a[n+1]&&a[n+1]-a[n+2]);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;s+=a[n]-a[n+1]&&a[n+1]-a[n+2]);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;s+=a[n]-a[n+1]&&a[n+1]-a[n+2]);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;s+=a[n]-a[n+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;s+=a[n]-a[n+1]&&a[n+1]-a[n+2]);s=!printf("%d",s);}