結果
| 問題 |
No.846 メダル
|
| コンテスト | |
| ユーザー |
yyyy52
|
| 提出日時 | 2019-07-05 23:42:07 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 638 bytes |
| コンパイル時間 | 1,381 ms |
| コンパイル使用メモリ | 160,408 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-06 23:20:30 |
| 合計ジャッジ時間 | 2,605 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | AC * 2 WA * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1);
typedef long long ll;
typedef pair<int64_t,int64_t> pll;
int dx[]={1,-1,0,0,1,-1,1,-1};
int dy[]={0,0,1,-1,1,-1,-1,1};
#define rep(i,a,b) for (int64_t i = (a); i < (b); i++)
#define REP(i,n) rep(i,0,n)
#define ALL(a) begin(a),end(a)
#define sz(s) (s).size()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
int main()
{
ll p,q,r,a,b,c;
cin>>p>>q>>r;
cin>>a>>b>>c;
int l=max({p*(a-1)+1,q*(a+b-1)+1,r*(a+b+c-1)+1});
int s=min({p*a,q*(a+b),r*(a+b+c)});
if(l<s)cout<<-1<<endl;
else cout<<l<<" "<<s<<endl;
}
yyyy52