2 条题解
-
1韩梓欣 LV 4 @ 2024-12-02 21:01:12
#include<iostream>
#include<stdio.h>
#include<string>
using namespace std;
string s1, s2;
int y[4], m[4], d[4];
int main(){
cin >> s1 >> y[0] >> m[0] >> d[0] >> y[1] >> m[1] >> d[1] >> s2 >> y[2] >> m[2] >> d[2] >> y[3] >> m[3] >> d[3];
printf("Date is Constructed: %d-%d-%d\n", y[0], m[0], d[0]);
printf("Date is Constructed: %d-%d-%d\n", y[1], m[1], d[1]);
cout << "Person is Constructed: " << s1 << endl;if(y[0]*400+m[0]*35+d[0] > y[2]*400+m[2]*35+d[2]){
cout << "Person is Deconstructed: " << s1 << endl;
printf("Date is Deconstructed: %d-%d-%d\n", y[1], m[1], d[1]);
printf("Date is Deconstructed: %d-%d-%d\n", y[0], m[0], d[0]);
cout << "Person is Deconstructed: " << s2 << endl;
printf("Date is Deconstructed: %d-%d-%d\n", y[3], m[3], d[3]);
printf("Date is Deconstructed: %d-%d-%d\n", y[2], m[2], d[2]);
}
return 0;
} -
02024-08-29 15:41:34@
#include<iostream> #include<stdio.h> #include<string> using namespace std; string s1, s2; int y[4], m[4], d[4]; int main(){ cin >> s1 >> y[0] >> m[0] >> d[0] >> y[1] >> m[1] >> d[1] >> s2 >> y[2] >> m[2] >> d[2] >> y[3] >> m[3] >> d[3]; printf("Date is Constructed: %d-%d-%d\n", y[0], m[0], d[0]); printf("Date is Constructed: %d-%d-%d\n", y[1], m[1], d[1]); cout << "Person is Constructed: " << s1 << endl; printf("Date is Constructed: %d-%d-%d\n", y[2], m[2], d[2]); printf("Date is Constructed: %d-%d-%d\n", y[3], m[3], d[3]); cout << "Person is Constructed: " << s2 << endl; cout << s1; printf(" %d-%d-%d %d-%d-%d\n", y[0], m[0], d[0], y[1], m[1], d[1]); cout << s2; printf(" %d-%d-%d %d-%d-%d\n", y[2], m[2], d[2], y[3], m[3], d[3]); if(y[0]*400+m[0]*35+d[0] > y[2]*400+m[2]*35+d[2]){ cout << "Person is Deconstructed: " << s1 << endl; printf("Date is Deconstructed: %d-%d-%d\n", y[1], m[1], d[1]); printf("Date is Deconstructed: %d-%d-%d\n", y[0], m[0], d[0]); cout << "Person is Deconstructed: " << s2 << endl; printf("Date is Deconstructed: %d-%d-%d\n", y[3], m[3], d[3]); printf("Date is Deconstructed: %d-%d-%d\n", y[2], m[2], d[2]); }else{ cout << "Person is Deconstructed: " << s2 << endl; printf("Date is Deconstructed: %d-%d-%d\n", y[3], m[3], d[3]); printf("Date is Deconstructed: %d-%d-%d\n", y[2], m[2], d[2]); cout << "Person is Deconstructed: " << s1 << endl; printf("Date is Deconstructed: %d-%d-%d\n", y[1], m[1], d[1]); printf("Date is Deconstructed: %d-%d-%d\n", y[0], m[0], d[0]); } return 0; }
- 1
信息
- ID
- 1138
- 难度
- 8
- 分类
- (无)
- 标签
- 递交数
- 64
- 已通过
- 8
- 通过率
- 12%
- 上传者