# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1060097 | anango | Marathon Race 2 (JOI24_ho_t3) | C++17 | 373 ms | 1048576 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define int long long
using namespace std;
int INF = 1LL<<30;
int maxbloat = 1008;
signed main() {
int local = 0;
if (local) {
// for getting input from input.txt
freopen("input.txt", "r", stdin);
// for writing output to output.txt
freopen("output.txt", "w", stdout);
}
/*#ifdef ONLINE_JUDGE
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#endif*/ //fast IO
int n,l; cin >> n >> l;
vector<int> balls;
for (int i=0; i<n; i++) {
int x; cin >> x; balls.push_back(x);
}
vector<int> coords;
for (int i=0; i<n; i++) {
coords.push_back(balls[i]);
}
coords.erase(unique(coords.begin(), coords.end()), coords.end());
int q; cin >> q;
if (coords.size()>maxbloat) {
while (q--) {
int s,g,t; cin >> s >> g >> t; cout << "No" << endl;
}
return 0;
}
//dp[l][r-l][x-l] = min cost of picking up balls l through r, if we start at pos of ball x (l<=x<=r)
n = coords.size(); n=maxbloat;
vector<vector<vector<int>>> dp(n);
for (int l=0; l<n; l++) {
dp[l].resize(n-l);
for (int r=l; r<n; r++) {
dp[l][r-l]=vector<int>(r-l+1,INF);
}
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |