码迷,mamicode.com
首页 >  
搜索关键字:sg    ( 752个结果
sg(Sprague-Grundy)函数 小结
sg(Sprague-Grundy)函数 sg值:一个点的SG值就是一个不等于它的后继点的SG的且大于等于零的最小整数。 后继点:也就是按照题目要求的走法,能够走一步达到的那个点。 sg函数值的性质: sg(x)==0 必败点 sg(x)>0 必胜点 求单个sg函数值 int sg[MAXN]; int get_sg(int x, int n){ if(sg[x]!=-...
分类:其他好文   时间:2015-07-10 22:23:31    阅读次数:241
eclipse for C/C++
摘自:https://www3.ntu.edu.sg/home/ehchua/programming/howto/EclipseCpp_HowTo.htmlStep 1: Install Eclipse C/C++ Development Tool (CDT)Two ways to install ...
分类:编程语言   时间:2015-07-08 00:30:11    阅读次数:132
if语句判断身高体重是否标准
1.判断身高,体重是否标准Console.WriteLine("请输入您的身高:"); int sg = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("请输入您的体重:"); ...
分类:其他好文   时间:2015-07-07 18:58:55    阅读次数:123
添加service 和删除service
Install Servicesc create NCS.QMS.1QTicketPrinting.SG binpath= "D:\NCS\1Q_SG\ReportService\NCS.QMS.Reports.AppHost.exe" displayname= "NCS.QMS.1QTicketP...
分类:其他好文   时间:2015-06-29 23:46:15    阅读次数:139
JNI Tutorial
原文链接:https://www3.ntu.edu.sg/home/ehchua/programming/java/JavaNativeInterface.html1.IntroductionAt times, it is necessary to use native codes (C/C++) ...
分类:其他好文   时间:2015-06-24 18:35:19    阅读次数:117
poj 3537 Crosses and Crosses 博弈论之grundy值
题意: 给1*的格子,轮流在上面叉叉,最先画得3个连续叉叉的赢,问先手必胜还是必败。 分析: 求状态的grundy值(也就是sg值),具体怎么求详见代码,为什么这么求要自己想的,只可意会(别人都说去看game theory,呵呵)。 代码: //poj 3537 //sep9 #include #include using namespace std; int grundy[2048...
分类:其他好文   时间:2015-06-24 02:03:35    阅读次数:122
【BZOJ】【3339】Rmq Problem
离线+线段树 OrzHzwer,引用题解:这一题在线似乎比较麻烦至于离线。。首先按照左端点将询问排序然后一般可以这样考虑首先如何得到1-i的sg值呢这个可以一开始扫一遍完成接着考虑l-r和l+1-r的答案有何不同显然是l-next[l]-1这一段所有sg值大于a[l]的变为a[l]这一步如果暴力修....
分类:其他好文   时间:2015-06-24 00:34:31    阅读次数:111
linux 使用FIO测试磁盘iops(转载)
FIO是测试IOPS的非常好的工具,用来对硬件进行压力测试和验证,支持13种不同的I/O引擎,包括:sync,mmap, libaio, posixaio, SG v3, splice, null, network, syslet, guasi, solarisaio 等等。fio 官网地址:htt...
分类:系统相关   时间:2015-06-16 16:33:22    阅读次数:274
取石子的几个找sg函数的问题
取石子的几个找sg函数的问题...
分类:其他好文   时间:2015-06-13 15:44:09    阅读次数:144
hdu 1848 Fibonacci again and again
这是尼姆博弈的变型; 还是博弈,但是这次要用Sg函数最后异或等于0后手赢 反之,先手赢#include #include #include using namespace std; int f[100]={1,2,3,5}; int e[1005]={0,1,2,3}; int b[16]; void Init() { for(...
分类:其他好文   时间:2015-06-11 23:00:24    阅读次数:165
752条   上一页 1 ... 51 52 53 54 55 ... 76 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!