結果

問題 No.513 宝探し2
ユーザー incuiioincuiio
提出日時 2023-05-19 06:22:43
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 790 bytes
コンパイル時間 1,136 ms
コンパイル使用メモリ 128,708 KB
実行使用メモリ 24,384 KB
平均クエリ数 2.50
最終ジャッジ日時 2023-08-22 16:29:38
合計ジャッジ時間 2,589 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
23,916 KB
testcase_01 AC 25 ms
23,580 KB
testcase_02 AC 25 ms
24,384 KB
testcase_03 AC 24 ms
24,024 KB
testcase_04 AC 24 ms
24,012 KB
testcase_05 AC 24 ms
23,484 KB
testcase_06 AC 24 ms
23,592 KB
testcase_07 AC 24 ms
23,448 KB
testcase_08 AC 25 ms
23,448 KB
testcase_09 AC 24 ms
23,496 KB
testcase_10 AC 24 ms
24,108 KB
testcase_11 AC 25 ms
23,604 KB
権限があれば一括ダウンロードができます

ソースコード

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