結果
| 問題 |
No.3068 Speedrun (Hard)
|
| コンテスト | |
| ユーザー |
SnowBeenDiding
|
| 提出日時 | 2025-03-21 22:07:40 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 803 bytes |
| コンパイル時間 | 6,949 ms |
| コンパイル使用メモリ | 332,960 KB |
| 実行使用メモリ | 814,424 KB |
| 最終ジャッジ日時 | 2025-03-21 22:07:51 |
| 合計ジャッジ時間 | 9,341 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | MLE * 1 -- * 1 |
| other | -- * 32 |
ソースコード
#include <atcoder/all>
#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
using namespace atcoder;
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(0);
vector<int> a(4), t(4);
int n, st;
rep(i, 0, 4) cin >> a[i];
cin >> n;
rep(i, 0, 4) cin >> t[i];
cin >> st;
vector<int> v(400000001);
int mod = 10001;
rep(i, 0, a[0] + 1) rep(j, 0, a[1] + 1) {
v[i * t[0] + j * t[1]] = i * mod + j + 1;
}
rep(i, 0, a[2] + 1) rep(j, 0, a[3] + 1) {
auto y = v[st - i * t[2] - j * t[3]];
if (y == 0)
continue;
y--;
cout << y / mod << ' ' << y % mod << ' ';
cout << i << ' ' << j << endl;
return 0;
}
}
SnowBeenDiding