Submission #498562

# Submission time Handle Problem Language Result Execution time Memory
498562 2021-12-25T13:35:18 Z The_Samurai Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) C++
0 / 100
2517 ms 6348 KB
#include <bits/stdc++.h>
 
using namespace std;
 
void solve() {
	int n, m, l, r, k;
	
	cin >> n >> m;
	int arr[n];
	cin >> arr[0];
	bool p = 1;
	for (int i = 1; i < n; i++) {
		cin >> arr[i];
		if (arr[i - 1] > arr[i]) {
			p = 0;
		}
	}
	for (int i = 0; i < m; i++) {
		cin >> l >> r >> k;
		if (p) {
			cout << "1\n";
		}
		else {
			cout << "0\n";
		}
	}
}
 
int main() {
	int t = 1;
	
//	cin >> t;
	while (t--) {
		solve();
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2517 ms 6348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 223 ms 2564 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -