結果
問題 | No.514 宝探し3 |
ユーザー | kosakkun |
提出日時 | 2017-05-09 18:31:03 |
言語 | C++14 (gcc 13.2.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 27 ms / 2,000 ms |
コード長 | 818 bytes |
コンパイル時間 | 670 ms |
コンパイル使用メモリ | 80,188 KB |
実行使用メモリ | 24,372 KB |
平均クエリ数 | 2.75 |
最終ジャッジ日時 | 2023-09-23 13:59:35 |
合計ジャッジ時間 | 1,848 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 27 ms
23,532 KB |
testcase_01 | AC | 22 ms
24,372 KB |
testcase_02 | AC | 23 ms
24,360 KB |
testcase_03 | AC | 23 ms
23,652 KB |
testcase_04 | AC | 23 ms
24,252 KB |
testcase_05 | AC | 21 ms
23,532 KB |
testcase_06 | AC | 22 ms
23,412 KB |
testcase_07 | AC | 23 ms
23,424 KB |
testcase_08 | AC | 22 ms
24,360 KB |
testcase_09 | AC | 23 ms
23,832 KB |
testcase_10 | AC | 22 ms
23,868 KB |
testcase_11 | AC | 22 ms
23,880 KB |
ソースコード
#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 1000000000LL int main(){ ll 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; ll ans_x = (dist1 + dist2 - MAX_V) / 2; ll ans_y = dist1 - ans_x; cout << ans_x << " " << ans_y << endl; return 0; }