摘要:
Knight MovesTimeLimit: 1000MS Memory Limit: 65536KTotal Submissions: 10262 Accepted: 5786DescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessbo. 阅读全文
摘要:
//0MS 240K 1273 B C++ //简单数学题,计算圆形和矩形是否有交点//我是利用圆形 圆心式 判断 #include#includeint main(void){ int t; double x,y,r,x1,y1,x2,y2; scanf("%d",&t); while(t--) { scanf("%lf%lf%lf%lf%lf%lf%lf",&x,&y,&r,&x1,&y1,&x2,&y2); if(x1>x2){ double t1=x1;x1=x2;x2=t1; 阅读全文