結果
問題 | No.2138 Add Bacon |
ユーザー |
|
提出日時 | 2022-12-02 00:19:16 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 357 bytes |
コンパイル時間 | 1,777 ms |
コンパイル使用メモリ | 191,980 KB |
最終ジャッジ日時 | 2025-02-09 03:07:41 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 25 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll mod=998244353; using vll =vector<ll>; using vvll =vector<vll>; #define rep(i,n) for(int i=0;i<n;i++) int main(){ ll A,B,C,D,E; cin>>A>>B>>C>>D>>E; ll an=A-B; for(ll b=0;b<C;b++){ A+=D; B+=E; an=max(an,A-B); } cout<<an<<endl; }