結果
問題 |
No.846 メダル
|
ユーザー |
|
提出日時 | 2019-09-27 20:40:52 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 388 bytes |
コンパイル時間 | 805 ms |
コンパイル使用メモリ | 84,604 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-24 20:20:53 |
合計ジャッジ時間 | 1,649 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | AC * 10 WA * 12 |
ソースコード
#include<iostream> #include<algorithm> #include<cmath> #include<iomanip> #include<vector> #include<map> using namespace std; typedef long long ll; int main() { ll p,q,r,a,b,c,m,M; cin >> p >> q >> r >> a >> b >> c; m=max({(a-1)*p,(a+b-1)*q,(a+b+c-1)*r}); M=min({a*p,(a+b)*q,(a+b+c)*r}); if(m>M) { cout << -1 << endl; } else { cout << m << " " << M << endl; } }