Submission #10090

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
100902014-10-12 04:06:42gs14004고기잡이 (KOI13_fish)C++98
15.84 / 18
4 ms1284 KiB
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
vector<int> px,py;
int n,l,m;
int x[101],y[101];
int lx[101], ly[101], sx, sy;
int a[101][101];
int area(int sx, int sy, int ex, int ey){
int res = a[ex][ey];
if(sx) res -= a[sx-1][ey];
if(sy) res -= a[ex][sy-1];
if(sx && sy) res += a[sx-1][sy-1];
return res;
}
int length(int sx, int sy, int ex, int ey){
return lx[ex] - lx[sx] + ly[ey] - ly[sy];
}
int f(int x, int y){
int res = 0, tx = sx-1;
for (int i = y+1; i<sy; i++) {
while (tx > x && length(x,y,tx,i) > l) tx--;
if(tx == x) break;
res = max(res,area(x,y,tx,i));
}
return res;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...