随笔分类 - 树状数组
摘要:问题:在数组中的两个数字,如果前面一个数字大于后面的数字,则这两个数字组成一个逆序对。输入一个数组,求出这个数组中的逆序对的总数。 class Solution { int lowBit(int x) { return x & (-x); } int sum(int[] c, int x) { in
阅读全文
摘要:Stars Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 58255 Accepted: 24860 Description Astronomers often examine star maps where stars are
阅读全文