結果
| 問題 | No.61 リベリオン |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-07-31 21:49:07 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 257 bytes |
| 記録 | |
| コンパイル時間 | 185 ms |
| コンパイル使用メモリ | 30,528 KB |
| 最終ジャッジ日時 | 2026-02-23 22:10:41 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | AC * 1 WA * 1 RE * 2 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | w,h,p,q,r,s,t,u,d,v,i,x,y;g(p,q){v=q?g(q,p%q):abs(p);}main(){for(gets(&i);v=~scanf("%d%d%d%d%d%d%d%d%d",&w,&h,&d,&p,&q,&r,&s,&t,&u);i=!puts(i>d*v|i>2e4?"Miss":"Hit"))for(g(t,u),w*=2,h*=2;i<3e4&&((x=abs(r+=t/v)%w)-p&&w-x-p||(y=abs(s+=u/v)%h)-q&&h-y-q);)i++;}
| ^
main.c: In function ‘main’:
main.c:1:78: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
1 | w,h,p,q,r,s,t,u,d,v,i,x,y;g(p,q){v=q?g(q,p%q):abs(p);}main(){for(gets(&i);v=~scanf("%d%d%d%d%d%d%d%d%d",&w,&h,&d,&p,&q,&r,&s,&t,&u);i=!puts(i>d*v|i>2e4?"Miss":"Hit"))for(g(t,u),w*=2,h*=2;i<3e4&&((x=abs(r+=t/v)%w)-p&&w-x-p||(y=abs(s+=u/v)%h)-q&&h-y-q);)i++;}
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | w,h,p,q,r,s,t,u,d,v,i,x,y;g(p,q){v=q?g(q,p%q):abs(p);}main(){for(gets(&i);v=~scanf("%d%d%d%d%d%d%d%d%d",&w,&h,&d,&p,&q,&r,&s,&t,&u);i=!puts(i>d*v|i>2e4?"Miss":"Hit"))for(g(t,u),w*=2,h*=2;i<3e4&&((x=abs(r+=t/v)%w)-p&&w-x-p||(y=abs(s+=u/v)%h)-q&&h-y-q);)i++;}
/usr/bin/ld: /tmp/ccY0ZpG7.o: in function `main':
main.c:(.text.startup+0x1c): 警告: the `gets' function is dangerous and should not be used.
ソースコード
w,h,p,q,r,s,t,u,d,v,i,x,y;g(p,q){v=q?g(q,p%q):abs(p);}main(){for(gets(&i);v=~scanf("%d%d%d%d%d%d%d%d%d",&w,&h,&d,&p,&q,&r,&s,&t,&u);i=!puts(i>d*v|i>2e4?"Miss":"Hit"))for(g(t,u),w*=2,h*=2;i<3e4&&((x=abs(r+=t/v)%w)-p&&w-x-p||(y=abs(s+=u/v)%h)-q&&h-y-q);)i++;}
testestest