码迷,mamicode.com
首页 >  
搜索关键字:zoj 3456    ( 3447个结果
poj 1159 Palindrome
Palindrome Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 53525   Accepted: 18481 Description A palindrome is a symmetrical string, that is, a string read...
分类:其他好文   时间:2014-10-22 11:09:13    阅读次数:194
ZOJ 1203 Swordfish(最小生成树 kruskal)
题意  给你n个点的坐标  每个点都可与其它n-1个点相连  求这n个点的最小生成树的权重 裸的最小生成树  直接kruskal咯 #include #include #include #include using namespace std; const int N = 105, M = 10050; double x[N], y[N], ans; int n, m , par[N]; s...
分类:其他好文   时间:2014-10-22 10:05:06    阅读次数:203
ZOJ 3626(树形DP+背包+边cost)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3626题目大意:树中取点。每过一条边有一定cost,且最后要回到起点。给定预算m,问最大价值。解题思路:首先要注意这题要回到起点,由于树的特殊结构(每个结点只有一个父...
分类:其他好文   时间:2014-10-22 09:54:13    阅读次数:171
[ZOJ 3662] Math Magic (动态规划+状态压缩)
先贴代码,晚上回去说 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 typedef long long LL;10 11 int...
分类:其他好文   时间:2014-10-21 23:01:51    阅读次数:367
poj 2431 Expedition
Expedition Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7255   Accepted: 2163 Description A group of cows grabbed a truck and ventured on an expedition ...
分类:其他好文   时间:2014-10-21 21:46:39    阅读次数:315
poj 3253 Fence Repair
Fence Repair Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 27043   Accepted: 8792 Description Farmer John wants to repair a small length of the fence aroun...
分类:其他好文   时间:2014-10-21 21:44:56    阅读次数:278
zoj 3673 1729
1729Time Limit: 3 Seconds Memory Limit: 65536 KB1729 is the natural number following 1728 and preceding 1730. It is also known as the Hardy-Ramanujan....
分类:其他好文   时间:2014-10-21 15:17:11    阅读次数:196
ZOJ 3829 Known Notation(贪心)
题目链接题意 :给你一个字符串,但是空格丢失,问你需要多少次操作能够让这个字符串可以看成合法的逆波兰式,例如12*3*4不是合法的逆波兰式,但是12*34*可以看成1 2*34*是正确的逆波兰式。思路 :当数字的个数比操作符的个数多的时候显然交换所用的操作次数少,只要把操作符往最后换即可。题目中隐含...
分类:其他好文   时间:2014-10-21 11:45:16    阅读次数:162
ZOJ 2671 -Cryptography ( 矩阵乘法 + 线段树 )
ZOJ 2671 - Cryptography ( 矩阵乘法 + 线段树 )题意:给定模数r, 个数n, 询问数m然后是n个矩阵,每次询问,输出矩阵联乘之后的结果。分析:矩阵乘法 + 线段树优化这里线段树只有询问没有更新操作。PS:顺便仰慕一下watashi。。。。代码:#include #incl...
分类:其他好文   时间:2014-10-21 00:46:33    阅读次数:168
ZOJ 3829 Known Notation (2014牡丹江H题)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5383 Known Notation Time Limit: 2 Seconds      Memory Limit: 65536 KB Do you know reverse Polish notation (RPN)? It is a ...
分类:其他好文   时间:2014-10-20 23:26:54    阅读次数:388
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!