結果
問題 | No.402 最も海から遠い場所 |
ユーザー | %20 |
提出日時 | 2018-05-31 22:17:08 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 174 ms / 3,000 ms |
コード長 | 274 bytes |
コンパイル時間 | 119 ms |
コンパイル使用メモリ | 30,464 KB |
実行使用メモリ | 36,988 KB |
最終ジャッジ日時 | 2024-06-30 08:41:55 |
合計ジャッジ時間 | 2,121 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,812 KB |
testcase_01 | AC | 1 ms
6,944 KB |
testcase_02 | AC | 1 ms
6,944 KB |
testcase_03 | AC | 1 ms
6,940 KB |
testcase_04 | AC | 1 ms
6,944 KB |
testcase_05 | AC | 1 ms
6,944 KB |
testcase_06 | AC | 1 ms
6,940 KB |
testcase_07 | AC | 1 ms
6,940 KB |
testcase_08 | AC | 1 ms
6,940 KB |
testcase_09 | AC | 1 ms
6,944 KB |
testcase_10 | AC | 1 ms
6,940 KB |
testcase_11 | AC | 1 ms
6,944 KB |
testcase_12 | AC | 2 ms
6,944 KB |
testcase_13 | AC | 2 ms
6,944 KB |
testcase_14 | AC | 2 ms
6,944 KB |
testcase_15 | AC | 7 ms
8,192 KB |
testcase_16 | AC | 9 ms
8,612 KB |
testcase_17 | AC | 86 ms
23,936 KB |
testcase_18 | AC | 173 ms
36,956 KB |
testcase_19 | AC | 174 ms
36,860 KB |
testcase_20 | AC | 173 ms
36,988 KB |
testcase_21 | AC | 173 ms
36,984 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | S[3002][3002],H,W,x,y,z; | ^ main.c:1:1: warning: type defaults to 'int' in declaration of 'S' [-Wimplicit-int] main.c:1:15: warning: type defaults to 'int' in declaration of 'H' [-Wimplicit-int] 1 | S[3002][3002],H,W,x,y,z; | ^ main.c:1:17: warning: type defaults to 'int' in declaration of 'W' [-Wimplicit-int] 1 | S[3002][3002],H,W,x,y,z; | ^ main.c:1:19: warning: type defaults to 'int' in declaration of 'x' [-Wimplicit-int] 1 | S[3002][3002],H,W,x,y,z; | ^ main.c:1:21: warning: type defaults to 'int' in declaration of 'y' [-Wimplicit-int] 1 | S[3002][3002],H,W,x,y,z; | ^ main.c:1:23: warning: type defaults to 'int' in declaration of 'z' [-Wimplicit-int] 1 | S[3002][3002],H,W,x,y,z; | ^ main.c:2:1: warning: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:3:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | scanf("%d%d ",&H,&W); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | S[3002][3002],H,W,x,y,z; main.c:3:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 3 | scanf("%d%d ",&H,&W); | ^~~~~ main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:5:25: warning: implicit declaration of function 'getchar' [-Wimplicit-function-declaration] 5 | S[y][x]=getchar()=='#'?1e9:0; | ^~~~~~~ main.c:5:25: note: 'getchar' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'? main.c:8:19: warning: implicit declaration of function 'fmax' [-Wimplicit-function-declaration] 8 | z
ソースコード
S[3002][3002],H,W,x,y,z; main(){ scanf("%d%d ",&H,&W); for(y=1;y<=H;++y)for(x=1;x<=W+1;++x){ S[y][x]=getchar()=='#'?1e9:0; } for(y=1;y<=H;++y)for(x=1;x<=W;++x){ z=fmax(z,S[y][x]=fmin(S[y][x],fmin(S[y-1][x-1],fmin(S[y-1][x],S[y][x-1]))+1)); } printf("%d",-~z/2); }