結果
問題 | No.640 76本のトロンボーン |
ユーザー |
![]() |
提出日時 | 2018-01-26 22:57:58 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 1,431 bytes |
コンパイル時間 | 1,133 ms |
コンパイル使用メモリ | 31,360 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-20 17:20:54 |
合計ジャッジ時間 | 1,457 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | n;r; | ^ main.c:1:1: warning: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:1:3: warning: data definition has no type or storage class 1 | n;r; | ^ main.c:1:3: warning: type defaults to 'int' in declaration of 'r' [-Wimplicit-int] main.c:5:1: warning: return type defaults to 'int' [-Wimplicit-int] 5 | f(x,y,a){ | ^ main.c: In function 'f': main.c:5:1: warning: type of 'x' defaults to 'int' [-Wimplicit-int] main.c:5:1: warning: type of 'y' defaults to 'int' [-Wimplicit-int] main.c:5:1: warning: type of 'a' defaults to 'int' [-Wimplicit-int] main.c:8:25: warning: 'return' with no value, in function returning non-void 8 | return; | ^~~~~~ main.c:5:1: note: declared here 5 | f(x,y,a){ | ^ main.c: At top level: main.c:33:1: warning: return type defaults to 'int' [-Wimplicit-int] 33 | g(x,y,a){ | ^ main.c: In function 'g': main.c:33:1: warning: type of 'x' defaults to 'int' [-Wimplicit-int] main.c:33:1: warning: type of 'y' defaults to 'int' [-Wimplicit-int] main.c:33:1: warning: type of 'a' defaults to 'int' [-Wimplicit-int] main.c: At top level: main.c:50:1: warning: return type defaults to 'int' [-Wimplicit-int] 50 | h(i){ | ^ main.c: In function 'h': main.c:50:1: warning: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:52:34: warning: 'return' with no value, in function returning non-void 52 | if(t[0][i]=='#') return; | ^~~~~~ main.c:50:1: note: declared here 50 | h(i){ | ^ main.c:53:36: warning: 'return' with no value, in function returning non-void 53 | if(t[n-1][i]=='#') return; | ^~~~~~ main.c:50:1: note: declared here 50 | h(i){ | ^ main.c:54:34: warning: 'return' with no value, in function returning non-void 54 |
ソースコード
n;r;char s[99][99];char t[99][99];f(x,y,a){for(x=0;x<n-1;++x){if(t[0][x]=='#'){return;}}a=1;for(x=0;x<n-1;++x){for(y=1;y<n;++y){if(t[y][x]=='#'){goto dame1;}}++a;dame1:;}if(t[0][n-1]!='#'||t[n-1][n-1]!='#'){for(y=1;y<n-1;++y){if(t[y][n-1]=='#'){goto dame2;}}++a;dame2:;}if(r<a) r=a;}g(x,y,a){a=0;for(x=0;x<n;++x){if(t[0][x]=='#'&&t[n-1][x]=='#'){goto dame;}for(y=1;y<n-1;++y){if(t[y][x]=='#'){goto dame;}}++a;dame:;}if(r<a) r=a;}h(i){for(i=0;i<n;++i){if(t[0][i]=='#') return;if(t[n-1][i]=='#') return;if(t[i][0]=='#') return;if(t[i][n-1]=='#') return;}if(r<4) r=4;}main(x,y){scanf("%d ",&n);for(y=0;y<n;++y){gets(s[y]);}for(y=0;y<n;++y){for(x=0;x<n;++x){t[y][x]=s[y][x];}}h();g();f();for(y=0;y<n;++y){for(x=0;x<n;++x){t[y][x]=s[y][n-1-x];}}h();f();for(y=0;y<n;++y){for(x=0;x<n;++x){t[y][x]=s[n-1-y][x];}}f();for(y=0;y<n;++y){for(x=0;x<n;++x){t[y][x]=s[n-1-y][n-1-x];}}f();for(y=0;y<n;++y){for(x=0;x<n;++x){t[y][x]=s[x][y];}}g();f();for(y=0;y<n;++y){for(x=0;x<n;++x){t[y][x]=s[x][n-1-y];}}f();for(y=0;y<n;++y){for(x=0;x<n;++x){t[y][x]=s[n-1-x][y];}}f();for(y=0;y<n;++y){for(x=0;x<n;++x){t[y][x]=s[n-1-x][n-1-y];}}f();printf("%d",r);}