2 条题解

  • 0
    @ 2026-8-28 14:51:53

    这题太简单了,只讲思路。

    1. 二分答案,找到与原点距离为 11 的点.
    2. 直线OP的表达式为: y=PQOQ xy= \frac{PQ}{OQ} \ x ,设 x=OQx=OQ' 可列方程: x2+(PQOQ x)2=12x^2+(\frac{PQ}{OQ} \ x)^2=1^2 ,整理得 x=11+(PQOQ)2x=\sqrt{\frac{1}{1+(\frac{PQ}{OQ})^2}} ,代入运算即可
    3. 使用相似,OPQOPQ\triangle OPQ \backsim \triangle OP'Q'
    4. 使用三角函数,( cosPOQ\cos \angle POQ , sinPOQ\sin \angle POQ ) 即为答案
    • 0
      @ 2026-8-28 14:32:47

      题解思路

      利用相似三角形即可

      #include<bits/stdc++.h>
      using namespace std;
      int a,b;
      double DIS(int a,int b){
      	return sqrt(a*a+b*b);
      }
      signed main(){
      	ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
      	cin>>a>>b;
      	double dis=DIS(a,b);
      	double _=1/dis;
      	printf("%.12lf %.12lf\n",1.0*a*_,1.0*b*_);
      	
      	return 0;
      }
      
      • 1

      信息

      ID
      12438
      时间
      2000ms
      内存
      1024MiB
      难度
      6
      标签
      递交数
      24
      已通过
      12
      上传者