結果
| 問題 |
No.27 板の準備
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-11-26 18:04:05 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 321 bytes |
| コンパイル時間 | 3,374 ms |
| コンパイル使用メモリ | 37,120 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2025-02-24 14:46:30 |
| 合計ジャッジ時間 | 4,224 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 18 |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class
2 | B[99],V[4],X[4],T=98,R,i,r;main(j){scanf("%d%d%d%d",V,V+1,V+2,V+3);R=T;Z(1)Z(2)Z(3){for(j=-1;++j<T;)B[j]=!j;for(i=4;--i;)for(j=X[i];j<T;j++)if(B[j-X[i]]&&(!B[j]||B[j]>B[j-X[i]]))B[j]=B[j-X[i]]+1;for(i=r=0;i<4&&B[V[i]];)r+=B[V[i++]]-1;if(i>3)R=fmin(R,r);}R=!printf("%d\n",R);}
| ^
main.c: In function 'main':
main.c:2:36: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
2 | B[99],V[4],X[4],T=98,R,i,r;main(j){scanf("%d%d%d%d",V,V+1,V+2,V+3);R=T;Z(1)Z(2)Z(3){for(j=-1;++j<T;)B[j]=!j;for(i=4;--i;)for(j=X[i];j<T;j++)if(B[j-X[i]]&&(!B[j]||B[j]>B[j-X[i]]))B[j]=B[j-X[i]]+1;for(i=r=0;i<4&&B[V[i]];)r+=B[V[i++]]-1;if(i>3)R=fmin(R,r);}R=!printf("%d\n",R);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #define Z(i)for(X[i]=X[i-1]+1;X[i]<31;X[i]++)
main.c:2:258: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
2 | B[99],V[4],X[4],T=98,R,i,r;main(j){scanf("%d%d%d%d",V,V+1,V+2,V+3);R=T;Z(1)Z(2)Z(3){for(j=-1;++j<T;)B[j]=!j;for(i=4;--i;)for(j=X[i];j<T;j++)if(B[j-X[i]]&&(!B[j]||B[j]>B[j-X[i]]))B[j]=B[j-X[i]]+1;for(i=r=0;i<4&&B[V[i]];)r+=B[V[i++]]-1;if(i>3)R=fmin(R,r);}R=!printf("%d\n",R);}
| ^~~~~~
main.c:2:258: note: include '<stdio.h>' or provide a declaration of 'printf'
ソースコード
#define Z(i)for(X[i]=X[i-1]+1;X[i]<31;X[i]++)
B[99],V[4],X[4],T=98,R,i,r;main(j){scanf("%d%d%d%d",V,V+1,V+2,V+3);R=T;Z(1)Z(2)Z(3){for(j=-1;++j<T;)B[j]=!j;for(i=4;--i;)for(j=X[i];j<T;j++)if(B[j-X[i]]&&(!B[j]||B[j]>B[j-X[i]]))B[j]=B[j-X[i]]+1;for(i=r=0;i<4&&B[V[i]];)r+=B[V[i++]]-1;if(i>3)R=fmin(R,r);}R=!printf("%d\n",R);}