6 solutions
- 1
Information
- ID
- 949
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 7
- Tags
- (None)
- # Submissions
- 211
- Accepted
- 50
- Uploaded By
# include<bits/stdc++.h>
using namespace std;
int main(){
int t;
long double a,b,c;
cin >>t;
for (int i=0;i<t;i++){
cin >>a>>b>>c;
if (a+b>c){
cout <<"YES\n";
}
else {
cout <<"NO\n";
}
}
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
for(int i=0;i<n;i++){
long double a,b,c;
string x;
cin>>a>>b>>c;
x=a+b>c?"YES":"NO";
cout<<x<<endl;
}
return 0;
}
//////////sssssssss
//fangweibiaoji...........n
long double太牛了
128位去存储
#include<iostream>
using namespace std;
int main()
{
int t;
cin>>t;//输入次数
long double A,B,C;//用long double
while(t--)
{
cin>>A>>B>>C;//输入
if(A+B>C)//判断是否成立
{
cout<<"YES\n";
}
else
{
cout<<"NO\n";
}
}
return 0;//完结散花
}
#include<bits/stdc++.h>;
using namespace std;
long double a,b,c;
long long t;
int main(){
cin>>t;
for(int i=0;i<t;i++){
cin>>a>>b>>c;
if(a+b>c) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
return 0;
}
论long double为什么是神
#include<bits/stdc++.h>
using namespace std;
long long a,b,c;
long long t;
int main(){
cin>>t;
for(long long i=0;i<t;i++){
cin>>a>>b>>c;
if(c-a-b>=0) cout<<"NO"<<endl;
else cout<<"YES"<<endl;
}
return 0;//不必多言
}
坑啊
兄弟们这个代码不可以,别用
By signing up a ZXOJ universal account, you can submit code and join discussions in all online judging services provided by us.