# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
315548 | super_j6 | Pinball (JOI14_pinball) | C++14 | 89 ms | 9468 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <map>
using namespace std;
#define endl '\n'
#define ll long long
#define pi pair<int, int>
#define f first
#define s second
const ll inf = 0x3f3f3f3f3f3f3f3f;
int n, m;
map<int, ll> dpl;
map<int, ll, greater<int>> dpr;
template<typename T>
void add(T &dp, int x, ll y){
auto it = dp.insert({x, y}).f;
y = min(y, it->s), it->s = y;
if(next(it) != dp.end() && next(it)->s <= y) it = dp.erase(it);
while(it != dp.begin() && (--it)->s >= y) it = dp.erase(it);
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n >> 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |