考虑加多一颗树,这样的话当加的树放了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
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
分析:贪心吧,让每次跳的点尽量小。
石头是可能无序的,比赛是实在没发现,就加了个排序过了,哎。。。
代码:
#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
有点 逆向思维的味道... 感觉需要灵光一现..所以 我这边不提示了 -.-代码在下面#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
题意:输入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
采用LR(1)技术,写了一个C语言的语法归约器!之所以用LR(1)是因为gcc,tcc,ucc和lcc跟商量好似的,清一色的用的LL归约技术,书上也是讲的跟天花一样漂亮,如果再使用LL技术实在是炸不出价值来,源码一抓一大把,看看就够了,重写必要性不大!另外,书中的LR技术讲的项集又是大的没谱,工具YACC自动生成又不知道它玩的猫腻!最终用LR(1)自搞了一套方法high起来,效果还不错^!^...
分类:
其他好文 时间:
2014-09-20 14:07:27
阅读次数:
220
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
点击打开链接
无向图的双连通分量
#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
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