副标题:搭建基于MinGW平台的《OpenGL超级宝典》(OpenGL蓝皮书第5版)GLTools 编译环境。示例代码:Triangle.cpp @ SB5.zip以下内容以及方法均参考自老外在stackoverflow上的回答,强烈建议看看原文,因为他告诉你解决问题的思路而不只是给你结果openg...
分类:
其他好文 时间:
2014-09-14 21:52:17
阅读次数:
214
The Triangle http://poj.org/problem?id=1163暴力dfs的话,每个节点有两条路可以走,那么n个节点复杂度就是2^n n=100 超时 dp来做 就优化成 n^2记忆化搜索,就能优化成n^2 因为一个点最多算一次,以后会直接返回dp i j 。 dp i j ....
分类:
其他好文 时间:
2014-09-14 11:19:27
阅读次数:
185
// 算法:DFS// 递归函数参数使用引用//Time Limit Exceeded 1 class Solution { 2 public: 3 vector > findLadders( string start, string end, unordered_set &dict) { ...
分类:
其他好文 时间:
2014-09-14 11:18:47
阅读次数:
154
http://acm.hdu.edu.cn/showproblem.php?pid=5001
思路:dp计算出途径每个点的总概率,1-x即为所求解。
dp题,先介绍下dp[i][j]为第j步走在第i个点的概率,那么dp[i][j]=dp[x1][j-1]+dp[x2][j-1]+...,x1,x2为i 的相邻节点。上一步在相邻节点这一步才能走到该点嘛。
每个点概率要一个一个的算,当算到第ii...
分类:
其他好文 时间:
2014-09-13 21:28:55
阅读次数:
193
源:http://www.cnblogs.com/bingoo/p/3450850.html1.方法一:.sof和.elf全部保存在FPGA内,程序加载和运行也是在FPGA内部。把FPGA的配置文件.sof通过JTAG方式下载(其实是在线运行)进入FPGA本身,此时在NIOSII的界面中,点击“RU...
分类:
移动开发 时间:
2014-09-13 11:58:35
阅读次数:
312
传送门Organize Your Train part IITime Limit:1000MSMemory Limit:65536KDescriptionRJ Freight, a Japanese railroad company for freight operations has recent...
分类:
其他好文 时间:
2014-09-12 23:18:04
阅读次数:
331
有个以坐标原点为圆心的圆,给出圆上的点的关于x轴的夹角,以及圆的半径,求圆上点所能构成的三角形的面积和
我的做法:
先算出每个点的坐标,枚举所有三个点的组合,叉积求面积
我的代码:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
usi...
分类:
其他好文 时间:
2014-09-12 22:12:14
阅读次数:
235
Morley’s
Theorem
Input: Standard Input
Output: Standard Output
Morley’s theorem states that that the lines trisecting the angles of an arbitrary plane triangle meet at the vertices of an equilat...
分类:
其他好文 时间:
2014-09-12 15:07:13
阅读次数:
184
递归 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode...
分类:
其他好文 时间:
2014-09-12 11:36:23
阅读次数:
183