分三种情况:全部在第二个区间里全部在第一个区间里横跨两个区间 #include<iostream> #include<algorithm> using namespace std; signed main(){ int offset, n, len1, len2; while(cin >> offset >> n >> len1 >> len2){ if(offset >= len1){ cout << len1 << " &...