# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
903955 | Faisal_Saqib | 코끼리 (Dancing Elephants) (IOI11_elephants) | C++17 | 9022 ms | 10276 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#pragma once
#include <vector>
#include <algorithm>
#include <iostream>
#include <set>
using namespace std;
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
// tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> sp;
multiset<int> sp;
vector<int> ap;
int cov;
void init(int n, int l, int x[])
{
cov=l;
for(int i=0;i<n;i++)
{
sp.insert(x[i]);
ap.push_back(x[i]);
}
}
int update(int i, int y)
{
sp.erase(sp.lower_bound(ap[i]));
ap[i]=y;
sp.insert(ap[i]);
int cu=*begin(sp);
int po=0;
while(1)
{
auto it=(sp.upper_bound(cu+cov));
po++;
if(it==sp.end())
break;
cu=*it;
}
return po;
}
컴파일 시 표준 에러 (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |