# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
795797 | MISM06 | ZIGZAG (INOI20_zigzag) | C++14 | 2062 ms | 2800 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;
typedef pair < int , int > pii;
typedef pair < int , pii > piii;
typedef pair < ll , ll > pll;
typedef pair < ll , pll > plll;
#define pb push_back
#define all(x) x.begin(), x.end()
#define sze size()
#define F first
#define S second
#define kids int mid = (tl + tr) >> 1, cl = v << 1, cr = v << 1 | 1;
#define wall__ cout << "________________________________________\n";
const ll N = 3e5 + 10, mod = 1e9 + 7;
int n, q;
ll ar[N];
bool iss0 (int l, int r) {
if (r - l + 1 == 1) return 1;
int t = 0;
for (int i = l + 1; i <= r; i++) {
int s = -1;
if (ar[i - 1] > ar[i]) s = 0;
if (ar[i - 1] < ar[i]) s = 1;
if (s != t) return 0;
# | 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... |