結果
問題 |
No.247 線形計画問題もどき
|
ユーザー |
👑 ![]() |
提出日時 | 2016-03-05 23:20:03 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 32 ms / 2,000 ms |
コード長 | 136 bytes |
コンパイル時間 | 268 ms |
コンパイル使用メモリ | 20,608 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-07 11:15:03 |
合計ジャッジ時間 | 1,228 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 23 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | x[1<<18],c,*p;main(j){for(scanf("%d",&c);~scanf("%d",&j);*x=1)for(p=x;p-x<1e5;p++)*p&&!p[j]|p[j]>*p?p[j]=1+*p:0;c=!printf("%d",x[c]-1);} | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int] main.c:1:10: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int] 1 | x[1<<18],c,*p;main(j){for(scanf("%d",&c);~scanf("%d",&j);*x=1)for(p=x;p-x<1e5;p++)*p&&!p[j]|p[j]>*p?p[j]=1+*p:0;c=!printf("%d",x[c]-1);} | ^ main.c:1:13: warning: type defaults to ‘int’ in declaration of ‘p’ [-Wimplicit-int] 1 | x[1<<18],c,*p;main(j){for(scanf("%d",&c);~scanf("%d",&j);*x=1)for(p=x;p-x<1e5;p++)*p&&!p[j]|p[j]>*p?p[j]=1+*p:0;c=!printf("%d",x[c]-1);} | ^ main.c:1:15: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | x[1<<18],c,*p;main(j){for(scanf("%d",&c);~scanf("%d",&j);*x=1)for(p=x;p-x<1e5;p++)*p&&!p[j]|p[j]>*p?p[j]=1+*p:0;c=!printf("%d",x[c]-1);} | ^~~~ main.c: In function ‘main’: main.c:1:15: warning: type of ‘j’ defaults to ‘int’ [-Wimplicit-int] main.c:1:27: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 1 | x[1<<18],c,*p;main(j){for(scanf("%d",&c);~scanf("%d",&j);*x=1)for(p=x;p-x<1e5;p++)*p&&!p[j]|p[j]>*p?p[j]=1+*p:0;c=!printf("%d",x[c]-1);} | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | x[1<<18],c,*p;main(j){for(scanf("%d",&c);~scanf("%d",&j);*x=1)for(p=x;p-x<1e5;p++)*p&&!p[j]|p[j]>*p?p[j]=1+*p:0;c=!printf("%d",x[c]-1);} main.c:1:27: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 1 | x[1<<18],c,*p;main(j){for(scanf("%d",&c);~scanf("%d",&j);*x=1)for(p=x;p-x<1e5;p++)*p&&!p[j]|p[j]>*p?p[j]=1+*p:0;c=!printf("%d",x[c]-1);} |
ソースコード
x[1<<18],c,*p;main(j){for(scanf("%d",&c);~scanf("%d",&j);*x=1)for(p=x;p-x<1e5;p++)*p&&!p[j]|p[j]>*p?p[j]=1+*p:0;c=!printf("%d",x[c]-1);}