题目链接Fast Matrix CalculationTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 87Accepted Submission...
分类:
其他好文 时间:
2014-08-19 20:25:35
阅读次数:
322
上一篇文章的例子中我们可以看到顶点着色器的输出参数可以说是直接作为了片段着色器的形参传递过来,那么不由得一个问题浮现出来,顶点着色器的形参是从何处传递过来的?
顶点着色器的形参是gameObject 的meshRenderer组件将所有的mesh数据按每一帧一次传递给OpenGL。
这中间的过程常常被称作一次draw call,往往一次性传输大量mesh信息作为一次draw call 比多次传输少量mesh信息引起多次draw call更加效率。
而在上一个例子中我们只接受了MeshRenderer传递...
分类:
其他好文 时间:
2014-08-19 16:31:04
阅读次数:
212
题目链接:uva 11149 - Power of Matrix
题目大意:给定一个矩阵,求∑ikAi
解题思路:因为k比较大,所以即使用快速幂的话复杂度还是有点高,利用矩阵倍增的方法∑ikAi=(1+Ak/2)?∑ik/2Ai
#include
#include
#include
using namespace std;
const int maxn = 50;
const...
分类:
其他好文 时间:
2014-08-18 00:17:23
阅读次数:
273
1 /* 2 题意:用木板盖住泥泞的地方,不能盖住草。木板任意长!可以重叠覆盖! '*'表示泥泞的地方,'.'表示草! 3 思路: 4 首先让我们回忆一下HDU 2119 Matrix这一道题,一个矩阵中只有0, 1,然后让我们通过选择一行,或者 5 ...
分类:
其他好文 时间:
2014-08-18 00:05:33
阅读次数:
223
Division game is a 2-player game.In this game, there is a matrix of positive integers with N rows and M columns.Players make their moves in turns. In each step, the current player selects arow. If the...
分类:
其他好文 时间:
2014-08-17 15:40:52
阅读次数:
191
Square spiralNikola picks up a strange circuit board. All of its elements are connected in a spiral and it is possible to connect the neighboring elem...
分类:
其他好文 时间:
2014-08-17 09:09:51
阅读次数:
411
链接:http://poj.org/problem?id=3422
卡卡
题意:卡卡的矩阵之旅,有一个n*n的矩阵,卡卡要从左上角走到右下角,每次他只能往右或往下走,卡卡可以走k遍这个矩阵,每个点有一个num值,卡卡走到这里可以获得num点,一个点只能获得一次num值,问卡卡走完k遍后身上num值最大可以是多少?
思路:其实看到这题时没思路,图论书上说了建图的方式,但...
分类:
其他好文 时间:
2014-08-16 21:07:01
阅读次数:
224
整个看FFT过程中复数一直很折磨我。原本的实数的东西通过复数表达很像旋转矩阵用quaternion来表达,尽管旋转vector还是要用matrix来做,但是通过用quaternion表达的旋转意义可以做插值等很多快速的操作,而且内存消耗也小,在做完这些操作之后再转成matrix用就好了。复数表达也是...
分类:
其他好文 时间:
2014-08-16 21:00:41
阅读次数:
190
Given an integer n, generate a square matrix filled with elements from 1 to n2 in
spiral order.
For example,
Given n = 3,
You should return the following matrix:
[
[ 1, 2, 3 ],
[ 8, 9, 4 ],
[...
分类:
其他好文 时间:
2014-08-15 22:37:39
阅读次数:
274
解题报告
题意:
题意类似与POJ3041
思路:
见POJ3041解题报告
最小点覆盖。
#include
#include
#include
using namespace std;
int mmap[110][110],vis[110],pre[110],n,m;
int dfs(int x) {
for(int i=1; i<=m; i++) {...
分类:
其他好文 时间:
2014-08-15 21:12:49
阅读次数:
253