結果
| 問題 | No.190 Dry Wet Moist |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-04-22 05:06:50 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 268 bytes |
| 記録 | |
| コンパイル時間 | 129 ms |
| コンパイル使用メモリ | 30,148 KB |
| 最終ジャッジ日時 | 2026-02-23 18:18:39 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 11 WA * 17 |
コンパイルメッセージ
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(;~scanf("%d",&v[N++]););qsort(v+1,N-=2,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(;~scanf("%d",&v[N++]););qsort(v+1,N-=2,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:58: 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(;~scanf("%d",&v[N++]););qsort(v+1,N-=2,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=1,h=N;l<h;C)for(;l<h;l<h&&(D))if(v[l]+v[h]P 0)break;l=!printf("%d ",R);
main.c:1:82: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
1 | #define Z(C,D,P)for(R=0,l=1,h=N;l<h;C)for(;l<h;l<h&&(D))if(v[l]+v[h]P 0)break;l=!printf("%d ",R);
| ^~~~~~
main.c:2:100: note: in expansion of macro ‘Z’
2 | c(int*a,int*b){return*a-*b;}v['abc'],N,R,l;main(h){for(;~scanf("%d",&v[N++]););qsort(v+1,N-=2,4,c);Z(R++|l++|h--,h--,<)Z(R++|l++|h--,l++,>)Z(v[l++]+v[h]||R++|h--,h--,<=)}
| ^
main.c:1:82: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
1 | #define Z(C,D,P)for(R=0,l=1,h=N;l<h;C)for(;l<h;l
ソースコード
#define Z(C,D,P)for(R=0,l=1,h=N;l<h;C)for(;l<h;l<h&&(D))if(v[l]+v[h]P 0)break;l=!printf("%d ",R);
c(int*a,int*b){return*a-*b;}v['abc'],N,R,l;main(h){for(;~scanf("%d",&v[N++]););qsort(v+1,N-=2,4,c);Z(R++|l++|h--,h--,<)Z(R++|l++|h--,l++,>)Z(v[l++]+v[h]||R++|h--,h--,<=)}