結果
問題 | No.640 76本のトロンボーン |
ユーザー | tails |
提出日時 | 2018-01-26 22:45:53 |
言語 | C (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,130 bytes |
コンパイル時間 | 1,148 ms |
コンパイル使用メモリ | 31,104 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-08 15:12:11 |
合計ジャッジ時間 | 1,791 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
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 | WA | - |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | WA | - |
testcase_07 | AC | 1 ms
5,376 KB |
testcase_08 | AC | 1 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 | WA | - |
testcase_14 | AC | 1 ms
5,376 KB |
testcase_15 | AC | 1 ms
5,376 KB |
testcase_16 | AC | 0 ms
5,376 KB |
コンパイルメッセージ
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:24:1: warning: return type defaults to 'int' [-Wimplicit-int] 24 | g(x,y,a){ | ^ main.c: In function 'g': main.c:24:1: warning: type of 'x' defaults to 'int' [-Wimplicit-int] main.c:24:1: warning: type of 'y' defaults to 'int' [-Wimplicit-int] main.c:24:1: warning: type of 'a' defaults to 'int' [-Wimplicit-int] main.c: At top level: main.c:42:1: warning: return type defaults to 'int' [-Wimplicit-int] 42 | main(x,y){ | ^~~~ main.c: In function 'main': main.c:42:1: warning: type of 'x' defaults to 'int' [-Wimplicit-int] main.c:42:1: warning: type of 'y' defaults to 'int' [-Wimplicit-int] main.c:43:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 43 | scanf("%d ",&n); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | n;r; main.c:43:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 43 | scanf("%d ",&n); | ^~~~~ main.c:43:9: note: include '<stdio
ソースコード
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;++x){ for(y=1;y<n;++y){ if(t[y][x]=='#'){ goto dame; } } ++a; dame:; } 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; } 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]; } } g(); f(); for(y=0;y<n;++y){ for(x=0;x<n;++x){ t[y][x]=s[y][n-1-x]; } } 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); }