noi4_1_1999[日志排序]
Posted love_saber
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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(‘ ‘,s