#include <iostream> #include <map> using namespace std; class ListNode { public: int val; int key; ListNode* pre; ListNode* next; ListNode(int ky, int va) :key(ky), val(va), pre(nullptr), next(nullptr) {} ListNode() :pre(nullptr), next(nullptr), key(-1), val(-1){...