随笔分类 - ACM_BIT
摘要:Description Given an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i,
阅读全文
摘要:1081 子段求和 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注 1081 子段求和 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 1081 子段求和 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基
阅读全文
摘要:1019 逆序数 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注 1019 逆序数 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 1019 逆序数 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题
阅读全文
摘要:BIT+离散化 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 using namespace std; 5 int n,a[500010]; 6 int num[500010]; 7 long long ans; 8 s
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1556树状数组的 update的应用,逆序更新代码: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 ...
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1196大水题 lowbit 的应用 (可以取出一个数二进制中的最后一个1。树状数组常用,Lowbit(x)=x&-x。 )代码: 1 #include 2 #include 3 #include...
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1166BIT简单应用,加减,求和操作。 自己没有注意每次数组归零,果断傻逼的交了好多次,WA啊...... Orz代码: 1 #include 2 #include 3 #include 4 #i...
阅读全文

浙公网安备 33010602011771号