文章
38
粉丝
11
获赞
2
访问
30.9k
#include<bits/stdc++.h>
using namespace std;
struct Log{
char name[12];
int y,month,d,h,minute,s,hs;
double time;
}stu[10100];
bool cmp(Log a,Log b){
if(a.time != b.time) return a.time < b.time;
else if(a.y != b.y) return a.y < b.y;
else if(a.month != b.month) return a.month < b.month;
else if(a.d != b.d) return a.d < b.d;
else if(a.h != b.h) return a.h < b.h;
else if(a.minute != b.minute) return a.minute < b.minute;
else if(a.s != b.s) return a.s < b.s;
else return a.hs < b.hs;
}
int main(){
int i = 0;
while(scanf("%s %d-%d-%d %d:%d:%d,%d %lf(s)",&stu[i].name,&stu[i].y,&stu[i].month,&stu[i].d,&stu[i].h,&stu[i].minute,&stu[i].s,&stu[i].hs,&stu[i].time) != EOF){
i++;
...
登录后发布评论
请问大佬后面成功AC了吗?可以请教一下解法吗