# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
173081 | VEGAnn | Simple game (IZhO17_game) | C++14 | 566 ms | 15696 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define MP make_pair
#define ft first
#define sd second
#define pii pair<int, int>
using namespace std;
using namespace __gnu_pbds;
template <class T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
const int N = 100100;
const int oo = 2e9;
ordered_set<pii> lf, rt;
int h[N], n, m;
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
cin >> n >> m;
for (int i = 0; i < n; i++)
cin >> h[i];
lf.clear();
rt.clear();
for (int i = 1; i < n; i++) {
rt.insert(MP(max(h[i], h[i - 1]), i));
lf.insert(MP(min(h[i], h[i - 1]), i));
}
for (; m; m--){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |