結果

問題 No.3065 Speedrun (Normal)
ユーザー kamoron
提出日時 2025-04-02 05:20:41
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 1,376 bytes
コンパイル時間 5,902 ms
コンパイル使用メモリ 332,388 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-04-02 05:20:49
合計ジャッジ時間 6,919 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ld = long double;
using ull = unsigned long long;
using P = pair<int, int>;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define repp(i, m, n) for (int i = m; i < n; i++)
#define elif else if
#define yes cout << "Yes" << endl;
#define no  cout << "No"  << endl;
#define fi first
#define se second
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define eb emplace_back
#define pb pop_back
#define endl '\n'
const ld pi = 3.14159265358979;
const int di[] = {-1,-1,-1,0,0,1,1,1};
const int dj[] = {-1,0,1,-1,1,-1,0,1};
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
template <class T1, class T2> bool chmax(T1& a, T2 b) { if (a < b) { a = b; return true; } return false; }
template <class T1, class T2> bool chmin(T1& a, T2 b) { if (a > b) { a = b; return true; } return false; }
// priority_queue<int, vector<int>, greater<int>> pq;


int main() {
    vector<P> pa(4);
    rep(i,4) cin >> pa[i].se;
    rep(i,4) cin >> pa[i].fi;
    sort(ALL(pa));
    int t; cin >> t;

    int ans = 0;
    rep(i,4) {
        auto [time, problems] = pa[i];
        int mx = t/time;
        int mxpro = min(problems, mx);
        t -= mxpro*time;
    }

    cout << ans << endl;
    return 0;
}
0