,pair#include <iostream>
#include <vector>
using namespace std;
int main() {
pair<int,int> p;
///pair<자료형,자료형> 원소가 2개인 구조체
///첫번째 자료는 first, 두번째는 second
p.first=10;
p.second=20;
printf("%d %d\n", p.first, p.second);
p={30,40};
printf("%d %d\n", p.first, p.second);
pair<pair<int,int>,pair<int,int>> p2;
p2.first.first=10;
// 중첩된 pair 출력
printf("%d\n", p2.first.first);
}
pair를 쓰면 1순위: first, 2순위: second라는 정렬 규칙이 자동으로 설정된다!