杭电2056Rectangles(未解决)
2012-08-03 10:08
169 查看
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2056
该题Output Limit Exceeded,可能是考虑情况太少了!
下面的代码Output Limit Exceeded了
View Code
继续ing··························
该题Output Limit Exceeded,可能是考虑情况太少了!
下面的代码Output Limit Exceeded了
View Code
#include <cstdlib> #include <iostream> #include <stdio.h> using namespace std; int main(int argc, char *argv[]) { double a[8]={0}; //int n=2; while(1) { double x1=0,y1=0,x2=0,y2=0; double area=0; for(int i=0;i<8;i++) cin>>a[i]; if(a[0]>a[4]) x1=a[0]; else x1=a[4]; if(a[1]>a[5]) y1=a[1]; else y1=a[5]; if(a[2]>a[6]) x2=a[6]; else x2=a[2]; if(a[3]>a[7]) y2=a[7]; else y2=a[3]; if(x2>x1&&y2>y1) { area=(x2-x1)*(y2-y1); printf("%.2lf\n",area); } } system("PAUSE"); return EXIT_SUCCESS; }
继续ing··························
相关文章推荐
- 杭电2056Rectangles
- 杭电 2056 Rectangles
- 杭电2056之Rectangles 杭电
- 杭电2056、Rectangles
- 杭电ACM 2056 Rectangles
- 杭电2056 Rectangles
- HDU——2056——Rectangles
- HDOJ 2056 Rectangles(坐标排序、矩形面积并)
- 杭电2056
- hdu 2056 Rectangles
- hdu_2056 Rectangles (计算几何)
- HDU 2056 Rectangles(矩形面积交)
- Rectangles 2056
- hdoj 2056 Rectangles(矩形) 【几何】
- HDU 2056 rectangles
- 杭电2056
- hdoj2056(Rectangles 求矩形重叠面积
- HDU——2056Rectangles(几何计算)
- HDU 2056 Rectangles
- HDU 2056 Rectangles