# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
131266 | arthurconmy | 코끼리 (Dancing Elephants) (IOI11_elephants) | C++14 | 19 ms | 2020 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/* Arthur Conmy / arthurconmy */
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <bitset>
#include <random>
#include <stack>
#include <deque>
#include <chrono>
#ifndef ARTHUR_LOCAL
#include "elephants.h"
#endif
using namespace std;
const int MAXN=100;
int n,l;
int cur_pos[MAXN];
void init(int N, int L, int X[])
{
n = N;
l = L;
for(int i=0; i<n; i++)
{
cur_pos[i]=X[i];
}
}
int update(int i, int y)
{
cur_pos[i]=y;
vector<int> pos;
for(int i=0; i<n; i++)
{
pos.push_back(cur_pos[i]);
}
sort(pos.begin(),pos.end());
int cur_start=pos[0];
int cur_end=pos[0]+l;
int shots=1;
for(int i=1; i<n; i++)
{
if(pos[i]>cur_end)
{
shots++;
cur_start=pos[i];
cur_end=pos[i]+l;
}
}
return shots;
}
컴파일 시 표준 에러 (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... |