fork download
  1. #include <iostream>
  2. #include <map>
  3. #include <sstream>
  4. #include <utility>
  5.  
  6. using namespace std;
  7.  
  8. int main() {
  9. istringstream file("155\n168\n0\n364\n245\n20\n546\n156\n13");
  10. map<int, pair<int, int>> frame2PointTable;
  11. pair<int, pair<int, int>> temp;
  12.  
  13. while(file >> temp.second.first >> temp.second.second >> temp.first) frame2PointTable.insert(temp);
  14.  
  15. for(const auto& i : frame2PointTable) cout << i.first << ": (" << i.second.first << ", " << i.second.second << ")\n";
  16. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
0: (155, 168)
13: (546, 156)
20: (364, 245)