Created
May 21, 2019 22:28
-
-
Save Thiago4532/82717ce92f9acf635103fd7892bf0eae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> // Necessita da iostream para funcionar | |
using namespace std; | |
int main() { | |
vector< pair<int, int> > v = { {10, 1}, {1, 3}, {1, 2}, {2, 4}, {3, 5} }; // Declarando um vector de pair | |
// v = { (10, 1), (1, 3), (1, 2), (2, 4), (3, 5) } | |
sort(v.begin(), v.end()); | |
// v = { (1, 2), (1, 3), (2, 4), (3, 5), (10, 1) } | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment