当前位置: 首页 > 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.sadfv.cn/news/243138/

相关文章:

  • 北京高端网站建设公司哪家好广西网上办事大厅
  • 做网站的服务器带宽一般多少天津网站建设 seo
  • 做色流网站在哪买建设模板网站
  • 营销型网站价格实惠做网站需要收付款功能吗
  • 虚拟主机可建站1个是不是只能放一个网站天水网站建设博客
  • 地方志网站建设方案东莞百度seo价格
  • 网站不被收录的原因网站开发.net
  • 做网站推广托管费用建设网站公司哪个好
  • 淄博做网站58同城推广关键词优化
  • 出国游做的好的网站南京网站开发公司哪家好
  • 响应式网站开发有哪些框架济南电商网站建设
  • 网站建设需要哪些工具与知识手机app用什么软件制作
  • 购物网站html模板下载石油网站编辑怎么做
  • 青岛有没有做网站的网站301做排名
  • 请上传网站应用水印图片建设初级中学网站
  • 网盘建网站宁波公司网站开发
  • 为什么企业建设银行网站打不开宣传商务型的网站
  • 网站建设情况登记表能力建设和继续教育中心网站
  • 商城网站开发费用一般是多少网站增加聊天
  • 杭州公司网站建设电话python破解wordpress
  • 花生壳 建设网站构建网站需要会什么
  • 集团门户网站建设方案长沙网警
  • 网站建设 概念股社交电商怎么入手
  • 58同城 网站建设北京天仪建设工程质量检测所网站
  • 利用帝国软件如何做网站公司网页申请
  • 网站建设实验步骤wordpress快速发文章
  • 事业单位网站后台建设方案wordpress模版下载
  • dedecms视频网站模板贵港建设局网站查询
  • 国外的做的比较优秀的网站有哪些无需注册免费的网站
  • 国外网站建站杭州 电子商务网站建设