結果

問題 No.513 宝探し2
ユーザー sugim48sugim48
提出日時 2017-05-05 22:24:54
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 291 ms / 2,000 ms
コード長 1,031 bytes
コンパイル時間 802 ms
コンパイル使用メモリ 97,656 KB
実行使用メモリ 24,420 KB
平均クエリ数 12502.92
最終ジャッジ日時 2023-09-24 01:01:34
合計ジャッジ時間 2,401 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
24,252 KB
testcase_01 AC 25 ms
23,604 KB
testcase_02 AC 25 ms
24,420 KB
testcase_03 AC 24 ms
23,940 KB
testcase_04 AC 23 ms
23,916 KB
testcase_05 AC 25 ms
23,628 KB
testcase_06 AC 156 ms
23,964 KB
testcase_07 AC 24 ms
23,616 KB
testcase_08 AC 23 ms
23,508 KB
testcase_09 AC 23 ms
24,000 KB
testcase_10 AC 291 ms
23,472 KB
testcase_11 AC 23 ms
23,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
#include <random>
using namespace std;

#define rep(i, N) for (int i = 0; i < N; i++)
#define pb push_back

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;
typedef pair<ll, int> ll_i;
typedef pair<double, int> d_i;
typedef pair<ll, ll> ll_ll;
typedef pair<double, double> d_d;
struct edge { int u, v; ll w; };

int const MOD = 1000000007;
ll _MOD = 1000000009;
double EPS = 1e-12;
int INF = INT_MAX / 2;

int main() {
	cout << 0 << ' ' << 0 << endl;
	int d1; cin >> d1;
	cout << 100000 << ' ' << 0 << endl;
	int d2; cin >> d2;
	for (int x = 0; x <= d1; x++) {
		int y = d1 - x;
		if (abs(x - 100000) + abs(y) == d2) {
			cout << x << ' ' << y << endl;
		}
	}
}
0