#include <iostream>
using namespace std;
typedef pair<int, int> PII;
int main()
{
// 法一:初始化构造函数
PII t1(1, 1);
// 法二:std::make_pair函数
PII t2 = make_pair(2, 2);
// 法三:聚合初始化(要求C++11及以上)
PII t3 = {3, 3};
// 法四:直接使用列表初始化语法
PII t4({4, 4});
cout << t1.first << ' ' << t1.second << endl;
cout << t2.first << ' ' << t2.second << endl;
cout << t3.first << ' ' << t3.second << endl;
cout << t4.first << ' ' << t4.second << endl;
return 0;
}