最短题解:只有三行
2024-09-09 19:28:03
发布于:浙江
47阅读
0回复
0点赞
先说一下,ZXC是我们班的老师
下面为正式内容:
#include<bits/stdc++.h>
using namespace std;
int main(){int a,b,c,x,y,z,n;cin >> a >> b >> c >> x >> y >> z >> n;if(a * x + b * y + c * z <= n) cout << "YES";else if(a * x + b * y + c * z - 50 <= n) cout << "V me 50" << endl << "YES";else cout << "NO";return 0;}
够短吧(觉得短就点个赞吧,求求了!)
全部评论 4
#include<cstdio> int main(){int a,b,c,d,e,f,n;scanf("%d %d %d",&a,&b,&c);scanf("%d %d %d",&d,&e,&f);scanf("%d",&n);if(n>=a*d+b*e+c*f)printf("YES");else if(n+50>=a*d+b*e+c*f)printf("V me 50\nYES");else printf("NO");return 0;}
我只要两行
2025-06-26 来自 上海
0私信回我!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-11-15 来自 浙江
0私信回我!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-11-15 来自 浙江
0私信回我!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024-11-15 来自 浙江
0
有帮助,赞一个