| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 147640 | C班詹皓杰 | 生日 | C++ | Wrong Answer | 25 | 4 MS | 4948 KB | 553 | 2024-05-18 17:04:39 |
#include<iostream> #include<string> #include<algorithm> using namespace std; struct Person{ string name; int year,month,date; }a[100100]; int main(){ int n; cin>>n; for(int i = 0; i < n; i++){ cin>>a[i].name>>a[i].year>>a[i].month>>a[i].date; } sort(a,a+n,[](Person a,Person b){ if(a.year != b.year){ return a.year < b.year; } else if(a.month != b.month){ return a.month < b.month; } else{ return a.date < b.date; } }); for(int i = 0; i < n; i++){ cout<<a[i].name<<'\n'; } return 0; }