80pts,样例全过了
#include<bits/stdc++.h>
using namespace std;
inline int qread(){
register int x = 0,f = 1;
register char ch = getchar();
while(ch<'0'||ch>'9'){
if(ch=='-'){
f = -1;
}
//与正常快读不同的一句
if(ch=='x'||ch=='y'){
return f;
}
ch = getchar();
}
while(ch>='0'&&ch<='9'){
x = x * 10 + ch - '0';
ch = getchar();
}
return x*f;
}
#define check1 x1 * x + y1 * y == s1
#define check2 x2 * x + y2 * y == s2
int main(){
int x1 = qread(), y1 = qread(), s1 = qread(), x2 = qread(), y2 = qread(), s2 = qread();
int x, y;
for(x=-10;x<=10;x++){
for(y=-10;y<=10;y++){
if(check1&&check2){
printf("%d\n%d", x, y);
return 0;
}
}
}
return 0;
}