#include <iostream>
#include <set>
int main()
{
std::pair<int, int> p1;
std::pair<int, int> p2;
std::pair<int, int> p3;
std::pair<int, int> p4;
p1 = std::make_pair(1, 5);
p2 = std::make_pair(5, 1);
p3 = std::make_pair(1, 5);
p4 = std::make_pair(2, 3);
std::set<std::pair<int, int> > edgeSet;
edgeSet.insert(p1);
edgeSet.insert(p2);
edgeSet.insert(p3);
edgeSet.insert(p4);
// the following prints "# of inserted edges = 3", do you see why?
std::cout << "# of inserted edges = " << edgeSet.size() << std::endl;
return 0;
}
this is the code just reads the edges that's 3... that is when we input the code. But what if its in a file? how do I read from there and show the paired count and the time taken?
Also I have the file that works and reads any txt file..but how do i get the code from it?