#include<iostream> #include<string> #include <vector> using namespace std; int main() { int n; int k; while (cin>>n>>k) { if(n>1000 || n<1 || k<1 || k>n) { cout<<"输入错误,请重新输入"<<endl; ...