对于正常的N提高组选手来说,水过拿分就好=。=
<span style="font-size:18px;">var
n,l1,l2,ans1,ans2 :longint;
i,j,k :longint;
a,b :array[0..210] of longint;
map :array[0..7,0..7] of boolean;
begin
map[0,2]:=true;map[0,3]:=true;
map[1,3]:=true;
map[2,4]:=true;
map[3,4]:=true;
read(n,l1,l2);
for i:=1 to l1 do read(a[i]);
for i:=1 to l2 do read(b[i]);
j:=1;k:=1;
for i:=1 to n do
begin
if (a[j]<>b[k]) then
begin
if (a[j]<b[k]) then
begin
if map[a[j],b[k]] then inc(ans1) else inc(ans2);
end else
begin
if map[b[k],a[j]] then inc(ans2) else inc(ans1);
end;
end;
j:=j mod l1+1;
k:=k mod l2+1;
end;
writeln(ans1,' ',ans2);
end.</span>
——by Eirlys