社区讨论
50 WA 求助
题目总版参与者 5已保存回复 11
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 11 条
- 当前快照
- 1 份
- 快照标识符
- @lo2y0vwl
- 此快照首次捕获于
- 2023/10/23 21:38 2 年前
- 此快照最后确认于
- 2023/10/23 21:38 2 年前

#include <iostream>
#define int long long
using namespace std;
int a,b,c,d;
signed main(){
ios::sync_with_stdio(0);
cin.tie(NULL);
// 鸡鸡 羊羊 角角 腿腿
cin >> a >> b >> c >> d;
if(b*2 == c && a*2+b*4 == d){
cout << -1 << endl;
cout << -1 << endl;
return 0;
}
int x = d-(a*2+b*4); // 腿腿
int y = c-b*2; // 角角
if(y < 0 || x <= -2){
cout << -1 << endl;
}else{
cout << y << " " << x+2 << endl;
}
if(y <= -2 || x <= -4){
cout << -1 << endl;
}else{
cout << y+2 << " " << x+4 << endl;
}
return 0;
}
先润去写作业力
回复
共 11 条回复,欢迎继续交流。
正在加载回复...