# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
794246 | sumit_kk10 | Simple game (IZhO17_game) | C++17 | 369 ms | 15852 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define int long long
#define F first
#define S second
#define pb push_back
using namespace std;
#define ordered_set tree<pair<int, int>, null_type,less<pair<int, int> > , rb_tree_tag,tree_order_statistics_node_update>
const int N = 1e6 + 5, MOD = 1e9 + 7;
int n, q, a[N];
void solve(){
cin >> n >> q;
for(int i = 1; i <= n; ++i)
cin >> a[i];
ordered_set mx, mn;
for(int i = 2; i <= n; ++i)
mx.insert({max(a[i], a[i - 1]), i});
for(int i = 2; i <= n; ++i)
mn.insert({min(a[i], a[i - 1]), i});
while(q--){
int t;
cin >> t;
if(t == 1){
int i, x;
cin >> i >> x;
if(i + 1 <= n){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |