# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1055422 | KasymK | Rainforest Jumps (APIO21_jumps) | C++17 | 0 ms | 0 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 ff first
#define ss second
#define all(v) v.begin(), v.end()
#define ll long long
#define pb push_back
#define pii pair<int, int>
#define wr puts("----------------")
template<class T>bool umin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T>bool umax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
void init(int n, vector<int> v){}
int minimum_jumps(int a, int b, int c, int d){
printf("%d\n", c-b);
}
int main(){
int n, q;
scanf("%d%d", &n, &q);
vector<int> h;
for(int i = 0; i < n; ++i){
int x;
scanf("%d", &x);
h.pb(x);
}
init(n, h);
while(q--){
int a, b, c, d;
scanf("%d%d%d%d", &a, &b, &c, &d);
int answer = minimum_jumps(a, b, c, d);
printf("%d\n", answer);
}
return 0;
}