码迷,mamicode.com
首页 >  
搜索关键字:uva 116    ( 8022个结果
UVA 10689 - Yet another Number Sequence(矩阵快速幂)
UVA 10689 - Yet another Number Sequence 题目链接 题意:斐波那契给前两项,求出第n项,并保留m位 思路:挺裸的矩阵快速幂,就是取模的值是10^m 代码: #include #include const int mod[5] = {0, 10, 100, 1000, 10000}; int t, a, b, n, m; s...
分类:其他好文   时间:2014-07-22 00:31:37    阅读次数:279
UVa12096.The SetStack Computer
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=32481391605812096The SetStack ComputerAcceptedC++0...
分类:其他好文   时间:2014-07-22 00:28:38    阅读次数:220
UVA - 11090 Going in Cycle!! (Bellman-Ford算法判负环)
Description I I U P C 2 0 06 Problem G: Going in Cycle!! Input: standard input Output: standard output   You are given a weighted directed gra...
分类:其他好文   时间:2014-07-22 00:28:36    阅读次数:217
UVA 684 - Integral Determinant(行列式变换)
UVA 684 - Integral Determinant 题目链接 题意:给定一个行列式,求出值 思路:利用线性代数中的列相减,然后不断降阶即可,就是要用分数去写 代码: #include #include #include using namespace std; const int N = 35; long long gcd(long long a...
分类:其他好文   时间:2014-07-22 00:26:37    阅读次数:207
UVa540.Team Queue
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=48113916935540Team QueueAcceptedC++0.3392014-07-21...
分类:其他好文   时间:2014-07-22 00:22:34    阅读次数:217
uva 201 - Squares(自己的方法,同学有更好一点点的方法)
#include #include #include #include #include using namespace std; int h[20][20]; int v[20][20]; int size_[20]; int n,m; int flag; void judge(int x,int y)//这是关键部分的代码,用来判读那是否能构成square; { int a1=n-x...
分类:其他好文   时间:2014-07-21 13:36:09    阅读次数:221
UVA - 10537 The Toll! Revisited (最短路变形逆推)
Description Problem G Toll! Revisited Input: Standard Input Output: Standard Output Time Limit: 1 Second   Sindbad the Sailor sold 66 silver spoons to the Sultan of Samarkand. The selling...
分类:其他好文   时间:2014-07-21 13:35:07    阅读次数:263
uva 12096 - The SetStack Computer(STL 的运用)
这道题目貌似就是在不停地用STL中的内容,对STL熟练运用的大神估计坐起来会比较easy。。 不过对于我这种看着代码还是需要上网查函数运用的菜鸟来说,若让我自己做这道题,肯定不会使用STL。。 就当对STL的学习了。 #include #include #include #include #include #include #include #include #include//set_un...
分类:其他好文   时间:2014-07-21 11:44:55    阅读次数:320
uva 815 - Flooded!(点名要做的思路题~我觉得方法挺好)
#include #include #include #include using namespace std; double a[100000]; double vol[100000]; int m,n; double v1,v2; bool cmp(double aa,double bb) { if(aa>bb) return true; } int main() { int...
分类:其他好文   时间:2014-07-21 11:43:45    阅读次数:226
UVA fill
题目如下: Problem D Fill   There are three jugs with a volume of a, b and c liters. (a,b, and c are positive integers not greater than 200). The first and the secondjug are initially empty, wh...
分类:其他好文   时间:2014-07-21 11:32:15    阅读次数:253
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!