摘要:
lowbit(n) 定义:非负整数,在二进制表示下最低位的1以及其后边所有的0。 lowbit(n)=n&(-n+1)=n&(-n) 阅读全文
摘要:
int head[maxn],nxt[maxn],val[maxn],edge[maxn],cnt; int n,m; int dis[maxn][maxn]; inline void add(int a,int b,int v){ edge[cnt]=b, val[cnt]=v, nxt[cnt]=head[a], head[a]=cnt++; } inline void print(){ fo 阅读全文
摘要:
求a乘b对p取模的值,其中 1<=a,b,p<=pow(10,18) 阅读全文
摘要:
People are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others like using Win 阅读全文
摘要:
time limit per test 1 second time limit per test memory limit per test 256 megabytes memory limit per test input standard input input output standard 阅读全文
摘要:
FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= 阅读全文