基本的なアルゴリズム:離散化

離散化 #include <bits/stdc++.h> using namespace std; const int MAX_N = 1000010; int n, m; vector<int> originalValues; vector<int> addedValues; vector<int> startPos, endPos; vector<long long> diffArray; bool canProcess(int limit) { fill(diffArray.begin(), diffArray.end(), 0); for (int i = 0; i < li ...

8月29日 17:04 投稿