文章

4

粉丝

65

获赞

8

访问

3.4k

头像
三角形判定 题解:
P2018
发布于2023年6月28日 18:05
阅读数 713

笔者认为:比较三角形的关键是最长的边与其他两边的关系。

#include <bits/stdc++.h>
using namespace std;

int main()
{
    int x = 0;
    scanf("%d",&x);
    while(x--)
    {
        int a,b,c;
        scanf("%d %d %d",&a,&b,&c);
        int temp;
        if(a>b)
        {
            if(a>c)//a--max
            {
                //max = a;
            }else
            {
                temp = a;
                a = c;
                c = temp;
                //max = c;
    &nb...

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发