#include <iostream> using namespace std ; int main() { int num1, num2 ; int years1, years2 ; cin >> years1 >> years2 >>num1 >> num2 ; if(num1 > num2) { if((num2 < years1) && (num1 >= years2)) { cout << num1<<"-Y " << num2<<"-Y" << endl ; cout << "qing 1 zhao gu hao 2" ; return 0 ; } if(num2 >= years1) { cout << num1<<"-Y " << num2<<"-Y" << endl ; cout << "huan ying ru guan" ; return 0 ; } if(num1 < years1) { cout << num1<<"-N " << num2<<"-N" << endl ; cout << "zhang da zai lai ba" ; return 0 ; } if((num2 < years1) && (num1<years2) && (num1 >= years1)) { cout << num1<<"-Y " << num2<<"-N" << endl ; cout << "1: huan ying ru guan" ; return 0 ; } } else { if((num1 < years1) && (num2 >= years2)) { cout << num1<<"-Y " << num2<<"-Y" << endl ; cout << "qing 2 zhao gu hao 1" ; return 0 ; } if(num1 >= years1) { cout << num1<<"-Y " << num2<<"-Y" << endl ; cout << "huan ying ru guan" ; return 0 ; } if(num2 < years1) { cout << num1<<"-N " << num2<<"-N" << endl ; cout << "zhang da zai lai ba" ; return 0 ; } if((num1 < years1) && (num2<years2) && (num2 >= years1)) { cout << num1<<"-N " << num2<<"-Y" << endl ; cout << "2: huan ying ru guan" ; return 0 ; } } }
为什么只有代码呢,是因为我没找到原题在哪,很难受
等原题出来了就再发次题解