結果
| 問題 | No.351 市松スライドパズル |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-03-12 19:35:11 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 131 ms / 2,000 ms |
| コード長 | 192 bytes |
| 記録 | |
| コンパイル時間 | 98 ms |
| コンパイル使用メモリ | 29,380 KB |
| 最終ジャッジ日時 | 2026-02-23 20:52:37 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 17 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | c[1<<20],d[1<<20],a[2],h[2],q;main(i){for(scanf("%d%d%*d",h+1,h);~scanf("\n%c%d",c+i,d+i);i++);for(;--i;)a[q=c[i]&1]==d[i]?a[1-q]=(a[1-q]+h[q]-1)%h[q]:0;*a=!printf(*a+a[1]&1?"black":"white");}
| ^
main.c: In function ‘main’:
main.c:1:43: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
1 | c[1<<20],d[1<<20],a[2],h[2],q;main(i){for(scanf("%d%d%*d",h+1,h);~scanf("\n%c%d",c+i,d+i);i++);for(;--i;)a[q=c[i]&1]==d[i]?a[1-q]=(a[1-q]+h[q]-1)%h[q]:0;*a=!printf(*a+a[1]&1?"black":"white");}
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | c[1<<20],d[1<<20],a[2],h[2],q;main(i){for(scanf("%d%d%*d",h+1,h);~scanf("\n%c%d",c+i,d+i);i++);for(;--i;)a[q=c[i]&1]==d[i]?a[1-q]=(a[1-q]+h[q]-1)%h[q]:0;*a=!printf(*a+a[1]&1?"black":"white");}
main.c:1:77: warning: format ‘%c’ expects argument of type ‘char *’, but argument 2 has type ‘int *’ [-Wformat=]
1 | c[1<<20],d[1<<20],a[2],h[2],q;main(i){for(scanf("%d%d%*d",h+1,h);~scanf("\n%c%d",c+i,d+i);i++);for(;--i;)a[q=c[i]&1]==d[i]?a[1-q]=(a[1-q]+h[q]-1)%h[q]:0;*a=!printf(*a+a[1]&1?"black":"white");}
| ~^ ~~~
| | |
| | int *
| char *
| %lc
main.c:1:158: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
1 | c[1<<20],d[1<<20],a[2],h[2],q;main(i){for(scanf("%d%d%*d",h+1,h);~scanf("\n%c%d",c+i,
ソースコード
c[1<<20],d[1<<20],a[2],h[2],q;main(i){for(scanf("%d%d%*d",h+1,h);~scanf("\n%c%d",c+i,d+i);i++);for(;--i;)a[q=c[i]&1]==d[i]?a[1-q]=(a[1-q]+h[q]-1)%h[q]:0;*a=!printf(*a+a[1]&1?"black":"white");}
testestest