#include <bits/stdc++.h> using namespace std; struct ListNode{ int m_nKey; ListNode* m_pNext; ListNode():m_nKey(0),m_pNext(NULL){} ListNode(int x):m_nKey(x),m_pNext(NULL){} }; int main(){ int n,k,val,i; while(cin>>n){ ListNode* head=new ListNode();//带有头结点...