# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
12898 | baneling100 | 수족관 1 (KOI13_aqua1) | C++98 | 4 ms | 1192 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
#define INF 0x7fffffff
struct line {
int X1;
int X2;
int Y;
int Hole;
} Line[5000];
int N, K, Ans;
int divideConquer(int Left, int Right, int H) {
int i, Min=INF, Mid, res1=0, res2=0;
if(Left==Right) {
if(Line[Left].Hole)
return 1;
Ans+=(Line[Left].Y-H)*(Line[Left].X2-Line[Left].X1);
return 0;
}
else {
for(i=Left ; i<=Right ; i++)
if(Min>Line[i].Y) {
Min=Line[i].Y;
Mid=i;
}
if(Left<=Mid-1)
res1=divideConquer(Left ,Mid-1,Min);
if(Mid+1<=Right)
# | 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... |