답안 #1013709

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1013709 2024-07-03T23:30:40 Z vjudge1 코끼리 (Dancing Elephants) (IOI11_elephants) C++17
26 / 100
9000 ms 14672 KB
#include "elephants.h"
#include<bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
int n,l;
int arr[50100];
set<int>st;
void init(int N, int L, int X[]){
    n = N;
    l=L;
    for(int i=0;i<N;i++)
        st.insert(arr[i]=X[i]);
}

int update(int i, int y) {
    st.erase(arr[i]);
    st.insert(arr[i]=y);
    int ans=0,lst=-1e9;
    for(auto b:st)
        if(lst+l<b)
            lst=b,ans++;
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 8540 KB Output is correct
2 Correct 1 ms 8540 KB Output is correct
3 Correct 1 ms 8540 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 8540 KB Output is correct
2 Correct 1 ms 8540 KB Output is correct
3 Correct 1 ms 8540 KB Output is correct
4 Correct 2 ms 8536 KB Output is correct
5 Correct 1 ms 8540 KB Output is correct
6 Correct 1 ms 8540 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 8540 KB Output is correct
2 Correct 1 ms 8540 KB Output is correct
3 Correct 1 ms 8540 KB Output is correct
4 Correct 2 ms 8536 KB Output is correct
5 Correct 1 ms 8540 KB Output is correct
6 Correct 1 ms 8540 KB Output is correct
7 Correct 3433 ms 12212 KB Output is correct
8 Correct 5551 ms 12576 KB Output is correct
9 Execution timed out 9049 ms 14672 KB Time limit exceeded
10 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 8540 KB Output is correct
2 Correct 1 ms 8540 KB Output is correct
3 Correct 1 ms 8540 KB Output is correct
4 Correct 2 ms 8536 KB Output is correct
5 Correct 1 ms 8540 KB Output is correct
6 Correct 1 ms 8540 KB Output is correct
7 Correct 3433 ms 12212 KB Output is correct
8 Correct 5551 ms 12576 KB Output is correct
9 Execution timed out 9049 ms 14672 KB Time limit exceeded
10 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 8540 KB Output is correct
2 Correct 1 ms 8540 KB Output is correct
3 Correct 1 ms 8540 KB Output is correct
4 Correct 2 ms 8536 KB Output is correct
5 Correct 1 ms 8540 KB Output is correct
6 Correct 1 ms 8540 KB Output is correct
7 Correct 3433 ms 12212 KB Output is correct
8 Correct 5551 ms 12576 KB Output is correct
9 Execution timed out 9049 ms 14672 KB Time limit exceeded
10 Halted 0 ms 0 KB -