Submission #928185

# Submission time Handle Problem Language Result Execution time Memory
928185 2024-02-16T03:41:14 Z vjudge1 Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) C++17
0 / 100
360 ms 42068 KB
// Problem: A - Hedgehog Daniyar and Algorithms
// Contest: Virtual Judge - IOI contest #3 (div 1 + 2)
// URL: https://vjudge.net/contest/610287#problem/A
// Memory Limit: 256 MB
// Time Limit: 3000 ms
// 
// Powered by CP Editor (https://cpeditor.org)

#include <bits/stdc++.h>
#define S second
#define F first
#define sz size()
#define int long long
#define pb push_back
#define all(x) x.begin(),x.end()
#define yes "YES\n"
#define no "NO\n"
#define ent "\n"
#define give_me_more_speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

using namespace std;

const int maxn = 1e5 + 5 , mod = 1e9 + 7;

void solve(){
  int n , q;
  cin >> n >> q;
  vector <int> v;
  for(int i = 1;i <= n;i++){
    int x;
    cin >>x;
    v.pb(x);
  }
  int ok = 0;
  if(is_sorted(all(v))){
    ok = 1;
  }
  while(q--){
    int l , r , k;
    cin >> l >> r >> k;
    if(ok == 0){
      cout<<0<<ent;
    }
    else{
      cout<<1<<ent;
    }
  }
}

signed main(){
  give_me_more_speed
  int t = 1;
  //cin>>t;
  for(int i = 1;i <= t;i++){
      solve();
  }
}

# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 360 ms 42068 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 30 ms 3488 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -