随笔分类 -  ACM知识学习

摘要:#include <iostream> #include <cstdio> #include <queue> #include <vector> #include <cstring> using namespace std; const int INF=0x3f3f3f3f; const int inf=2147483647; const int maxn=100010; struct edge 阅读全文
posted @ 2019-08-22 19:40 zdy_1214 阅读(161) 评论(0) 推荐(0)
摘要:1.高精度加法 算法复杂度O(n) #include<iostream> #include<cstring> #include <string> #include<algorithm> using namespace std; const int L=110; string add(string a 阅读全文
posted @ 2019-08-12 17:31 zdy_1214 阅读(635) 评论(0) 推荐(0)
摘要:1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 #include<string> 6 #include<vector> 7 #include<stack> 8 #include<bitset> 9 #include<cstdlib> 10 #include<cmath> 11 # 阅读全文
posted @ 2019-08-11 15:20 zdy_1214 阅读(728) 评论(0) 推荐(0)
摘要:hdoj2049 http://acm.hdu.edu.cn/showproblem.php?pid=2049 Problem Description: 国庆期间,省城HZ刚刚举行了一场盛大的集体婚礼,为了使婚礼进行的丰富一些,司仪临时想出了有一个有意思的节目,叫做"考新郎",具体的操作是这样的:首 阅读全文
posted @ 2019-07-24 00:11 zdy_1214 阅读(602) 评论(0) 推荐(0)
摘要:1.先行知识 首先介绍lowbit(x)函数 lowbit(x)函数:lowbit(i)的意思是将i转化成二进制数之后,只保留最低位的1及其后面的0,截断前面的内容,然后再转成10进制数比如lowbit(7),7的二进制位是111,lowbit(7) = 1,6 = 110(2),lowbit(6) 阅读全文
posted @ 2019-07-08 00:06 zdy_1214 阅读(317) 评论(0) 推荐(0)