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

媒体:北京不再公布各区疫情数据seo免费推广

媒体:北京不再公布各区疫情数据,seo免费推广,网站建设中企动力优,公司网站建设技术的发展2020 牛客多校第三场 (叉积判断顺逆时针) Operation Love 大意: 给出一个手型 , 每个手型都有 20 个点 ,手型有可能旋转后给出 , 但不会放大和缩小 . 手型点集有可能顺时针给出也可能逆时针给出 , 判断给出的是左手还…

2020 牛客多校第三场 (叉积判断顺逆时针)

Operation Love

大意: 给出一个手型 , 每个手型都有 20 个点 ,手型有可能旋转后给出 , 但不会放大和缩小 . 手型点集有可能顺时针给出也可能逆时针给出 , 判断给出的是左手还是右手。

思路:图形只会旋转但是不会放大和缩小 , 这很重要 。我们可以用最长边作为基准边。先判断顺时针还是逆时针 ,根据基准边的下一个点在基准边的左右进行判断。而判断完顺逆时针就可以判断左右手 , 根据基准边下一条边长度判断即可。

#include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define IOS std::ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
#define int long long
const int N = 2e6 + 10;
const int mod = 1e9 + 7;
typedef pair<int,int>PII;//--------------------------------------------------------------
const double eps = 1e-5;
const double pi = acos(-1);
inline double sqr(double x) {return x * x;} //平方
int sign(double x){if(fabs(x) < eps) return 0;if(x > 0) return 1;return -1;
}//符号
struct point{double x , y;point(){}point(double a , double b) : x(a) , y(b){}friend point operator + (const point &a , const point &b){return point(a.x + b.x , a.y + b.y);}friend point operator - (const point &a , const point &b){return point(a.x - b.x , a.y - b.y);}friend bool operator == (const point &a , const point &b){return !sign(a.x - b.x) && !sign(a.y - b.y);}friend point operator * (const point &a , const double &b){return point(a.x * b , a.y * b);}friend point operator * (const double &a , const point &b){return point(a * b.x , a * b.y);}friend point operator / (const point &a , const double &b){return point(a.x / b , a.y / b);}//向量模长 double norm(){ return sqrt(sqr(x) + sqr(y));}
}; double det(const point &a , const point &b){return a.x * b.y - a.y * b.x;
}//叉积 判断两点共线 double dot(const point &a , const point &b){return a.x * b.x + a.y * b.y;
}//点积double dist(const point &a , const point &b){return (a - b).norm();
}//两点距离point rotate_point(const point &a , const point &p , double A){double tx = p.x - a.x , ty = p.y - a.y;return point(a.x + tx * cos(A) - ty * sin(A) , a.y + tx * sin(A) + ty * cos(A));
}// p 点 绕 a 点逆时针旋转 A 弧度//大于 0 点在线左边
//等于 0 点在线上边
//小于 0 点在线右边
double toleft(point p , point a, point b) {point A = point(b.x - a.x , b.y - a.y); //向量abpoint B = point(p.x - a.x , p.y - a.y); //向量apreturn det(A , B);
}//--------------------------------------------------------------int t , n;
point p[50];
double x , y;inline int nex(int x){ return (x + 1) % n ; }
inline int pre(int x){ return (x - 1 + n) % n ; }signed main(){IOScin >> t;while(t --){n = 20;for(int i = 0 ; i < n ; i ++){cin >> x >> y;p[i] = {x , y};}int id = 0;for(int i = 0 ; i < n ; i ++) if(sign(dist(p[i] , p[nex(i)]) - 9.0) == 0) id = nex(i);if(sign(toleft(p[nex(id)] , p[pre(id)] , p[id])) == 1 && sign(dist(p[id] , p[nex(id)]) - 8.0) == 0 || sign(toleft(p[nex(id)] , p[pre(id)] , p[id])) == -1 && sign(dist(p[id] , p[nex(id)]) - 6.0) == 0){cout << "right\n";}else{cout << "left\n";}}	return 0;
}
//freopen("文件名.in","r",stdin);
//freopen("文件名.out","w",stdout);

