记录编号 | 5288 | 评测结果 | AAAAAAAAAA | ||
---|---|---|---|---|---|
题目名称 | [NOIP 2006]明明的随机数 | 最终得分 | 100 | ||
用户昵称 | 是否通过 | 通过 | |||
代码语言 | Pascal | 运行时间 | 0.028 s | ||
提交时间 | 2008-10-25 23:40:47 | 内存使用 | 0.11 MiB | ||
Program random; Type sc=array [1..1000] of integer; Var x,n,i,j,o:integer; s:sc; Begin assign(input,'random.in'); assign(output,'random.out'); reset(input); rewrite(output); readln(n); o:=0; for i:=1 to 1000 do s[i]:=0; for i:=1 to n do begin read(x); if s[x]=0 then o:=o+1; s[x]:=s[x]+1; end; writeln(o); for i:=1 to 1000 do if s[i]<>0 then write(i,' '); close(input); close(output); End.