摘要: lowbit(n) 定义:非负整数,在二进制表示下最低位的1以及其后边所有的0。 lowbit(n)=n&(-n+1)=n&(-n) 阅读全文
posted @ 2019-09-21 03:43 Unknown_Island 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-09-20 17:21 Unknown_Island 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 求a乘b对p取模的值,其中 1<=a,b,p<=pow(10,18) 阅读全文
posted @ 2019-09-20 15:14 Unknown_Island 阅读(135) 评论(0) 推荐(0) 编辑
摘要: People are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others like using Win 阅读全文
posted @ 2019-09-20 14:42 Unknown_Island 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-09-06 01:52 Unknown_Island 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 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 <= 阅读全文
posted @ 2019-09-05 22:20 Unknown_Island 阅读(109) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-09-02 22:04 Unknown_Island 阅读(2) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-09-02 20:05 Unknown_Island 阅读(1) 评论(0) 推荐(0) 编辑
摘要: dfs实现: STL permutation实现: 阅读全文
posted @ 2019-09-02 19:46 Unknown_Island 阅读(84) 评论(0) 推荐(0) 编辑
摘要: import java.math.BigInteger; import java.util.Scanner; public class Main{ public static void main(String [] args){ Scanner cin = new Scanner(System.in); BigInteger a,b; while(cin.hasNext()){ a=cin.nex 阅读全文
posted @ 2019-09-02 15:06 Unknown_Island 阅读(89) 评论(0) 推荐(0) 编辑