結果
問題 | No.402 最も海から遠い場所 |
ユーザー |
|
提出日時 | 2016-07-23 12:56:33 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
CE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 1,221 bytes |
コンパイル時間 | 1,429 ms |
コンパイル使用メモリ | 159,232 KB |
最終ジャッジ日時 | 2024-11-14 19:47:53 |
合計ジャッジ時間 | 2,184 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:30:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 30 | gets(maze[i]); | ^~~~ | getw
ソースコード
#include<bits/stdc++.h>using namespace std;typedef unsigned int uint;typedef long long int ll;typedef unsigned long long int ull;#define debugv(v) printf("L%d %s => ",__LINE__,#v);for(auto e:v){cout<<e<<" ";}cout<<endl;#define debugm(m) printf("L%d %s is..\n",__LINE__,#m);for(auto v:m){for(auto e:v){cout<<e<<" ";}cout<<endl;}#define debuga(m,w) printf("L%d %s is => ",__LINE__,#m);for(int x=0;x<(w);x++){cout<<(m)[x]<<" ";}cout<<endl;#define debugaa(m,w,h) printf("L%d %s is..\n",__LINE__,#m);for(int y=0;y<(h);y++){for(int x=0;x<(w);x++){cout<<(m)[x][y]<<" ";}cout<<endl;}#define ALL(v) (v).begin(),(v).end()#define BIGINT 0x7FFFFFFF#define E107 1000000007template<typename T1,typename T2>ostream& operator <<(ostream &o,const pair<T1,T2> p){o<<"("<<p.first<<":"<<p.second<<")";return o;}int h,w;char maze[5000][5000];int dp[5005][5005];int main(){int i,j,k,l;int maxi=0;cin>>h>>w;cin.ignore();for (i=1;i<=h;i++){gets(maze[i]);for (j=0;j<w;j++){if (maze[i][j]=='#'){maxi=max(dp[i][j]=min(dp[i-1][j-1],min(dp[i-1][j],dp[i][j-1]))+1,maxi);}}}cout<<(maxi+1)/2<<endl;return 0;}