結果
問題 | No.1429 Simple Dowsing |
ユーザー | harurun |
提出日時 | 2021-03-14 15:51:04 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 25 ms / 2,000 ms |
コード長 | 386 bytes |
コンパイル時間 | 95 ms |
コンパイル使用メモリ | 28,056 KB |
実行使用メモリ | 24,384 KB |
平均クエリ数 | 3.00 |
最終ジャッジ日時 | 2023-09-24 10:07:49 |
合計ジャッジ時間 | 1,562 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 25 ms
23,796 KB |
testcase_01 | AC | 24 ms
23,652 KB |
testcase_02 | AC | 24 ms
23,400 KB |
testcase_03 | AC | 24 ms
24,348 KB |
testcase_04 | AC | 23 ms
24,024 KB |
testcase_05 | AC | 24 ms
23,364 KB |
testcase_06 | AC | 24 ms
23,364 KB |
testcase_07 | AC | 24 ms
23,820 KB |
testcase_08 | AC | 24 ms
23,388 KB |
testcase_09 | AC | 24 ms
23,364 KB |
testcase_10 | AC | 25 ms
23,616 KB |
testcase_11 | AC | 24 ms
23,832 KB |
testcase_12 | AC | 24 ms
23,376 KB |
testcase_13 | AC | 24 ms
23,400 KB |
testcase_14 | AC | 24 ms
24,384 KB |
コンパイルメッセージ
main.c:2:1: 警告: 戻り値の型をデフォルトの ‘int’ にします [-Wimplicit-int] 2 | main(){ | ^~~~
ソースコード
#include <stdio.h> main(){ printf("? 0 0\n"); fflush(stdout); int d,e[101],h[101],c,r,p=0; scanf("%d",&d); for(int x=0;x<101;x++)for(int y=0;y<101;y++)if(x*x+y*y==d){ e[p]=x; h[p++]=y; } c=e[0]; d=h[0]; printf("? %d %d\n",c,d); fflush(stdout); scanf("%d",&r); for(int i=0;i<p;i++)if((e[i]-c)*(e[i]-c)+(h[i]-d)*(h[i]-d)==r)printf("! %d %d\n",e[i],h[i]); }