Submission #1116362

# Submission time Handle Problem Language Result Execution time Memory
1116362 2024-11-21T14:26:46 Z vjudge1 Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) C++17
0 / 100
352 ms 50036 KB
#include <bits/stdc++.h> 
using namespace std;
#define pb push_back 
#define sz size() 
#define in insert 
#define int long long 
#define F first 
#define up upper_bound 
#define S second 
#define lb lower_bound 
#define pair pair<int, int> 
#define all(v) v.begin(),v.end() 
#define FOR1(x, n) for(int j = x; j <= n; j ++) 
#define FOR(x, n) for(int i = x; i <= n; i ++) 
#define FORR(x, n) for(int j = x; j >= n; j --) 
#define nikita ios_base::sync_with_stdio(0), cin.tie(0); 
int n,m,k,t,sum=0,cnt, l,ans = 0, r, x, y, q; 
const int N = 2e5+5;
set<int>g[N]; 
int a[N], b[N];
bool f;
void solve() { 
    nikita
    cin >> n >> m;
    FOR(1, n)cin >> a[i];
    l = 1;
    FOR(2, n){
        if(a[i] >= a[i-1])b[i] = l;
        else l = i, b[i] = l;
    }
    FOR(1, m){
        cin >> l >> r >> k;
            if(b[r] <= l)cout << "1\n";
            else cout << "0\n";
            continue;
    }
}
signed main() { 
    nikita 
    int t=1; 
    FOR(1, t)solve(); 
}
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 12628 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 12628 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 352 ms 50036 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 14672 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 12628 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 12628 KB Output isn't correct
2 Halted 0 ms 0 KB -