Description
Instant Complexity
Analyzing the run-time complexity of algorithms is an important tool for designing efficient programs that solve a problem. An algorithm that r...
分类:
其他好文 时间:
2014-07-19 18:26:15
阅读次数:
268
题意一直没看懂~~~~不过看懂了之后还是感觉挺好的#include#include#include#define maxn 32using namespace std;int n;double p[maxn],t;void pre(){ p[0]=1; for(int i=1;i=0;i...
分类:
其他好文 时间:
2014-07-19 18:16:09
阅读次数:
249
C - Allergy TestCrawling in process... Crawling failed Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit Status Practice UVA 11691D...
分类:
其他好文 时间:
2014-07-19 18:08:03
阅读次数:
271
bfs求最短路,递归打印最短路的具体路径;难点: 当前状态和转弯方式很复杂,要仔细处理; 递归打印:用一个数组存储路径中结点的前一个节点,递归查找 (bfs无法确定下一个结点,但对于没一个结点,它的上一个结点是确定的!)ps:输出因为太懒不想处理所以按书上打的;递归打印理解有点麻烦。。。 1 ...
分类:
其他好文 时间:
2014-07-19 16:05:10
阅读次数:
293
UVA 10733 - The Colored Cubes
题目链接
题意:一个立方体,n种颜色,问能涂成多少不同立方体
思路:Ploya求解,正方体对应24种不同旋转一一计算出循环个数即可,和
UVA 10601 - Cubes这题类似
代码:
#include
#include
unsigned long long n;
int main() {
w...
分类:
其他好文 时间:
2014-07-19 14:07:23
阅读次数:
189
UVA 11774 - Doom's Day
题目链接
题意:给定一个3^n*3^m的矩阵,要求每次按行优先取出,按列优先放回,问几次能回复原状
思路:没想到怎么推理,找规律答案是(n + m) / gcd(n, m),在topcoder上看到一个证明,如下:
We can associate at each cell a base 3-number, the log3(R...
分类:
其他好文 时间:
2014-07-19 14:06:19
阅读次数:
220
Description
Black Box
Our Black Box represents a primitive database. It can save an integer array and has a special
i variable. At the initial moment Black Box is empty and...
分类:
其他好文 时间:
2014-07-19 12:06:45
阅读次数:
199
Description
Problem G - Summits
Time limit: 8 seconds
You recently started working for the largest map drawing company in theNetherlands. Part of your job is to determine what the summits in apar...
分类:
其他好文 时间:
2014-07-19 08:13:31
阅读次数:
288
题目如下:
Graph Coloring
You are to write a program that tries to find an optimal coloring for agiven graph. Colors are applied to the nodes of the graph and the only availablec...
分类:
其他好文 时间:
2014-07-19 02:35:06
阅读次数:
210
题目如下:
Bandwidth
Given a graph (V,E) where V is a set of nodes and E is a set of arcsin VxV, and an
ordering on the elements in V, then the bandwidth of a node
v is defined as...
分类:
其他好文 时间:
2014-07-19 02:26:15
阅读次数:
206