結果
| 問題 | No.61 リベリオン |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-08-01 17:16:05 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 253 bytes |
| 記録 | |
| コンパイル時間 | 242 ms |
| コンパイル使用メモリ | 30,020 KB |
| 最終ジャッジ日時 | 2026-02-23 22:10:55 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | AC * 2 WA * 2 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | w,h,p,q,r,s,t,u,v,i,x,y;g(p,q){v=q?g(q,p%q):abs(p);}main(d){for(gets(&w);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>998?"Miss":"Hit"))for(g(t,u),w*=2,h*=2;(x-p&&w-x-p||y-q&&h-y-q)&&++i<999;y=abs(s+=u/v)%h)x=abs(r+=t/v)%w;}
| ^
main.c: In function ‘main’:
main.c:1:77: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
1 | w,h,p,q,r,s,t,u,v,i,x,y;g(p,q){v=q?g(q,p%q):abs(p);}main(d){for(gets(&w);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>998?"Miss":"Hit"))for(g(t,u),w*=2,h*=2;(x-p&&w-x-p||y-q&&h-y-q)&&++i<999;y=abs(s+=u/v)%h)x=abs(r+=t/v)%w;}
| ^~~~~
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,v,i,x,y;g(p,q){v=q?g(q,p%q):abs(p);}main(d){for(gets(&w);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>998?"Miss":"Hit"))for(g(t,u),w*=2,h*=2;(x-p&&w-x-p||y-q&&h-y-q)&&++i<999;y=abs(s+=u/v)%h)x=abs(r+=t/v)%w;}
/usr/bin/ld: /tmp/ccWHEVWQ.o: in function `main':
main.c:(.text.startup+0x20): 警告: the `gets' function is dangerous and should not be used.
ソースコード
w,h,p,q,r,s,t,u,v,i,x,y;g(p,q){v=q?g(q,p%q):abs(p);}main(d){for(gets(&w);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>998?"Miss":"Hit"))for(g(t,u),w*=2,h*=2;(x-p&&w-x-p||y-q&&h-y-q)&&++i<999;y=abs(s+=u/v)%h)x=abs(r+=t/v)%w;}
testestest