#include <iostream> #include <unordered_map> using namespace std; struct ListNode { int val; ListNode* next; ListNode(int x): val(x), next(nullptr) {} }; int main() { int n; while (cin >> n) { int h; cin >> h; ListNode* head = new ListNode(h); ListNode* cur = head; //构造一个链表 f...