首页 > 代码库 > noi4_1_1999[日志排序]
noi4_1_1999[日志排序]
复杂的判断&多余的空格=n个wrong answer
type event=record st:string[100]; year,mon,day,hour,min,sec,lse:integer; t:longint; end;var a:array[1..10000] of event; n:longint; function bigger(i,j:integer):boolean;begin if a[i].year>a[j].year then exit(true); if a[i].year<a[j].year then exit(false); if a[i].mon>a[j].mon then exit(true); if a[i].mon<a[j].mon then exit(false); if a[i].day>a[j].day then exit(true); if a[i].day<a[j].day then exit(false); if a[i].hour>a[j].hour then exit(true); if a[i].hour<a[j].hour then exit(false); if a[i].min>a[j].min then exit(true); if a[i].min<a[j].min then exit(false); if a[i].sec>a[j].sec then exit(true); if a[i].sec<a[j].sec then exit(false); if a[i].lse>a[j].lse then exit(true); if a[i].lse<a[j].lse then exit(false); exit(false);end; procedure scanf;var k:longint; s:string; tmp:real;begin n:=0; readln(s); while s<>‘‘ do begin inc(n); a[n].st:=s; while s[1]=‘ ‘ do delete(s,1,1); k:=pos(‘ ‘