# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
784396 | ZHIRDILBILDIZ | Rainforest Jumps (APIO21_jumps) | C++14 | 733 ms | 1820 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>
#include "jumps.h"
using namespace std ;
bool flag1, flag2 ;
void init(int n, vector<int> a)
{
for(int i = 0 ; i < n ; i++)
if(a[i] != i + 1)flag1 = 1 ;
}
int minimum_jumps(int a, int b, int c, int d)
{
if(!flag1)
{
if(a <= c && c <= b || a <= d && d <= b || c <= a && a <= d || a <= d && d <= b)return 0 ;
if(c - b > 0)return c - b ;
else return -1 ;
}
}
//signed main()
//{
// ios_base::sync_with_stdio( 0 ) ;
// cin.tie( 0 ) ;
// cout.tie( 0 ) ;
// int n ;
// cin >> n ;
// vector<int> v(n) ;
// for(int i = 0 ; i < n ; i++)
// cin >> v[i] ;
// init(n, v) ;
// while()
// {
// int a, b, c, d ;
// cin >> a >> b >> c >> d ;
// }
// return 0 ;
//}
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... |