結果
問題 | No.402 最も海から遠い場所 |
ユーザー | testestest |
提出日時 | 2016-07-28 17:13:38 |
言語 | C90 (gcc 11.4.0) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 289 bytes |
コンパイル時間 | 444 ms |
コンパイル使用メモリ | 19,968 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-06 18:11:50 |
合計ジャッジ時間 | 1,951 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
6,820 KB |
testcase_01 | AC | 1 ms
6,816 KB |
testcase_02 | AC | 1 ms
6,816 KB |
testcase_03 | AC | 1 ms
6,816 KB |
testcase_04 | AC | 0 ms
6,816 KB |
testcase_05 | AC | 1 ms
6,820 KB |
testcase_06 | AC | 0 ms
6,816 KB |
testcase_07 | AC | 0 ms
6,816 KB |
testcase_08 | AC | 1 ms
6,816 KB |
testcase_09 | AC | 1 ms
6,820 KB |
testcase_10 | AC | 1 ms
6,820 KB |
testcase_11 | AC | 1 ms
6,820 KB |
testcase_12 | AC | 0 ms
6,820 KB |
testcase_13 | AC | 3 ms
6,816 KB |
testcase_14 | AC | 2 ms
6,816 KB |
testcase_15 | AC | 8 ms
6,820 KB |
testcase_16 | AC | 7 ms
6,816 KB |
testcase_17 | RE | - |
testcase_18 | RE | - |
testcase_19 | AC | 39 ms
6,816 KB |
testcase_20 | RE | - |
testcase_21 | RE | - |
コンパイルメッセージ
main.c:3:1: warning: data definition has no type or storage class 3 | a[3010][3010]; | ^ main.c:3:1: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] main.c:4:1: warning: data definition has no type or storage class 4 | j,t,s; | ^ main.c:4:1: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int] main.c:4:3: warning: type defaults to ‘int’ in declaration of ‘t’ [-Wimplicit-int] 4 | j,t,s; | ^ main.c:4:5: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int] 4 | j,t,s; | ^ main.c:5:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 5 | main(i){ | ^~~~ main.c: In function ‘main’: main.c:5:1: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int] main.c:6:9: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration] 6 | gets(&t); | ^~~~ main.c:7:18: warning: implicit declaration of function ‘getchar’ [-Wimplicit-function-declaration] 7 | while(t=~getchar()){ | ^~~~~~~ main.c:1:1: note: ‘getchar’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’? +++ |+#include <stdio.h> 1 | #define max(p,q)(p>q?p:q) main.c:15:9: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 15 | printf("%d",-~s/2); | ^~~~~~ main.c:15:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:15:9: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:15:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ /usr/bin/ld: /tmp/cc0MQedy.o: in function `main': main.c:(.text.startup+0x24): 警告: the `gets' function is dangerous and should not be used.
ソースコード
#define max(p,q)(p>q?p:q) #define min(p,q,r)(p<q?p<r?p:r:q<r?q:r) a[3010][3010]; j,t,s; main(i){ gets(&t); while(t=~getchar()){ j++; if(t==~'#'){ a[i][j]=min(a[i-1][j],a[i-1][j-1],a[i][j-1])+1; s=max(s,a[i][j]); } if(t==~'\n'){i++;j=0;} } printf("%d",-~s/2); return 0; }