結果

問題 No.513 宝探し2
ユーザー kosakkunkosakkun
提出日時 2017-05-09 18:29:09
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 819 bytes
コンパイル時間 604 ms
コンパイル使用メモリ 80,336 KB
実行使用メモリ 24,288 KB
平均クエリ数 2.83
最終ジャッジ日時 2023-09-23 13:59:44
合計ジャッジ時間 3,175 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 25 ms
23,556 KB
testcase_08 AC 24 ms
24,036 KB
testcase_09 WA -
testcase_10 AC 24 ms
24,012 KB
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define PB_VEC(Itr1,Itr2) (Itr1).insert((Itr1).end(),(Itr2).begin(),(Itr2).end())
typedef long long ll;

#define MAX_V 1000000000

int main(){
    
    int dist1,dist2;
    
    cout << 0 << " " << 0 << endl;
    cin >> dist1;
    if(dist1 == 0) return 0;
    cout << 0 << " " << MAX_V << endl;
    cin >> dist2;
    if(dist2 == 0) return 0;
    
    int ans_y = (dist1 + dist2 - MAX_V) / 2;
    int ans_x = dist1 - ans_y;
    cout << ans_x << " " << ans_y << endl;
    
    return 0;
}
0