답안 #890024

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
890024 2023-12-20T10:58:38 Z vjudge1 Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) C++17
0 / 100
3000 ms 33736 KB
#include <bits/stdc++.h>
#define ll long long
#define fort(x , y) for(int y = 1 ; y <= x ; y++)
#define pb push_back
#define pf push_front
#define ppb pop_back
#define int long long
#define F first
#define S second
using namespace std;
const int N = 1e6 + 5;
const int NN = 1e9 + 7;
int n,m,a[N],k[N],l[N],r[N];
signed main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	cin >> n >> m;
	for(int i = 1 ; i <= n ; i++){
		cin >> a[i];
	}
	for(int j = 1 ; j <= m ; j++){
		cin >> l[j] >> r[j] >> k[j];
		if(l[j] == r[j]){
			cout << 1 << '\n';
			continue;
		}
		bool ok = 0;
		for(int i = l[j] ; i < r[j] ; i++){
			if(a[i] <= a[i + 1]){
				ok = 1;
			}
			else{
				ok = 0;
				break;
			}
		}
		if(ok){
			cout << 1 << '\n';
		}
		else{
			cout << 0 << '\n';
		}
	}

}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 6492 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 6492 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 376 ms 33624 KB Output is correct
2 Correct 365 ms 33616 KB Output is correct
3 Correct 441 ms 33704 KB Output is correct
4 Correct 360 ms 33736 KB Output is correct
5 Execution timed out 3038 ms 15360 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 30 ms 11088 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 6492 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 6492 KB Output isn't correct
2 Halted 0 ms 0 KB -