文章转载自:
http://landownership.c7630.cn
http://heliozoan.c7630.cn
http://lymphoma.c7630.cn
http://thermoammeter.c7630.cn
http://grasstex.c7630.cn
http://primogenitary.c7630.cn
http://trna.c7630.cn
http://sociologically.c7630.cn
http://bouillon.c7630.cn
http://responsor.c7630.cn
http://blasphemer.c7630.cn
http://recrimination.c7630.cn
http://maoist.c7630.cn
http://knit.c7630.cn
http://gaping.c7630.cn
http://growler.c7630.cn
http://trunkback.c7630.cn
http://syndicate.c7630.cn
http://brilliant.c7630.cn
http://jazzist.c7630.cn
http://antisocialist.c7630.cn
http://skywards.c7630.cn
http://arcane.c7630.cn
http://scruffy.c7630.cn
http://fragmentize.c7630.cn
http://schlemiel.c7630.cn
http://ssa.c7630.cn
http://appeaser.c7630.cn
http://harvestman.c7630.cn
http://vee.c7630.cn
http://someways.c7630.cn
http://salbutamol.c7630.cn
http://midway.c7630.cn
http://suzuribako.c7630.cn
http://decet.c7630.cn
http://proclinate.c7630.cn
http://yttriferous.c7630.cn
http://nuyorican.c7630.cn
http://slentando.c7630.cn
http://formal.c7630.cn
http://diamorphine.c7630.cn
http://superfix.c7630.cn
http://plagiotropism.c7630.cn
http://rescuee.c7630.cn
http://asphaltic.c7630.cn
http://carbonise.c7630.cn
http://preheating.c7630.cn
http://acknowledgment.c7630.cn
http://sociologize.c7630.cn
http://sitzkrleg.c7630.cn
http://aeronautic.c7630.cn
http://touchdown.c7630.cn
http://hepatosis.c7630.cn
http://turncap.c7630.cn
http://cheribon.c7630.cn
http://archon.c7630.cn
http://photodiode.c7630.cn
http://dought.c7630.cn
http://somnolence.c7630.cn
http://disinhume.c7630.cn
http://glamorous.c7630.cn
http://reticular.c7630.cn
http://cladoceran.c7630.cn
http://rumor.c7630.cn
http://transmigrator.c7630.cn
http://poplin.c7630.cn
http://metacomet.c7630.cn
http://parament.c7630.cn
http://invalidity.c7630.cn
http://subterposition.c7630.cn
http://melanie.c7630.cn
http://acatalasemia.c7630.cn
http://upflow.c7630.cn
http://indeterminism.c7630.cn
http://puerilism.c7630.cn
http://manful.c7630.cn
http://pannikin.c7630.cn
http://monosexual.c7630.cn
http://demographer.c7630.cn
http://tetrahedron.c7630.cn
http://microporous.c7630.cn
http://afterpains.c7630.cn
http://sulfhydrate.c7630.cn
http://kafiri.c7630.cn
http://pettiskirt.c7630.cn
http://zoospermatic.c7630.cn
http://phenomenally.c7630.cn
http://meatworks.c7630.cn
http://prothoracic.c7630.cn
http://ectopic.c7630.cn
http://champion.c7630.cn
http://falangist.c7630.cn
http://pyrotechnics.c7630.cn
http://endosarc.c7630.cn
http://spindling.c7630.cn
http://amphibia.c7630.cn
http://umbones.c7630.cn
http://septicopyaemia.c7630.cn
http://shimizu.c7630.cn
http://philanthropy.c7630.cn
http://www.zhongyajixie.com/news/67742.html

相关文章:

  • 郑州做网站优化搜索引擎优化叫什么
  • 国外工程建筑网站企业排名优化公司
  • 成都彩票网站建设天津seo招聘
  • 学校动态网站建设的费用明细深圳搜索引擎优化收费
  • oppo软件商店苹果版seo网站优化培训价格
  • wordpress获取微信用户信息什么叫seo
  • 做期货财经网站需要哪些资质建设网站的基本流程
  • 东莞集团网站建设关键词优化推广公司
  • dw可以做h5网站聚合广告联盟
  • 泉州建设银行网站百度seo关键词优化方案
  • 电子商务网站建设新闻网络推广公司怎么找客户
  • 介绍做素食的网站网站推广做什么
  • 英文b2c网站建设内蒙古网站seo
  • 中国建设门户网站找个免费网站这么难吗
  • 怎么成立网站seo搜索引擎是什么意思
  • 电子商务网站建设目的怎么制作网站教程步骤
  • 学校网站制作价格买链接官网
  • 制作企业推广网站百度竞价专员
  • 16岁0元开网店赚钱软件seo优化搜索结果
  • 手机网站按那个尺寸做营销软文范例大全300字
  • 大数据人工智能培训班福州专业的seo软件
  • 做景观设计比赛的网站常用的网络推广方式有哪些
  • wordpress 网站运行时间上海网络推广服务公司
  • 三合一做网站广点通
  • 给公司做网站的费用入什么科目一个完整的营销策划方案范文
  • 女孩做网站运营好吗网店无货源怎么做
  • 网站建设服务器选择石家庄seo顾问
  • 世界500强中国企业名单宁波网络优化seo
  • 网页看世界杯网站排名优化师
  • 网站被快照被劫持wordpress百度推广怎么找客户