题目链接:https://vjudge.net/problem/POJ-2104 K-th Number Time Limit: 20000MS Memory Limit: 65536K Total Submissions: 64110 Accepted: 22556 Case Time Limit: 2000MS Description You are working for Macrohard company in data structures department. After…
蒟蒻终于学会整体二分啦! 思路 实现 丑陋无比的代码 #include <bits/stdc++.h> using namespace std; const int N = 200005; int ar[N]; int lowbit(int t) { return t & (-t); } void add(int i, int v) { for (; i < N; ar[i] += v, i += lowbit(i)); } int sum(int i) { int s = 0;…