文章列表
 
您正在查看 "矩形切割" 分类下的文章

2010-01-26 16:47

//也是矩形切割的题,第一次提交就A,发现我的这个模板还不错。内存开销少,时间也快,一下午的调试没白费。

#include<iostream>
using namespace std;
typedef struct
{
int x1, y1, x2, y2;
}RECT;
RECT rect[21*5];
RECT rect1[21];
RECT temp[21];
int n;
int m;
int num;
int t;
int len;
int cnt = 0;
int i, j, k;
int sum_area, s;
int lx, ly, rx, ry;
int counter;
int main()
{
//freopen("in.t

 
2010-01-26 15:57

//我用的矩形切割。把1151你代码改一下就AC了。

#include<iostream>
#include<cmath>
using namespace std;
const int maxn = 3000;
int n;
struct RECT
{
double x1, y1, x2, y2;
}rect[maxn];//存储矩形集
double   lx, ly, rx, ry;
int      t;
int      len;
double   sum_area;
bool     flag;
int      num;

 
 
   
 
 
文章存档
 
     
 
最新文章评论
  

条理很清晰
 

什么是多重队列?跪求!!!
 

orz ...
 

请问这个代码,错在什么地方了?一直是 running time error 我是不是少考虑了什么条
 

#include<iostream> #include<algorithm> #include<string.h> using namespace std;
   
帮助中心 | 空间客服 | 投诉中心 | 空间协议
©2012 Baidu