# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
545376 | AJ00 | Rainforest Jumps (APIO21_jumps) | C++14 | 4081 ms | 14384 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;
vector<vector<int>> adj(200001);
vector<bool> visited(200001,false);
vector<int> dist(200001);
int n;
int minimum_jumps(int A, int B, int C, int D){
int a= A+1,b=B+1,c=C+1,d=D+1;
queue<int> q;
// cout << a << " " << b << " " << c << " " << d << "\n";
for (int i = 1; i <= n; i++){
visited[i] = false;
}
/* if (a <= c <= b || a <= d <= b){
return 0;
}*/
for (int i = a; i <= b; i++){
q.push(i);
dist[i] = 0;
if ((c <= i) && (i <= d)){
return 0;
}
visited[i] = true;
}
while(!q.empty()){
int p = q.front();
q.pop();
// cout << p << " " << dist[p] << "\n";
for (int ch: adj[p]){
if (!visited[ch]){
# | 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... |