結果
| 問題 | No.182 新規性の虜 |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2015-08-08 17:17:11 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 23 ms / 5,000 ms |
| コード長 | 193 bytes |
| 記録 | |
| コンパイル時間 | 121 ms |
| コンパイル使用メモリ | 29,480 KB |
| 最終ジャッジ日時 | 2026-02-23 19:04:50 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
コンパイルメッセージ
main.c:1:55: warning: data definition has no type or storage class
1 | c(const void*a,const void*b){return*(int*)a-*(int*)b;}i,s,a[1<<17];main(n){for(scanf("%d",&n);~scanf("%d",++i+a););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:80: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
1 | c(const void*a,const void*b){return*(int*)a-*(int*)b;}i,s,a[1<<17];main(n){for(scanf("%d",&n);~scanf("%d",++i+a););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 | c(const void*a,const void*b){return*(int*)a-*(int*)b;}i,s,a[1<<17];main(n){for(scanf("%d",&n);~scanf("%d",++i+a););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:178: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
1 | c(const void*a,const void*b){return*(int*)a-*(int*)b;}i,s,a[1<<17];main(n){for(scanf("%d",&n);~scanf("%d",++i+a););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:178: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
c(const void*a,const void*b){return*(int*)a-*(int*)b;}i,s,a[1<<17];main(n){for(scanf("%d",&n);~scanf("%d",++i+a););qsort(a+1,n,4,c);for(;n--;a[n]-a[n+1]&&a[n+1]-a[n+2]&&s++);s=!printf("%d",s);}
testestest