| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 29088 | kavun | 코끼리 (Dancing Elephants) (IOI11_elephants) | C++14 | 9000 ms | 25700 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "elephants.h"
#include <bits/stdc++.h>
using namespace std;
set <pair<int,int> > st;
vector <int> x;
int n, l;
void init(int N, int L, int X[])
{
n = N; l = L;
for(int i = 0; i < n; i++)
{
st.insert(make_pair(X[i],i));
x.push_back(X[i]);
}
}
int update(int i, int y)
{
int res = 1;
set<pair<int,int> >::iterator it = st.find(make_pair(x[i],i));
x[i] = y;
st.erase(it);
st.insert(make_pair(y,i));
set<pair<int,int> >::iterator leftmost = st.begin();
while(leftmost != st.end())
{
pair<int,int> pr = *leftmost;
int pos = pr.first; int id = pr.second;
leftmost = st.upper_bound(make_pair(pr.first + l,1e9));
if(leftmost != st.end())
res++;
}
return res;
}
컴파일 시 표준 에러 (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... | ||||
