結果

問題 No.513 宝探し2
ユーザー incuiio
提出日時 2023-05-19 06:22:43
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 790 bytes
コンパイル時間 1,133 ms
コンパイル使用メモリ 125,348 KB
最終ジャッジ日時 2025-02-13 01:15:36
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <fstream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cmath>
#include <unordered_map>
#include <map>
#include <queue>
#include <string>
#include <set>
#include <list>
#include <climits>
#include <bitset>
#include <numeric>
#include <cassert>
#include <regex>
using std::cout;
using std::cin;
using std::string;
using std::vector;

int main()
{
    cout << "0 0" << std::endl;
    int d1;
    cin >> d1;
    if (d1 == 0)
    {
        return 0;
    }
    int x = std::min((int)1e5, d1);
    int y = 0;
    if (d1 > 1e5)
    {
        y = d1 - 1e5;
    }
    cout << x << ' ' << y << std::endl;
    int d2;
    cin >> d2;
    if (d2 == 0)
    {
        return 0;
    }
    cout << x - d2/2 << ' ' << y + d2/2 << std::endl;
    return 0;
}
0