码迷,mamicode.com
首页 >  
搜索关键字:strange way to expre    ( 2753个结果
Codeforces 39E What Has Dirichlet Got to Do with That? 博弈+记忆化搜索
题目链接:点击打开链接 题意: 给定 a个箱子 b个球 常数n (球和箱子都是各不相同的,不会出现有一样的物品) 设 way = 把b个球放到a个箱子中的方法数, 若way >= n则游戏结束 有2个人玩游戏。 若当前轮到 X时 1、 X选择增加一个箱子或增加一个球 2、若增加完后方法数>=n 则X失败 若先手必胜,则输出 Masha ,若先手必败则输出 Stas ,若为平局则输出...
分类:其他好文   时间:2014-07-18 22:31:42    阅读次数:282
Dp_F Pku1157
/* F - 简单dp Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Submit Status Description You want to arrange the window of your flower shop in a most pleasant way. You have...
分类:其他好文   时间:2014-07-18 21:31:53    阅读次数:277
LeetCode "Triangle"
This is the same asSPOJ #453. The best way to understand DP1A code:class Solution {public: int minimumTotal(vector > &triangle) { fo...
分类:其他好文   时间:2014-07-18 21:19:47    阅读次数:234
SGU 145.Strange People
时间:0.25s空间:4m题意: 其实就是求无环第K短路。 输入: 给出n,m,k,分别代表,n个点,m条边,第k长路。 接下来m行,三个整数x,y,z,分别代表x,y之间有条费用为x的双向路。保证没有重边。输出: 第一行两个数a,b,第k小费用a,和经过的点的...
分类:其他好文   时间:2014-07-16 19:31:00    阅读次数:179
OpenGL EXT: shader_buffer_load
http://www.opengl.org/registry/specs/NV/shader_buffer_load.txtOverview At a very coarse level, GL has evolved in a way that allows applications...
分类:其他好文   时间:2014-07-15 23:01:19    阅读次数:431
poj 1837 Balance
Balance Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 10241   Accepted: 6330 Description Gigel has a strange "balance" and he wants to poise it. Actually, ...
分类:其他好文   时间:2014-07-15 22:42:22    阅读次数:272
Pig Latin儿童黑话(java)
??●假设单词以辅音字母開始,将词首的辅音字母字符串(第一个元音字母前的全部字母)从单词的开头移动到末尾,然后加上后缀ay,这样就形成了它的pig latin。●假设单词以元音字母開始,仅仅须要加入后缀way就可以。这里注意java中的分离思想,对于这样的问题,我们一眼想不出解决的方法的时候,我们就...
分类:编程语言   时间:2014-07-14 23:15:15    阅读次数:354
最短路径问题
点击打开链接 类似A strange lift的写法,之前一直返回RE,感觉有点不科学,数据较小。后来看discuss,居然输入还要考虑去重。 题意:略; 解析:最短路问题,但是有两种情况,因此需要根据具体情况来考虑。我采用的是构造两张图,然后在使用Dijkstra中将dis与cost放在一个结构体中,便于理解。其它就是A strange lift的一点变形 #include #inc...
分类:其他好文   时间:2014-07-14 13:13:17    阅读次数:288
Traversing a list
The most common way to traverse the elements of a list is with a for loop. The syntax is the same as for strings: This works well if you onl...
分类:其他好文   时间:2014-07-13 19:38:51    阅读次数:324
A strange lift
点击打开链接 题意:有n层楼层,现在在每一层有两个按钮,分别为up和down,按动按钮时,可以向上或向下跳动num[ i ]层;问能否以最少的次数从A到B层,不能输出-1; 解析:构图,将从i层到按动按钮后跳转的楼层,看作连通状态,赋值为1,这样就转换成单源最短路问题; #include #include #include using namespace std; const int m...
分类:其他好文   时间:2014-07-13 18:37:00    阅读次数:231
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!