結果
| 問題 |
No.3065 Speedrun (Normal)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-21 21:23:22 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 1,027 bytes |
| コンパイル時間 | 3,768 ms |
| コンパイル使用メモリ | 279,272 KB |
| 実行使用メモリ | 817,232 KB |
| 最終ジャッジ日時 | 2025-03-21 21:23:29 |
| 合計ジャッジ時間 | 5,141 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge7 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 2 MLE * 1 -- * 10 |
ソースコード
#include <bits/stdc++.h>
// #include <atcoder/all>
using namespace std;
// using namespace atcoder;
#define rep(i, a, n) for(int i = a; i < n; i++)
#define rrep(i, a, n) for(int i = a; i >= n; i--)
#define inr(l, x, r) (l <= x && x < r)
#define ll long long
#define ld long double
// using mint = modint1000000007;
// using mint = modint998244353;
constexpr int IINF = 1001001001;
constexpr ll INF = 1e18;
template<class t,class u> void chmax(t&a,u b){if(a<b)a=b;}
template<class t,class u> void chmin(t&a,u b){if(b<a)a=b;}
int main(){
int a, b, c, d; cin >> a >> b >> c >> d;
int p, q, r, s; cin >> p >> q >> r >> s;
vector<int> problem;
rep(i, 0, a) problem.push_back(p);
rep(i, 0, b) problem.push_back(q);
rep(i, 0, c) problem.push_back(r);
rep(i, 0, d) problem.push_back(s);
sort(problem.begin(), problem.end());
int t; cin >> t;
int ans = 0;
while(ans < a+b+c+d && t >= problem[ans]){
t -= problem[ans];
ans++;
}
cout << ans << endl;
return 0;
}