結果

問題 No.149 碁石の移動
ユーザー nnasennnasen
提出日時 2017-09-24 02:50:35
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 468 bytes
コンパイル時間 1,629 ms
コンパイル使用メモリ 163,352 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-26 16:34:34
合計ジャッジ時間 2,681 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 1 ms
5,376 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 2 ms
5,376 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i = (a); i < (b); ++i)
#define REP(i,n) FOR(i,0,n)
#define SZ(n) (int)(n).size()
#define ALL(n) (n).begin(), (n).end()
#define MOD 1000000007
using namespace std;
typedef long long LL;
typedef vector<int> VI;

int main() {
	int aw, ab, bw, bb, c, d;
	cin >> aw >> ab >> bw >> bb >> c >> d;
	int t, ans;
	t = max(c, c - ab);
	ans = aw - t + min(d, bw + t);
	cout << ans << endl;
	return 0;
}
0