Submission #888919

#TimeUsernameProblemLanguageResultExecution timeMemory
888919harut_13Hedgehog Daniyar and Algorithms (IZhO19_sortbooks)C++14
0 / 100
3061 ms4516 KiB
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <cmath> #include <map> #include <string> #include <ios> #include <iomanip> #include <deque> #include <queue> #include <list> #include <stack> #define FASTIO ios_base::sync_with_stdio(0); cin.tie(NULL); #define CY cout<<"YES"<<endl #define CN cout<<"NO"<<endl #define ll long long #define ciN cin #define itn int #define pshb push_back #define sz size() #define vec vector<int> #define vecl vector<long long> #define fro for #define Int int #define stirng string #define nedl endl #define pi 3.141592653589793238463 #define endl '\n' #define ull unsigned long long #define pii pair<int,int> #define pll pair<ll,ll> using namespace std; void solve() { itn n; cin >> n; int m; cin >> m; vec v(n); for (itn i = 0; i < n; i++)cin >> v[i]; for (int i = 0; i < m; i++) { int l, r, k; cin >> l >> r >> k; l--; r--; bool f = 0; for (int j = l+1; j <= r; j++) { if (v[j-1] > v[j]) { f = 1; } } if (f)cout << 0 << endl; else cout << 1 << endl; } } signed main() { FASTIO //int t; cin >> t; //while (t--) solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...