70,求调
查看原帖
70,求调
1493875
lmdyyd楼主2024/10/26 10:01
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int t,d,t1,t2,d1,d2,num1,num2;
	cin >> t >> d >> t1 >> d1 >> t2 >> d2;
	if(d1<d&&d2<d){
		cout << "-1";
		return 0;
	}else {
		if(t1>t){
			num1=t1-t;
		}else{
			num1=0;		
		}
		if(t2>t){
			num2=t2-t;
			
		}else{
			num2=0;		
		}
	}cout << min(num1,num2);
	return 0;
} 
2024/10/26 10:01
加载中...