# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
898097 | 2024-01-04T10:00:16 Z | Litusiano | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++17 | 2626 ms | 49968 KB |
#include<bits/stdc++.h> using namespace std; #define endl '\n' int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n,q; cin>>n>>q; vector<int> v(n); for(int& i : v) cin>>i; vector<int> pre(n+1); for(int i = 1; i<n; i++){ pre[i+1] = pre[i] + (v[i] < v[i-1]); } for(int i : pre) cerr<<i<<" "; cerr<<endl; while(q--){ int l,r,k; cin>>l>>r>>k; if(pre[r] - pre[l] == 0) cout<<1<<endl; else cout<<0<<endl; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2477 ms | 30652 KB | Output is correct |
2 | Correct | 2626 ms | 49852 KB | Output is correct |
3 | Correct | 2559 ms | 49864 KB | Output is correct |
4 | Correct | 2572 ms | 49968 KB | Output is correct |
5 | Correct | 2541 ms | 45180 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 252 ms | 3440 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |