結果

問題 No.513 宝探し2
ユーザー dnishdnish
提出日時 2018-06-19 00:03:02
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 520 bytes
コンパイル時間 1,330 ms
コンパイル使用メモリ 164,348 KB
実行使用メモリ 24,384 KB
平均クエリ数 3.00
最終ジャッジ日時 2023-09-24 01:48:34
合計ジャッジ時間 2,637 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
24,036 KB
testcase_01 AC 21 ms
24,072 KB
testcase_02 AC 20 ms
23,388 KB
testcase_03 AC 20 ms
23,388 KB
testcase_04 AC 24 ms
24,060 KB
testcase_05 AC 20 ms
23,544 KB
testcase_06 AC 20 ms
24,384 KB
testcase_07 AC 20 ms
23,604 KB
testcase_08 AC 20 ms
23,520 KB
testcase_09 AC 20 ms
24,372 KB
testcase_10 AC 21 ms
23,448 KB
testcase_11 AC 21 ms
23,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
#define REP(i,n,N) for(int i=(n); i<(N); i++)
#define RREP(i,n,N) for(int i=(N-1); i>=n; i--)
#define CK(n,a,b) ((a)<=(n)&&(n)<(b))
#define ALL(v) (v).begin(),(v).end()
#define p(s) cout<<(s)<<endl
#define p2(a,b) cout<<(a)<<" "<<(b)<<endl
typedef long long ll;
using namespace std;
const int inf=1e9;

int X,Y;
int a1,a2;
int main(){
    p2(0,0);
    cin>>a1; //X + Y = a1
    p2(100000,0);
    cin>>a2;//(100000-X) + Y = a2
    Y = (a1+a2-100000)/2;
    X = a1-Y;
    p2(X,Y);

    return 0;
}
0