# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
438079 | Stickfish | 사탕 분배 (IOI21_candies) | C++17 | 809 ms | 19768 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "candies.h"
#include <vector>
#include <iostream>
#include <cassert>
using namespace std;
using ll = long long;
const int MAXN = 2e5 + 123;
const ll INF = 1e18 + 177013;
struct upd{
ll add;
pair<ll, ll> sg;
upd(): add(0), sg(0, INF) {}
upd(ll add_, ll mineq_, ll maxeq_): add(add_), sg(maxeq_, mineq_){}
};
ll into_seg(ll x, pair<ll, ll> sg){
if(x < sg.first)
return sg.first;
if(x > sg.second)
return sg.second;
return x;
}
pair<ll, ll> cover(pair<ll, ll> oldsg, pair<ll, ll> newsg){
return {into_seg(oldsg.first, newsg), into_seg(oldsg.second, newsg)};
}
# | 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... |