cfCodeforces Round #432 (Div. 2,

网友投稿 516 2022-09-01

cfCodeforces Round #432 (Div. 2,

cfCodeforces Round #432 (Div. 2,

第一题:找规律就好了,前k个和后n到n+k是不一样的,中间都是k。

#include #include #include #include using namespace std;int main(){ int n,k,t; scanf("%d%d%d",&n,&k,&t); if(t<=k) cout<k&&t

第二题:三个点,我开始的思路是两个点距离相等,并且两个向量垂直。

然而只要三点不共线,就存在解。

程序是只要两个点的中点不与b相等。

#include#include#include #include #include using namespace std;typedef long long LL;LL f2(int x,int y,int a,int b){return (b-y)*(LL)(b-y)+(a-x)*(LL)(a-x);}int main(){ int x1,y1,x2,y2,x3,y3; scanf("%d%d%d%d%d%d",&x1,&y1,&x2,&y2,&x3,&y3); if((x1+x3)==2*x2&&(y1+y3)==2*y2) return 0*printf("No"); if(f2(x1,y1,x2,y2)==f2(x2,y2,x3,y3)) return 0*printf("Yes"); return 0*printf("No");}

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:leetcode136. Single Number
下一篇:PHP那些琐碎的知识点(整理)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~