记录编号 |
1851 |
评测结果 |
AAAAAAAAAA |
题目名称 |
到天宫做客 |
最终得分 |
100 |
用户昵称 |
E.M.B.E.R |
是否通过 |
通过 |
代码语言 |
Pascal |
运行时间 |
88.000 s |
提交时间 |
2008-09-09 13:01:33 |
内存使用 |
0.00 MiB |
显示代码纯文本
program EmberAsh;
const
yy:array[1..12]of integer=(31,28,31,30,31,30,31,31,30,31,30,31);
var
month:array[1..12,1..31]of boolean;
year:array[1..365]of boolean;
i,j,k,n,t1,t2,days,max:longint;
ii,jj,kk:real;
fin,fout:text;
BEGIN
assign(fin,'heaven.in');reset(fin);
assign(fout,'heaven.out');rewrite(fout);
readln(fin,n);
for i:=1 to n do
begin
readln(fin,t1,t2);
month[t1,t2]:=true;
end;
close(fin);
for i:=1 to 31 do
if month[1,i]=false then
inc(days)
else
begin
if days>max then max:=days;
days:=0;
end;
for i:=1 to 29 do
if month[2,i]=false then
inc(days)
else
begin
if days>max then max:=days;
days:=0;
end;
for i:=1 to 31 do
if month[3,i]=false then
inc(days)
else
begin
if days>max then max:=days;
days:=0;
end;
for i:=1 to 30 do
if month[4,i]=false then
inc(days)
else
begin
if days>max then max:=days;
days:=0;
end;
for i:=1 to 31 do
if month[5,i]=false then
inc(days)
else
begin
if days>max then max:=days;
days:=0;
end;
for i:=1 to 30 do
if month[6,i]=false then
inc(days)
else
begin
if days>max then max:=days;
days:=0;
end;
for i:=1 to 31 do
if month[7,i]=false then
inc(days)
else
begin
if days>max then max:=days;
days:=0;
end;
for i:=1 to 31 do
if month[8,i]=false then
inc(days)
else
begin
if days>max then max:=days;
days:=0;
end;
for i:=1 to 30 do
if month[9,i]=false then
inc(days)
else
begin
if days>max then max:=days;
days:=0;
end;
for i:=1 to 31 do
if month[10,i]=false then
inc(days)
else
begin
if days>max then max:=days;
days:=0;
end;
for i:=1 to 30 do
if month[11,i]=false then
inc(days)
else
begin
if days>max then max:=days;
days:=0;
end;
for i:=1 to 31 do
if month[12,i]=false then
inc(days)
else
begin
if days>max then max:=days;
days:=0;
end;
if days>max then max:=days;
kk:=max/366;
ii:=kk*24*60*60;
writeln(fout,round(ii));
close(fout);
END.