- 博客(18)
- 问答 (2)
- 收藏
- 关注
原创 计算机图形学几何工具算法详解(第2章):(hua)笔(shui)记
还是去那里看好了第2章 矩阵和线性系统2.3.2 转置性质:(AB)^T=B^T A^T2.3.4 矩阵乘法性质:没有交换律:A(BC)!=(AB)C奇妙的转置:2.4.1 线性方程2.4.3 一般线性系统增广矩阵。2.4.4 减行、消元、轶等等减行、基本行运算、线性无关2.5.1 对角矩阵
2017-10-01 18:52:26 1159 1
原创 RPFS(RP First Search) 模拟退火算法 未完
POJ 2420求费马点代码来自网络#include#includeconst double inf=1e9;const int N=100;const double threshold=1e-7,delta=0.98,inital_temperature=100;const double d[4][2]={{0,1},{1,0},{0,-1},{-1,0}};int n;
2017-10-30 19:48:05 1430 1
原创 LCA的三种求法 - HDU 2586
Tarjan一遍 大法师 处理所有询问, 每次递归处理子树, 把子树与当前节点的并查集合并. 然后如果一个询问的两个节点都被访问, 直接输出答案#include#include#includeusing namespace std;int T,n,m,a,b,c,p[40010],vis[40010],dep[40010],ans[210];vector >g[40010];v
2017-10-30 17:37:29 246
原创 模板:强连通分量和缩点
洛谷 P2002 消息扩散缩点后输出入度为0的点(tarjan)#include#include#include#define N 100010#define M 500010using namespace std;int n,m,x,y,Q[M],dfn[N],low[N],inq[N],p[N],in[N],tail,now,size,ans;vectorg[N];
2017-10-30 14:46:13 321
原创 扩欧习题
•https://vjudge.net/problem/LightOJ-1306•http://acm.hdu.edu.cn/showproblem.php?pid=1576•http://acm.hdu.edu.cn/showproblem.php?pid=5651•http://www.lightoj.com/volume_showproblem.php?problem=130
2017-10-29 21:16:08 384
原创 ZOJ 1608
#includeint main() { float a,b,r1,r2; while(scanf("%f%f%f%f",&a,&b,&r1,&r2)!=EOF) puts((a=2*(r1>r2 ? r1 : r2)&&(a-r1-r2)*(a-r1-r2)+(b-r1-r2)*(b-r1-r2)>=(r1+r2)*(r1+r2) ? "Yes" : "No");}三目运算符风格
2017-10-28 19:10:23 213
原创 jump_1.1
#include#include#include#include#include/**************************/int monst_create();/**************************//* main time line */int TIME;/* map */const int MAP_HEI=25,MAP_LEN=25;cha
2017-10-28 11:06:39 230
原创 rbtree
#include#includestruct RBtree{ struct Node { int val,color,lr; Node *fa,*lch,*rch; Node():fa(NULL),lch(NULL),rch(NULL) {} Node(int x,int islr,Node *pre):val(x),color(1),lr(islr),fa(pre),l
2017-10-27 18:35:48 226
原创 模板..
#include#includestruct RBtree { struct Node { int val,color; Node *lch,*rch; Node():val(0),color(0),lch(NULL),rch(NULL) {} }; Node *root; void insert(int x)};
2017-10-21 16:32:26 164
原创 模板:高精度
#include#include#includeusing namespace std;const int N=1024;struct int1024 { char arr[N]; int len,neg; int1024():len(0),neg(1) { memset(arr,0,sizeof arr); } void read() { scanf("%s",arr
2017-10-19 20:59:54 236
原创 博弈论基础
hdu 1846```十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫《勇敢者的游戏》(英文名称:Zathura),一直到现在,我依然对于电影中的部分电脑特技印象深刻。 今天,大家选择上机考试,就是一种勇敢(brave)的选择;这个短学期,我们讲的是博弈(game)专题;所以,大家现在玩的也是“勇敢者的游戏”,这也是我命名这个题目的原因。 当然,除
2017-10-18 20:30:21 279
原创 模板:母函数
hdu 1398```People in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with values of all square numbers up to 289 (=17^2), i.e., 1-
2017-10-17 20:44:27 214
原创 模板:list
起始数组编号:0包含函数:size,operator[],push_back(val),insert(pos,val)(在pos前插入val),erase(pos),find(val);(return -1)压行前#include#include#includeusing namespace std;//array numbered fr
2017-10-13 12:30:29 174
原创 模板:vector
#include#include#includetemplate class vector {private: int max_size; T *arr; void resize() { T *na=new T[2*max_size]; memcpy(na,arr,max_size*sizeof(T)); delete[] arr; max_size*=2; arr=
2017-10-13 08:50:53 209
原创 模板:块状链表
#include#includeusing namespace std;int max(const int x,const int y) { return x>y?x:y;}int min(const int x,const int y) { return x<y?x:y;}struct Block { static const int M=10; static int p;
2017-10-12 17:27:28 312
原创 假的生命游戏
#include#include#include#includeconst int n=25;const int p=6;const int dir[][2]={{0,1},{1,1},{1,0},{1,-1},{0,-1},{-1,-1},{-1,0},{-1,1}};char s[100][100],o[100][100];inline void print() { for(
2017-10-01 18:16:27 229
转载 利 用 矩 阵 乘 法 解 决 十 个 经 典 题 目
https://max.book118.com/html/2017/0730/125272052.shtm
2017-10-01 16:16:35 233
原创 期望DP入门 HDU - 4405 Aeroplane chess
#include#include#includeint n,m,a,b,to[100010];double dp[200010],k=1.0/6;int main() { while(scanf("%d%d",&n,&m)&&(n+m)) { memset(to,0,sizeof(to)); memset(dp,0,sizeof(dp)); for(int i=0;i<m;
2017-10-01 11:26:56 178
空空如也
Ubuntu虚拟机Firefox“server not found"
2020-09-20
Ubuntu虚拟机Firefox“server not found"
2020-09-20
TA创建的收藏夹 TA关注的收藏夹
TA关注的人