码迷,mamicode.com
首页 >  
搜索关键字:ll    ( 5333个结果
hdu 3037 Saving Beans (lucas定理)
考虑加多一颗树,这样的话当加的树放了k(0#include #include #include #include using namespace std;typedef long long ll;ll n,m,p;ll POW(ll x,ll n,ll p){ ll res=1; whi...
分类:其他好文   时间:2014-09-23 17:04:34    阅读次数:264
iOS:让标题栏背景图片适应iOS7
From google: If your app uses a custom image as the background of the bar, you'll need to provide a “taller” image so that it extends up behind the st...
分类:移动开发   时间:2014-09-23 13:38:34    阅读次数:147
hdu 5037 Frog(贪心)
分析:贪心吧,让每次跳的点尽量小。 石头是可能无序的,比赛是实在没发现,就加了个排序过了,哎。。。 代码: #include #include #include #include #include #include #include #include #define MOD 1000000007 typedef long long ll; using namespace std; cons...
分类:其他好文   时间:2014-09-22 09:55:32    阅读次数:199
进行尽量少的乘法计算求出Sum = 1 + x + x^2 + x^3 + ..... + x^n
有点 逆向思维的味道... 感觉需要灵光一现..所以 我这边不提示了 -.-代码在下面#include using namespace std;typedef long long LL;int main(){ LL sum , n , x; while( cin >> n >> x ) ...
分类:其他好文   时间:2014-09-21 13:40:10    阅读次数:244
求原根模版
#include #include using namespace std; typedef long long LL; int p[100000], c; LL pow_mod(LL a, LL x, LL m) { LL ans = 1; while(x) { if(x&1) ans = ans * a % m; a = a * a % m; x >>= 1; ...
分类:其他好文   时间:2014-09-20 23:58:19    阅读次数:262
URAL 1268. Little Chu 求最大原根
题目来源:URAL 1268. Little Chu 题意:输入n 求一个最大的k 使得k^1 k^2 k^3...k^x mod n 后各不相同 思路:mod n 后各不相同 最多有 n个 那么此事k就是原根 因为k #include #include using namespace std; typedef long long LL; int p[100000], c; LL ...
分类:其他好文   时间:2014-09-20 22:35:19    阅读次数:210
C语法归约之变量声明和定义(0)
采用LR(1)技术,写了一个C语言的语法归约器!之所以用LR(1)是因为gcc,tcc,ucc和lcc跟商量好似的,清一色的用的LL归约技术,书上也是讲的跟天花一样漂亮,如果再使用LL技术实在是炸不出价值来,源码一抓一大把,看看就够了,重写必要性不大!另外,书中的LR技术讲的项集又是大的没谱,工具YACC自动生成又不知道它玩的猫腻!最终用LR(1)自搞了一套方法high起来,效果还不错^!^...
分类:其他好文   时间:2014-09-20 14:07:27    阅读次数:220
Linux crond实例
linux系统的定时任务:1:linux系统自身定期执行的任务工作:系统周期性执行的任务工作,如轮询系统日志,备份系统数据,清理系统缓存等。[root@10-4-5-9 ~]# ll /var/log/messages*-rw-------. 1 root root 958906 Sep 20 08...
分类:系统相关   时间:2014-09-20 11:03:37    阅读次数:263
hdu3844 Mining Your Own Business,无向图的双连通分量
点击打开链接 无向图的双连通分量 #include #include #include #include #include #include #pragma comment(linker, "/STACK:102400000,102400000") using namespace std; typedef long long LL; const int maxn = 50010;...
分类:其他好文   时间:2014-09-19 12:00:15    阅读次数:195
HDU 2255 - 奔小康赚大钱
Kuhn - Munkres 算法,第一次拍各种问题,不过还是A掉了。。/*ID:esxgx1LANG:C++PROG:hdu2255*/#include #include #include #include using namespace std;typedef long long LL;#def...
分类:其他好文   时间:2014-09-18 23:40:04    阅读次数:230
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!