#include #include #include #include #include #include #include #include using namespace std; using namespace std::chrono; int main(void) { auto start = high_resolution_clock::now(); int i = 0; int f; ifstream newfile; newfile.open("testInput.txt"); auto stop = high_resolution_clock::now(); auto duration = duration_cast(stop - start); cout << duration.count() << endl; if (newfile.is_open()) { list l1; map > myOrder; string *p; string line; start = high_resolution_clock::now(); while (getline(newfile, line)) { f = line.find("|"); p = new string[2]; /*cout << line << endl;*/ p[0] = (line.substr(0, f)); p[1] = (line.substr(f + 1, string::npos)); if (myOrder.find(p[0]) == myOrder.end()) { //not found myOrder[p[0]][p[1]] = 1; } else { if (myOrder[p[0]].find(p[1]) == myOrder[p[0]].end()) myOrder[p[0]][p[1]] = myOrder[p[0]].size() + 1; } l1.push_back(p); } stop = high_resolution_clock::now(); duration = duration_cast(stop - start); cout << duration.count() << endl; newfile.close(); while (!l1.empty()) { p = l1.front(); /* std::cout <