結果
| 問題 | No.402 最も海から遠い場所 |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-07-28 17:13:26 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 278 bytes |
| 記録 | |
| コンパイル時間 | 176 ms |
| コンパイル使用メモリ | 29,380 KB |
| 最終ジャッジ日時 | 2026-02-23 22:09:47 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 19 |
コンパイルメッセージ
main.c:3:1: warning: data definition has no type or storage class
3 | a[3010][3010];
| ^
main.c:4:1: warning: data definition has no type or storage class
4 | j,t,s;
| ^
main.c: In function ‘main’:
main.c:15:9: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
15 | printf("%d",-~s/2);
| ^~~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
+++ |+#include <stdio.h>
1 | #define max(p,q)(p>q?p:q)
/usr/bin/ld: /tmp/ccfWH4Ys.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);
}
testestest