結果
| 問題 |
No.2138 Add Bacon
|
| コンテスト | |
| ユーザー |
Ayuphys789
|
| 提出日時 | 2022-12-10 23:29:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,004 bytes |
| コンパイル時間 | 1,227 ms |
| コンパイル使用メモリ | 98,972 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-15 00:01:28 |
| 合計ジャッジ時間 | 3,705 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 25 |
ソースコード
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <iomanip>
#include <functional>
#include <deque>
#include <stack>
#include <queue>
#include <bitset>
#include <map>
#include <set>
#include <unordered_set>
#include <numeric>
#include <array>
using namespace std;
typedef long long ll;
#define rep(i,n) for (ll i = 0; i < (ll)(n); i++)
#define REP(i,n) for (ll i = 1; i <= (ll)(n); i++)
#define FOR(i,a,b) for(ll i=a;i<=b;i++)
#define bit(x,i)(((x)>>(i))&1)
#define all(x) x.begin(),x.end()
#define fcout cout<<fixed<<setprecision(15)
#define PI 3.1415926535897932384626433832795028841971693993751058209749445923078160628620899
const ll INF = 1000000000000000000;
const ll NIL = -1;
const ll MOD = 998244353;
const ll dx[4] = { 0,1,0,-1 };
const ll dy[4] = { 1,0,-1,0 };
ll A, B, C, D, E;
int main(void) {
cin >> A >> B >> C >> D >> E;
ll U = (D > E ? C : 0);
cout << A - B + (D - E) * U << endl;
return 0;
}
Ayuphys789