10 条题解

  • 1
    @ 2023-6-25 13:15:26
    #include <iostream>
    #include <stdio.h>
    #include <iomanip>
    #include <math.h>
    using namespace std;
    const int N = 1e6 + 10;
    const int INF = 0x3f3f3f3f;
    int main()
    {
    	float x1 , x2 , y1 , y2;
    	cin >> x1 >> y1 >> x2 >> y2;
    	x1 = ( x1 - x2 ) * ( x1 - x2 ) + ( y1 - y2 ) * ( y1 - y2 );
    	x1 = sqrt( x1 );
    	cout << fixed << setprecision(3) << x1;
    }
    
    • 1
      @ 2022-1-1 11:58:28
      /*******************************
      
      *******************************/
      #include <stdio.h>
      #include <iostream>
      #include <math.h>
      using namespace std;
      int main()
      {
      	double x1, x2, y1, y2;
      	cin >> x1 >> y1 >> x2 >> y2;
      	double a, b;
      	a = x1 - x2;
      	b = y1 - y2;
      	double c;
      	c = a * a + b * b;
      	c = sqrt(c);
      	printf("%.3lf\n",c);
      }
      
      • 0
        @ 2023-5-30 20:52:55
        #include<stdio.h>
        #include<iostream>
        #include<math.h>
        using namespace std;
        int main()
        {
            double a,b,c,d;
            cin >> a >> b >> c >> d;
            double a1,a2;
            a1 = fabs(c-a);
            a2 = fabs(d-b);
            double a3 = sqrt(a1*a1+a2*a2);
            printf("%.3lf",a3);
        }
        
        • 0
          @ 2023-1-2 14:43:32
          #include 
          #include <iostream>
          #include <math.h>
          using namespace std;
          int main(){
          	double x1,x2,y1,y2;
          	cin>>x1>>y1>>x2>>y2;
          	double a,b;
          	a=x1-x2;
          	b=y1-y2;
          	double c;
          	c=a*a+b*b;
          	c=sqrt(c);
          	printf("%.3lf\n",c);
          }
          
          • 0
            @ 2022-1-17 22:31:02
            #include <iostream>
            #include <math.h>
            #include <iomanip>
            using namespace std;
            int main(){
                double x1,y1,x2,y2;
                cin>>x1>>y1>>x2>>y2;
                x1=((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2));
                cout<<fixed<<setprecision(3)<<sqrt(x1)<<endl;
                return 0;
            }
            
            • -1
              @ 2022-2-8 17:34:04

              #include <stdio.h> #include <iostream> #include <math.h> using namespace std; int main() { double Xa , Xb , Ya ,Yb; cin >> Xa >> Xb ; cin >> Ya >> Yb; double x1 = Xa - Ya; double x2 = Xb - Yb; double x = (x1 * x1)+ (x2 * x2); printf("%.3lf\n",sqrt(x));

              }

              • -2

                #include <stdio.h> #include <math.h> #include <iostream> using namespace std; int main() { double x1,x2,y1,y2; cin >> x1 >> y1 >> x2 >>y2; double a, b; a = x1 - x2; b = y1 - y2; double c; c = a * a + b * b; c = sqrt(c); printf("%.3lf\n",c); }

                • -2
                  @ 2022-1-1 11:59:08

                  #include <math.h> #include <iostream> using namespace std; int main() { double x1, x2, y1, y2; cin >> x1 >> y1>> x2 >> y2; double a, b; a = x1 - x2; b = y1 - y2; double c; c =a * a + b * b; c =sqrt(c); printf("%.3lf\n",c); }

                  • -2
                    @ 2022-1-1 11:55:26
                    #include <stdio.h>
                    #include <math.h>
                    #include <iostream>
                    using namespace std;
                    int main()
                    {
                    	double x1,x2,y1,y2;
                    	cin >> x1 >> y1 >> x2 >>y2;
                    	double a, b;
                    	a = x1 - x2;
                    	b = y1 - y2;
                    	double c;
                    	c = a * a + b * b;
                    	c = sqrt(c);
                    	printf("%.3lf\n",c);
                    }
                    
                    • -4
                      @ 2022-1-1 11:51:32

                      #include <stdio.h> #include <iostream> #include <math.h> #include <iomanip> using namespace std; int main() { double x1,x2,y1,y2; cin >> x1 >>y1 >> x2 >> y2; double a, b; a = x1 - x2; b = y1 - y2; double c; c = a * a + b * b; c = sqrt(c); printf("%.3lf\n",c); }

                      • 1

                      信息

                      ID
                      823
                      时间
                      1000ms
                      内存
                      128MiB
                      难度
                      5
                      标签
                      递交数
                      443
                      已通过
                      187
                      上传者