摘要:
View Code #include <iostream>#include <stdio.h>using namespace std;typedef struct node{ double x; double y;}point;point p[105];point make_e(point x,point y){ point a; a.x = x.x - y.x; a.y = x.y - y.y; return a;}double cha(point x,point y){ return x.x*y.y - y.x*x.y;}int main(){ ... 阅读全文
摘要:
#include <iostream>#include <stdio.h>using namespace std;typedef struct node{ double x; double y;}point;typedef struct ed{ point a; point b; int is_top;}edge;edge e[100005];point make_e(point x,point y){ point a; a.x = x.x - y.x; a.y = x.y - y.y; return a;}double cha(point... 阅读全文
摘要:
* 需要包含的头文件 */#include <cmath >/* 常用的常量定义 */const double INF = 1E200const double EP = 1E-10const int MAXV = 300const double PI = 3.14159265/* 基本几何结构 */struct POINT{ double x; double y; POINT(double a=0, double b=0) { x=a; y=b;} //constructor};struct LINESEG{ POINT s; POINT e; LINESEG(POIN... 阅读全文
摘要:
题目大意就是 你有足够多的坦克,让你用尽量多的坦克去占领电厂。有N+1各节点,0~n ,0为出发点,1~n为电厂。要想控制摧毁电厂,战胜对方,只需要占领一般的电量即可。但是特克会耗油,所一给你m条路,让你去计算最小耗电量~而且如果坦克不能通过m条路到达任意一个电厂的话就输出'impossible'连接:http://acm.hdu.edu.cn/showproblem.php?pid=3339代码:dijView Code 1 #include <stdio.h> 2 #include <string.h> 3 #define maxn 0x5fffff 阅读全文