#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main()
{
int ansx=0,ansy=0,ansz=0;
int tx1,tx2,tx3,tx4,ty1,ty2,ty3,ty4,tz1,tz2,tz3,tz4,tdis1,tdis2,tdis3,tdis4;
cin>>tx1>>ty1>>tz1;
cin>>tx2>>ty2>>tz2;
cin>>tx3>>ty3>>tz3;
cin>>tx4>>ty4>>tz4;
double ans=114514;
for(int x=50;x<=100;x++)
for(int y=50;y<=100;y++)
for(int z=50;z<=100;z++)
{
double dis1=round(sqrt((x-tx1)*(x-tx1)+(y-ty1)*(y-ty1)+(z-tz1)*(z-tz1)));
double dis2=round(sqrt((x-tx2)*(x-tx2)+(y-ty2)*(y-ty2)+(z-tz2)*(z-tz2)));
double dis3=round(sqrt((x-tx3)*(x-tx3)+(y-ty3)*(y-ty3)+(z-tz3)*(z-tz3)));
double dis4=round(sqrt((x-tx4)*(x-tx4)+(y-ty4)*(y-ty4)+(z-tz4)*(z-tz4)));
double wucha1,wucha2,wucha3,wucha4;
if(dis1==27&&dis2==9&&dis3==10&&dis4==8)
{
cout<<sqrt((x-tx1)*(x-tx1)+(y-ty1)*(y-ty1)+(z-tz1)*(z-tz1))<<" ";
cout<<sqrt((x-tx2)*(x-tx2)+(y-ty2)*(y-ty2)+(z-tz2)*(z-tz2))<<" ";
cout<<sqrt((x-tx3)*(x-tx3)+(y-ty3)*(y-ty3)+(z-tz3)*(z-tz3))<<" ";
cout<<sqrt((x-tx4)*(x-tx4)+(y-ty4)*(y-ty4)+(z-tz4)*(z-tz4))<<" ";
ansx=x,ansy=y,ansz=z,cout<<ansx<<" "<<ansy<<" "<<ansz<<" "<<endl;
wucha1=(27-sqrt((x-tx1)*(x-tx1)+(y-ty1)*(y-ty1)+(z-tz1)*(z-tz1)));
wucha2=(9-sqrt((x-tx2)*(x-tx2)+(y-ty2)*(y-ty2)+(z-tz2)*(z-tz2)));
wucha3=(10-sqrt((x-tx3)*(x-tx3)+(y-ty3)*(y-ty3)+(z-tz3)*(z-tz3)));
wucha4=(8-sqrt((x-tx4)*(x-tx4)+(y-ty4)*(y-ty4)+(z-tz4)*(z-tz4)));
/*if((wucha1+wucha2+wucha3+wucha4)>=0)*/ cout<<wucha1+wucha2+wucha3+wucha4<<endl;
}
}
// cout<<ansx<<" "<<ansy<<" "<<ansz<<" ";
return 0;
}有一些地方需要自行修改
各位神犇们一定看得懂的(确信