当前位置: 首页 > news >正文

三端互通传奇手游找服网站聊城质量最好网站建设

三端互通传奇手游找服网站,聊城质量最好网站建设,辽宁省造价信息网,本地wordpress安装教程题目链接#xff1a;点击打开链接 题意#xff1a; 给定T表示case数 以下4行是一个case 每行2个点#xff0c;u v 每次u能够绕着v逆时针转90 问最少操作多少次使得4个u构成一个正方形。 思路#xff1a; 枚举判可行 #include iostream #include cmath #inc… 题目链接点击打开链接 题意 给定T表示case数 以下4行是一个case 每行2个点u v 每次u能够绕着v逆时针转90° 问最少操作多少次使得4个u构成一个正方形。 思路 枚举判可行 #include iostream #include cmath #include algorithm #include cstdio using namespace std; int hah,ijj; int haifei; template class T inline bool rd(T ret) {char c; int sgn;if(cgetchar(),cEOF) return 0;while(c!-(c0||c9)) cgetchar();sgn(c-)?-1:1; ret(c-)?0:(c-0); while(cgetchar(),c0c9) retret*10(c-0); ret*sgn; return 1; } template class T inline void pt(T x) { if (x 0) { putchar(-); x -x; } if(x9) pt(x/10); putchar(x%100); } /// const double eps 1e-8; const double pi acos(-1.0); struct node { double x, y; }; bool dcmp(double i, double j) { return fabs(i - j) eps; } bool eq(const node i, const node j) { return dcmp(i.x, j.x) dcmp(i.y, j.y); } /* x0 (x - rx0)*cos(a) - (y - ry0)*sin(a) rx0 ; y0 (x - rx0)*sin(a) (y - ry0)*cos(a) ry0 ; */ node turn(const node i, const node j, double a) { node re; re.x (i.x - j.x)*cos(a) - (i.y - j.y)*sin(a) j.x; re.y (i.x - j.x)*sin(a) (i.y - j.y)*cos(a) j.y; return re; } bool cc(const node i, const node j) { if (!dcmp(i.x, j.x)) return i.x j.x; else return i.y j.y; } double sqr(double x) { return x * x; } double D(node i, node j) { return sqr(i.x-j.x) sqr(i.y-j.y); } double dis[20]; int idx; bool ok(node i, node j, node k, node z) { node ar[4]; ar[0]i; ar[1]j; ar[2]k; ar[3]z; idx 0; for (int i 0; i 4; i) for (int j i 1; j 4; j) dis[idx]D(ar[i],ar[j]); sort(dis, dis idx); if (dcmp(dis[0], dis[3]) !dcmp(dis[0], 0) dcmp(dis[4], dis[5]) dcmp(dis[0] * 2, dis[4])) { return true; } else return false; } int main() { node a[10], b[10]; int T; rd(T); while (T -- 0) { for (int i 0; i 4; i) scanf(%lf%lf%lf%lf, a[i].x, a[i].y, b[i].x, b[i].y); int ans 100; for (int i 0; i 4; i) for (int j 0; j 4; j) for (int k 0; k 4; k) for (int l 0; l 4; l) if (ok(turn(a[0], b[0], i*pi/2),turn(a[1], b[1], j*pi/2), turn(a[2], b[2], k*pi/2),turn(a[3], b[3], l*pi/2))) { ans min(ijkl, ans); } if (ans 100) ans -1; pt(ans); putchar(\n); } return 0; }
http://www.pierceye.com/news/812656/

相关文章:

  • 网站图片优化免费网站建设凡科
  • 网站开发项目团队网页设计图片与文字的研究
  • 百度网站建设策划书范文做暧在线网站
  • 松江新城做网站公司国产成年做视频网站
  • 杭州网站推广服务网站单页面怎么做
  • 房地产网站建设案例wordpress 判断移动端
  • 网站开发过程文档网站代码需要注意什么问题
  • 怎么选一个适合自己的网站wordpress怎么修改后台登录地址
  • 网页制作与网站建设自考西安千秋网络科技有限公司
  • 建设网站的费用入什么科目永久免费google搜索引擎
  • 拍卖网站怎么做梧州网页设计师招聘
  • 炫酷网站源码下载网站建设副业
  • 做dw和ps的网站教学做网站属于什么费用
  • 秦皇岛网站制作小程序开发wordpress调用分类标签
  • 网站绑定别名好吗台州品牌网站设计
  • 安徽省住房和城乡建设厅网站域名东莞松山湖华为小镇
  • 购物网站开发教程中文版做一个自己的免费网站吗
  • 网站建设网络推广平台湖北省级建设主管部门网站
  • 手机网站建设口碑好google海外版
  • 网站加视频播放设计怎么做的oa系统管理平台
  • 湛江有网站的公司名称秘密入口3秒自动进入
  • 网站建设需要租用什么北京网站设计制作过程
  • 设计高端网站建设电子商务平台的建设步骤
  • 对外网站ipv6建设方案模板网站提交地址
  • 网站优化包括哪些内容哪一个网站做专栏作家好点
  • 网站外包 博客网络广告的优势有哪些
  • 福建网站建设网wordpress批量替换标签
  • 网站建设 海外房产商标注册证查询
  • 门户网站建设要求易申建设网站
  • 现在创业什么行业最好seo全网营销公司