結果
| 問題 | No.190 Dry Wet Moist |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-04-22 05:26:09 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 54 ms / 2,000 ms |
| コード長 | 265 bytes |
| 記録 | |
| コンパイル時間 | 202 ms |
| コンパイル使用メモリ | 30,152 KB |
| 最終ジャッジ日時 | 2026-02-23 18:18:57 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 28 |
コンパイルメッセージ
main.c:2:31: warning: multi-character character constant [-Wmultichar]
2 | c(int*a,int*b){return*a-*b;}v['abc'],N,R,l;main(h){for(N--;~scanf("%d",&v[N++]););qsort(v,N-=1,4,c);Z(R++|l++|h--,h--,>=)Z(R++|l++|h--,l++,<=)Z(v[l++]+v[h]||R++|h--,h--,>)}
| ^~~~~
main.c:2:29: warning: data definition has no type or storage class
2 | c(int*a,int*b){return*a-*b;}v['abc'],N,R,l;main(h){for(N--;~scanf("%d",&v[N++]););qsort(v,N-=1,4,c);Z(R++|l++|h--,h--,>=)Z(R++|l++|h--,l++,<=)Z(v[l++]+v[h]||R++|h--,h--,>)}
| ^
main.c: In function ‘main’:
main.c:2:61: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
2 | c(int*a,int*b){return*a-*b;}v['abc'],N,R,l;main(h){for(N--;~scanf("%d",&v[N++]););qsort(v,N-=1,4,c);Z(R++|l++|h--,h--,>=)Z(R++|l++|h--,l++,<=)Z(v[l++]+v[h]||R++|h--,h--,>)}
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | #define Z(C,D,P)for(R=0,l=0,h=N-1;l<h;l<h&&(C))for(;l<h&&v[l]+v[h]P 0;D);l=!printf("%d ",R);
main.c:1:77: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
1 | #define Z(C,D,P)for(R=0,l=0,h=N-1;l<h;l<h&&(C))for(;l<h&&v[l]+v[h]P 0;D);l=!printf("%d ",R);
| ^~~~~~
main.c:2:101: note: in expansion of macro ‘Z’
2 | c(int*a,int*b){return*a-*b;}v['abc'],N,R,l;main(h){for(N--;~scanf("%d",&v[N++]););qsort(v,N-=1,4,c);Z(R++|l++|h--,h--,>=)Z(R++|l++|h--,l++,<=)Z(v[l++]+v[h]||R++|h--,h--,>)}
| ^
main.c:1:77: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
1 | #define Z(C,D,P)for(R=0,l=0,h=N-1;l<h;l<h&&(C))for(
ソースコード
#define Z(C,D,P)for(R=0,l=0,h=N-1;l<h;l<h&&(C))for(;l<h&&v[l]+v[h]P 0;D);l=!printf("%d ",R);
c(int*a,int*b){return*a-*b;}v['abc'],N,R,l;main(h){for(N--;~scanf("%d",&v[N++]););qsort(v,N-=1,4,c);Z(R++|l++|h--,h--,>=)Z(R++|l++|h--,l++,<=)Z(v[l++]+v[h]||R++|h--,h--,>)}