记录编号 | 5953 | 评测结果 | AAAAAAAAAA | ||
---|---|---|---|---|---|
题目名称 | 132.[USACO Mar08] 珍珠分对 | 最终得分 | 100 | ||
用户昵称 | 是否通过 | 通过 | |||
代码语言 | Pascal | 运行时间 | 0.031 s | ||
提交时间 | 2008-10-29 21:48:50 | 内存使用 | 0.55 MiB | ||
var n,c,i,j,k,tmp:longint; pearl:array [1..100000] of longint; begin assign(input,'ppairing.in'); reset(input); assign(output,'ppairing.out'); rewrite(output); readln(n,c); for i:=1 to c do begin readln(tmp); for j:=k+1 to k+tmp do pearl[j]:=i; inc(k,tmp); end; for i:=1 to n div 2 do writeln(pearl[i],' ',pearl[i+n div 2]); close(input); close(output); end.