# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
534832 | qwerasdfzxcl | 치료 계획 (JOI20_treatment) | C++14 | 235 ms | 22872 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
constexpr ll INF = 1e18;
constexpr int INF2 = 2e9;
ll dist[100100];
struct Fenwick{
vector<pair<int, int>> tree[100100];
int sz;
void init(int n){sz = n;}
void init2(){for (int i=0;i<=sz;i++) sort(tree[i].begin(), tree[i].end(), greater<pair<int, int>>());}
void update(int x, int y, int i){
while(x<=sz){
tree[x].emplace_back(y, i);
x += x&-x;
}
}
pair<int, int> query(int x){
pair<int, int> ret = {INF2, 0};
while(x){
while(!tree[x].empty() && dist[tree[x].back().second]!=INF) tree[x].pop_back();
if (!tree[x].empty()) ret = min(ret, tree[x].back());
x -= x&-x;
}
return ret;
}
int pop(int x, int y){
auto [val, idx] = query(x);
if (val>y) return 0;
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |