14 条题解

  • 10
    @ 2023-10-14 16:00:22

    注意区别单精度与双精度,题目的测试用例范围会很广

    #include<iostream>
    #include<cmath>
    #include <stdexcept>
    using namespace std;
    int main(){
        double s,p,a,b,c,d;
        cin>>a>>b>>c;
        p = 0.5*(a+b+c);
        s = p*(p-a)*(p-b)*(p-c);
        d = sqrt(s);
        printf("%.1f",d);
        return 0;
    }
    
    • 4
      @ 2024-2-22 9:19:08
      #include<iostream>
      #include<cmath>
      #include <stdexcept>
      using namespace std;
      int main(){
          double s,p,a,b,c,d;
          cin>>a>>b>>c;
          p = 0.5*(a+b+c);
          s = p*(p-a)*(p-b)*(p-c);
          d = sqrt(s);
          printf("%.1f",d);
          return 0;
      }
      
      • 1
        @ 2024-2-22 9:23:13
        #include<iostream>
        #include<cmath>
        #include <stdexcept>
        using namespace std;
        int main(){
            double s,p,a,b,c,d;
            cin>>a>>b>>c;
            p = 0.5*(a+b+c);
            s = p*(p-a)*(p-b)*(p-c);
            d = sqrt(s);
            printf("%.1f",d);
            return 0;
        }
        
        • -2
          @ 2025-2-13 10:59:57

          klxz'v jSSSSSSSjzb ohgoxcvoDSVvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

          • -2
            @ 2024-7-16 10:41:02

            #include<bits/stdc++.h> using namespace std; int main(){ double a; cin>>a; if(a<=150)printf("%.1lf",0.4463a); if(a<=400 and a>150)printf("%.1lf",0.4663(a-150)+0.4463150); if(a>400)printf("%.1lf",0.5663(a-400)+0.4463150+0.4663250); return 0; }

            • -2
              @ 2024-2-22 10:02:44
              #include<iostream>
              #include<cmath>
              #include <stdexcept>
              using namespace std;
              int main(){
                  double s,p,a,b,c,d;
                  cin>>a>>b>>c;
                  p = 0.5*(a+b+c);
                  s = p*(p-a)*(p-b)*(p-c);
                  d = sqrt(s);
                  printf("%.1f",d);
                  return 0;
              }
              
              • -3
                @ 2025-2-19 10:23:19

                #include<bits/stdc++.h> using namespace std; int main(){ double a,b,c,p,q; cin>>a>>b>>c; p=(a+b+c)/2; q=sqrt(p*(p-a)(p-b)(p-c)); printf("%.1f",q); return 0;

                }

                • -3
                  @ 2024-2-22 11:19:51

                  #include #include #include using namespace std; int main(){ double s,p,a,b,c,d; cin>>a>>b>>c; p = 0.5*(a+b+c); s = p*(p-a)(p-b)(p-c); d = sqrt(s); printf("%.1f",d); return 0; } 👀️ 👀️

                  • -3
                    @ 2024-2-22 10:28:23
                    #include<iostream>
                    #include<cmath>
                    #include <stdexcept>
                    using namespace std;
                    int main(){
                        double s,p,a,b,c,d;
                        cin>>a>>b>>c;
                        p = 0.5*(a+b+c);
                        s = p*(p-a)*(p-b)*(p-c);
                        d = sqrt(s);
                        printf("%.1f",d);
                        return 0;
                    }
                    
                    • -3
                      @ 2024-2-22 9:30:58
                      #include<iostream>
                      #include<cmath>
                      #include <stdexcept>
                      using namespace std;
                      int main(){
                          double s,p,a,b,c,d;
                          cin>>a>>b>>c;
                          p = 0.5*(a+b+c);
                          s = p*(p-a)*(p-b)*(p-c);
                          d = sqrt(s);
                          printf("%.1f",d);
                          return 0;
                      }
                      
                      • -3
                        @ 2024-2-22 9:28:10
                        #include<iostream>
                        #include<cmath>
                        #include <stdexcept>
                        using namespace std;
                        int main(){
                            double s,p,a,b,c,d;
                            cin>>a>>b>>c;
                            p = 0.5*(a+b+c);
                            s = p*(p-a)*(p-b)*(p-c);
                            d = sqrt(s);
                            printf("%.1f",d);
                            return 0;
                        }
                        
                        • -3
                          @ 2024-2-22 9:10:18

                          #include<bits/stdc++.h> #include #include using namespace std; int main(){ double s,p,a,b,c,d; cin>>a>>b>>c; p = 0.5*(a+b+c); s = p*(p-a)(p-b)(p-c); d = sqrt(s); printf("%.1f",d); return 0; }

                          • -7
                            @ 2023-12-15 17:03:00

                            #include #include #include using namespace std; int main(){ double s,p,a,b,c,d; cin>>a>>b>>c; p = 0.5*(a+b+c); s = p*(p-a)(p-b)(p-c); d = sqrt(s); printf("%.1f",d); return 0; }

                            • 1

                            信息

                            ID
                            610
                            时间
                            1000ms
                            内存
                            512MiB
                            难度
                            3
                            标签
                            (无)
                            递交数
                            805
                            已通过
                            433
                            上传者