Who solved 1050 ? Please help me.
What is a blank line ?
???
Here is my solution (read from input.txt and write to
output.txt). Please give me some sample input, output.
Thank.
{$R+}
Program Preparing_an_article;
Const
fi = 'input.txt';
fo = 'output.txt';
characters = ['A'..'Z','a'..'z'];
Label rep;
Var
f1,f2 : text;
quotes : word;
wrote : boolean;
par : array[0..20250] of char;
l,i,t : word;
s : string;
Begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
wrote := true;
par[0]:=' ';
repeat
if wrote then
begin l := 0; quotes := 0; end;
repeat
inc(l);
read(f1,par[l]);
if par[l]='"' then
inc(quotes);
until (par[l]='\')or((par[l]=#10)and(par[l-1]=#13));
if par[l]='\' then
begin
s := '';
while (not eof(f1)) do
begin
inc(l); read(f1,par[l]);
if par[l] in characters then s := s + par[l]
else break;
end;
if (s='')and(par[l]='"') then
begin wrote := false; continue;end;
if s = 'endinput' then
while not eof(f1) do begin inc(l);read(f1,par
[l]);end;
end;
if ((par[l]=#10)and(par[l-1]=#13) )
or(s = 'par') or (s = 'endinput') then
begin
t := 1;
for i := 1 to l do
begin
if (par[i-1]<>'\')and(par[i] = '"')
and((t
'"')or
((par[i]='"')and(par[i-1]='\'))
then write(f2,par[i]);
end;
wrote := true;
end else wrote := false;
until s='endinput';
close(f1); close(f2);
End.