看着对啊,但是就是错
代码如下
#include<bits/stdc++.h>
using namespace std;
long long d,dd,b,bb,p,m,g,d1,d2,t1,t2,t3,maxx,minn;
int main(){
cin>>d>>dd>>b>>bb>>p>>m>>g;
d1=d+dd;
d2=b+bb;//本人码风,请忽视!
if(p%d1<=d){
t1++;
}
if(p%d2<=dd){
t1++;
}
if(m%d1<=d){
t2++;
}
if(m%d2<=dd){
t2++;
}
if(g%d1<=d){
t3++;
}
if(g%d2<=dd){
t3++;
}
if(t1==0){
cout<<"none"<<endl;
}else if(t1==1){
cout<<"one"<<endl;
}else{
cout<<"both"<<endl;
}
if(t2==0){
cout<<"none"<<endl;
}else if(t2==1){
cout<<"one"<<endl;
}else{
cout<<"both"<<endl;
}
if(t3==0){
cout<<"none"<<endl;
}else if(t3==1){
cout<<"one"<<endl;
}else{
cout<<"both"<<endl;
}
}
希望有大神能快速回复