vector123456789vector<int> a(n);// pairvector<pair<int, int>> b;b.push_back({1, 2});// 遍历for(const auto& [a, b] : b){ cout << a << " " << b << endl;} 哈希表12345678map<int, int> mp = { {0, 1}, {4, 1}, {6, 1}, {9, 1}, {8, 2}};mp.find(digit) != mp.end()map<int, PII> mpfor(auto &it : mp){ cout << it.firtst << " " << it.second.first << " " << it.second.second << endl;} readline1234567891011121314std::vector<T> input(){ std::vector<T> a; T s; while (std::cin >> s) { a.push_back(s); if (std::cin.get() != ' ') break; } return a;}//用法vector<int> a = input<int>(); 12345678910111213141516template <typename T>vector<T> input(){ vector<T> list; string input; getline(cin, input); istringstream stream(input); int number; while (stream >> number) { list.push_back(number); } return list;}// 用法vector<int> a = input<int>();