| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 29046 | aybala | 코끼리 (Dancing Elephants) (IOI11_elephants) | C++11 | 99 ms | 17644 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "elephants.h"
#include<bits/stdc++.h>
#define fori(a,b,c) for(a=b; a<c; a++)
#define ford(a,b,c) for(a=b; a>=c; a--)
#define mp make_pair
#define pb push_back
#define ll long long
#define pii pair<int,int>
using namespace std;
int n;
int cam;
int a[2];
int Ll;
void init(int N, int L, int X[])
{
	int i,j,k;
	int l = X[0];
	a[0]=X[0];
	a[1]=X[1];
	cam = 1;
	fori(i,1,N){
		if(X[i]-l>L){
			l=X[i];
			cam++;
		}
	}
	n=N;
	Ll=L;
}
int update(int i, int y)
{
	if(i==2){
		a[0]=a[1]=y;
		return cam;
	}
	
	if(i==1){
		if(abs(a[1]-y)>abs(a[0]-y)){
			a[1]=y;
		}
		else{
			a[0]=y;
		}
		int l = a[0];
		cam = 1;
		fori(i,1,n){
			if(a[i]-l>Ll){
				l=a[i];
				cam++;
			}
		}	
	}
	
	return cam;
}
컴파일 시 표준 에러 (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... | ||||
