LoginSignup
1
0

More than 1 year has passed since last update.

pair

Posted at

<大小比較(優先順位)>
1つ目の要素 -> 2つ目の要素

pair<int, string> a[5];

cin >> a[0].second;
cin >> a[0].first;

sort(a, a + N, greater<pair<int, string>>());
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0