随笔分类 -  树状数组

摘要:问题:在数组中的两个数字,如果前面一个数字大于后面的数字,则这两个数字组成一个逆序对。输入一个数组,求出这个数组中的逆序对的总数。 class Solution { int lowBit(int x) { return x & (-x); } int sum(int[] c, int x) { in 阅读全文
posted @ 2021-04-22 16:09 Cruel_King 阅读(59) 评论(0) 推荐(0) 编辑
摘要:Stars Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 58255 Accepted: 24860 Description Astronomers often examine star maps where stars are 阅读全文
posted @ 2019-07-24 10:31 Cruel_King 阅读(134) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示