# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
13352 | gs14004 | 수족관 1 (KOI13_aqua1) | C++14 | 16 ms | 1448 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <cstdio>
#include <utility>
#include <map>
#include <algorithm>
using namespace std;
typedef pair<int,int> pi;
int x[2505], y[2505], hole[2505], n;
map<pi,int> mp;
int h;
int res;
int f(int s, int e){
if(s >= e) return 0;
int pos = (int)(min_element(y+s,y+e)-y);
int ph = h, ret = 0;
h = y[pos];
int r = f(s,pos);
r |= f(pos+1,e);
if(hole[pos] == 0 && !r){
res += (x[e] - x[s]) * (y[pos] - ph);
ret = 0;
}
else ret = 1;
h = ph;
return ret;
}
int main(){
# | 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... |