# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
55380 | ksun48 | Sparklers (JOI17_sparklers) | C++14 | 231 ms | 33620 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;
typedef long long LL;
LL ok(vector<LL> a, vector<LL> b){
LL dp[a.size()][b.size()];
for(int i = 0; i < a.size(); i++){
for(int j = 0; j < b.size(); j++){
dp[i][j] = 0;
if(a[i] >= b[j]){
if((i == 0 && j == 0) || (i > 0 && dp[i-1][j]) || (j > 0 && dp[i][j-1])){
dp[i][j] = 1;
}
}
}
}
return dp[a.size()-1][b.size()-1];
}
LL reach(vector<LL> a, vector<LL> b){
if(a[0] < b[0]) return 0;
vector<pair<LL,LL> > acompress, bcompress;
LL acur = a[0];
LL curmin = a[0];
for(LL i = 0; i < a.size(); i++){
curmin = min(curmin, a[i]);
if(a[i] >= acur){
acur = a[i];
acompress.push_back({acur, curmin});
curmin = a[i];
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... |