Competitive coding
#include <iostream> #include <map> #include <vector> #include <filesystem> #include <fstream> #include <string> using namespace std; namespace fs = std::filesystem; std::string readFile(fs::path path) { // Open the stream to 'lock' the file. std::ifstream f(path, std::ios::in | std::ios::binary); // Obtain the size of the file. const auto sz = fs::file_size(path); // Create a buffer. std::string result(sz, '\0'); // Read the whole file into the buffer. f.read(result.data(), sz); return result; } int main() { string line_str; fs::path p = "extents.txt"; string result = readFile(p); stringstream X(result); std::multimap<long long,long long> m; int i=0; while(getline(X,line_s...