一切想不出来的都交给几何画板
2024-07-21 22:00:09
发布于:广东
5阅读
0回复
0点赞
#include <iostream>
#include <cstdio>
using namespace std;
int a[100005];
void solve(){
int n1, m1, k1, n2, m2, k2;
cin >> n1 >> m1 >> k1 >> n2 >> m2 >> k2;
if(n1 == n2 && m1 == m2 && k1 == k2){
cout << "INF\n";
return;
}
int d = (n1 - n2) * (n1 - n2) + (m1 - m2) * (m1 - m2);
int rs = (k1 - k2) * (k1 - k2);
int ra = (k1 + k2) * (k1 + k2);
if(d > ra) cout << "4\n";
else if(d == ra) cout << "3\n";
else if(d > rs) cout << "2\n";
else if(d == rs) cout << "1\n";
else cout << "0\n";
}
int main(){
int t;
cin >> t;
while(t--){
solve();
}
return 0;
}
这里空空如也
有帮助,赞一个