废话不多说,我们先看一下位置排序的算法: #include <iostream> using namespace std; int n = 0; int m = 2; int l = 0; int a[100]; void solve(int l); int main() { cout<<"请输入位数 n "<<endl; cin>>n; solve(l); return 0; } void solve(int l) { if(l>…
伪代码: 全部代码: a=[] b=[] def f(x,y,z): b.append([x,y,z]) if x==15 and y==15: print(x,y,z) i=0; for x in b: print(i,x,end="\n") i+=1 exit() if [x,y,z] not in a: a.append([x,y,z]) else: b.pop() return y1,y2,y3=30-x,17-y,13-z xt,yt,zt = 0,0,0 # way1: i…