#40757: 求抓錯


yp11251156@yphs.tp.edu.tw (908-36許安荀)

學校 : 臺北市私立延平高級中學
編號 : 264646
來源 : [203.72.178.2]
最後登入時間 :
2025-10-01 16:39:19

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,c,d;
    cin>>a;
    while(a--)
    {
     cin>>b>>c>>d;
     if((b+c<d)||(c+d<b)||(b+d<c)) cout<<0<<endl;
     else if(a==b||b==c||a==c) cout<<1<<" "<<1<<endl;
     else cout<<1<<" "<<0<<endl;
     }
}

#40964: Re: 求抓錯


cges30901 (cges30901)

學校 : 不指定學校
編號 : 30877
來源 : [39.12.66.21]
最後登入時間 :
2025-04-20 17:19:22

1. 如果兩個邊相加剛好等於第三個邊,也無法圍成三角形

2. a是測資數量,你打錯了