摘要:
刚开始看到这题的时候,理解错了数据范围,以为K<100,那就是道高精度水题了,于是用java打了交,runtime error!然后就想出了这么个模拟的方法,直接用一个数组存下fibonacci表示的数,两个数合并在一起以后,就是处理这个数组的问题了,其实也不难,也就是如果存在两个相邻的,如a,a+1,就把它们合并成a+2,还有就是如果有两个a,则分成a-2和a+1。/* * hdu3818cpp/win.cpp * Created on: 2012-10-28 * Author : ben */#include <cstdio>#include <cstdlib> 阅读全文
摘要:
挺简单,直接上代码。/* * hdu2062/win.cpp * Created on: 2012-10-27 * Author : ben */#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <ctime>#include <iostream>#include <algorithm>#include <queue>#include <set>#include <map> 阅读全文