Any idea where my code might be going wrong. I seem to not be able to see it.
My strategy is, use upper_bound for all the given starting and ending points of the contests to find out the shortest possible duration of stay for each contest. Time complexity is O(nlogn).
#include <bits/stdc++.h>#include <algorithm>#include <climits>#include <cmath>#include <deque>#include <iostream>#include <map>#include <set>#include <string>#include <vector>
Read more… (50 words)