码迷,mamicode.com
首页 >  
搜索关键字:uva 10200 prime tim    ( 11153个结果
projecteuler---->problem=7----10001st prime
title: By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10 001st prime number? 翻译: 通过列出前6个质数,我们可知第6个质数是13。 那么第10001个质数是...
分类:其他好文   时间:2014-06-05 12:28:28    阅读次数:277
UVA 712 - S-Trees
题目如下: S-Trees  A Strange Tree (S-tree) over the variable set is a binary tree representing a Boolean function .Each path of the S-tree begins at the root node and consists ...
分类:其他好文   时间:2014-06-05 11:04:37    阅读次数:248
hdu 1016 Prime Ring Problem (dfs)
一切见注释。 #include #include #include #include using namespace std; bool vis[22]; int n; int ans[22]; int top; bool isprime(int x)//判断素数 { for(int i=2;i<x;i++) if(x%i==0)return false; ...
分类:其他好文   时间:2014-06-05 08:26:47    阅读次数:201
UVA Tree
题目如下: Tree  You are to determine the value of the leaf node in a given binary treethat is the terminal node of a path of least value from the root of thebinary tree to any le...
分类:其他好文   时间:2014-06-05 05:27:11    阅读次数:268
UVa 10889 - The Lost Gift
题目:给你R个红球和B个黑球,从这些球中取出相同颜色的概率是50%;             然后丢了一些黑球,剩下的黑球不少于原来的70%;             现在给你红球和剩下的黑球个数,求可能丢了几个黑球。 分析:数学题。             首先,根据组合数学列出等式2*[C(n,2)+C(m,2)] = C(m+n,2):...
分类:其他好文   时间:2014-06-05 05:18:35    阅读次数:187
Uva 563 网络流
题目链接:点击打开链接 题意:给定s*a的方格点,有b个坐标是有且仅有一个人的。 每个点只能被经过一次 能不能让所有人都移动到矩阵边缘。 拆点一下,建图还是挺明显的。。 太卡了提交半天没结果,贴一下代码改天再搞好了。。 #include #include #include #include #include using namespace std; #define ll...
分类:其他好文   时间:2014-06-05 04:36:13    阅读次数:238
UVA Quadtrees
题目如下; Quadtrees  A quadtree is a representation format used to encode images. The fundamental ideabehind the quadtree is that any image can be split into four quadrants. Each...
分类:其他好文   时间:2014-06-05 04:20:06    阅读次数:226
UVA 12508 - Triangles in the Grid(计数问题)
12508 - Triangles in the Grid 题目链接 题意:给定一个n?m格子的矩阵,然后给定A,B,问能找到几个面积在A到B之间的三角形。 思路:枚举每一个子矩阵,然后求[0,A]的个数减去[0,B]的个数就是答案,然后对于每个子矩阵个数很好求为(n?r+1)?(m?c+1)。关键在于怎么求每个子矩阵的符合个数。 想了好久,参考别人题解才想出来,分3种情况...
分类:其他好文   时间:2014-06-05 01:09:44    阅读次数:248
UVa-101 - The Blocks Problem
The Blocks Problem  Background  Many areas of Computer Science use simple, abstract domains for both analytical and empirical studies. For example, an early AI study of planning and robo...
分类:其他好文   时间:2014-06-04 21:55:37    阅读次数:313
JD 题目1040:Prime Number (筛法求素数)
OJ题目:click here~~ 题目分析:输出第k个素数 贴这么简单的题目,目的不纯洁 用筛法求素数的基本思想是:把从1开始的、某一范围内的正整数从小到大顺序排列, 1不是素数,首先把它筛掉。剩下的数中选择最小的数是素数,然后去掉它的倍数。依次类推,直到筛子为空时结束。如有: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15...
分类:其他好文   时间:2014-06-03 01:31:03    阅读次数:233
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!