結果
問題 | No.402 最も海から遠い場所 |
ユーザー | %20 |
提出日時 | 2018-05-31 22:23:49 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 136 ms / 3,000 ms |
コード長 | 205 bytes |
コンパイル時間 | 112 ms |
コンパイル使用メモリ | 28,544 KB |
実行使用メモリ | 36,992 KB |
最終ジャッジ日時 | 2024-06-30 08:43:41 |
合計ジャッジ時間 | 1,827 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 1 ms
5,376 KB |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | AC | 1 ms
5,376 KB |
testcase_07 | AC | 1 ms
5,376 KB |
testcase_08 | AC | 2 ms
5,376 KB |
testcase_09 | AC | 1 ms
5,376 KB |
testcase_10 | AC | 1 ms
5,376 KB |
testcase_11 | AC | 1 ms
5,376 KB |
testcase_12 | AC | 1 ms
5,376 KB |
testcase_13 | AC | 2 ms
5,376 KB |
testcase_14 | AC | 2 ms
5,376 KB |
testcase_15 | AC | 8 ms
5,376 KB |
testcase_16 | AC | 10 ms
5,632 KB |
testcase_17 | AC | 93 ms
23,808 KB |
testcase_18 | AC | 131 ms
36,844 KB |
testcase_19 | AC | 47 ms
5,376 KB |
testcase_20 | AC | 136 ms
36,864 KB |
testcase_21 | AC | 108 ms
36,992 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:17: warning: implicit declaration of function 'getchar' [-Wimplicit-function-declaration] 5 | getchar()=='#'?z=fmax(z,S[y][x]=fmin(S[y-1][x-1],fmin(S[y-1][x],S[y][x-1]))+1):0; | ^~~~~~~ main.c:5:17: note: 'getchar' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'? main.c:5:34: warning: implicit declaration of function 'fmax' [-Wimplicit-fun
ソースコード
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){ getchar()=='#'?z=fmax(z,S[y][x]=fmin(S[y-1][x-1],fmin(S[y-1][x],S[y][x-1]))+1):0; } printf("%d",-~z/2); }