結果

問題 No.513 宝探し2
ユーザー RIGIHRIGIH
提出日時 2017-06-26 22:48:20
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 469 bytes
コンパイル時間 454 ms
コンパイル使用メモリ 58,976 KB
実行使用メモリ 24,252 KB
平均クエリ数 3.00
最終ジャッジ日時 2023-09-24 01:21:21
合計ジャッジ時間 1,620 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
23,652 KB
testcase_01 AC 19 ms
24,252 KB
testcase_02 AC 19 ms
23,400 KB
testcase_03 AC 19 ms
23,520 KB
testcase_04 AC 22 ms
23,544 KB
testcase_05 AC 19 ms
24,252 KB
testcase_06 AC 20 ms
23,424 KB
testcase_07 AC 19 ms
23,412 KB
testcase_08 AC 19 ms
23,520 KB
testcase_09 AC 19 ms
24,036 KB
testcase_10 AC 20 ms
23,388 KB
testcase_11 AC 20 ms
24,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
#include <iostream>
#include <cstring>
#include <math.h>
using namespace std;


int main(){


		/*int i;
		for(i=0;i<100;i++){
			cout << 0 << " " << i << endl;
			int d;
			cin>>d;
			if(d==0)return 0;
		}*/


		cout<<0<<" "<<0<<endl;
		int d;
		cin>>d;

		cout<<0<<" "<<d<<endl;
		int e;
		cin>>e;

		if(e%2==0){
			cout<<e/2<<" "<<d-e/2<<endl;
			return 0;
		}
		else{
			cout<<(e+1)/2<<" "<<d-(e-1)/2<<endl;
			return 0;
		}
	
	



	
	return 0;
}
0