# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
416101 | pauloamed | Bitaro’s Party (JOI18_bitaro) | C++14 | 2039 ms | 420040 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>
using namespace std;
#define MAXN 100010
#define ppiii pair<pair<int,int>,int>
int n;
vector<int> v[MAXN];
vector<int> rv[MAXN];
int fullSolution(int x, vector<bool> &on){
vector<int> pd(n, -1);
pd[x] = 0;
for(int i = x; i >= 0; --i){
if(pd[i] != -1){
for(auto y : rv[i]){
pd[y] = max(pd[y], pd[i] + 1);
}
}
}
int ans = -1;
for(int i = 0; i <= x; ++i){
// cout << pd[i] << endl;
if(on[i]) ans = max(ans, pd[i]);
}
return ans;
}
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... |