tahamajs's picture
download
raw
751 Bytes
#include <iostream>
#include <vector>
#include <fstream>
#include <sstream>
using namespace std;
bool cmp(pair<int,int> p1 , pair <int,int> p2){
if (p1.first == p2.first)
{
return p1.second < p2.second ;
}
return p1.first < p2.first;
}
int main(int argc, char* argv[]){
vector<pair<int,int>> pvec;
pvec.push_back(make_pair(2,2));
pvec.push_back(make_pair(3,2));
pvec.push_back(make_pair(2,2));
pvec.push_back(make_pair(2,4));
pvec.push_back(make_pair(2,9));
pvec.push_back(make_pair(2,2));
pvec.push_back(make_pair(1,2));
pvec.push_back(make_pair(2,2));
sort(pvec.begin() ,pvec.end(),cmp);
for(auto x : pvec){
cout << x.first << " " << x.second << endl;
}
}

Xet Storage Details

Size:
751 Bytes
·
Xet hash:
a9650c2a502b5bbd42559e6048eea2291b60b8e35d6947d9898fd6ab1fd2e510

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.