切换到宽版
  • 32974阅读
  • 49回复

NOIP2006提高组满分源代码 [复制链接]

上一主题 下一主题
离线suiyuhe
只看该作者 10 发表于: 2006-11-24
BEST!
DING
离线ra224
只看该作者 11 发表于: 2006-11-25
DING
离线johnson
只看该作者 12 发表于: 2006-11-25
ding
离线johnson
只看该作者 13 发表于: 2006-11-25
ding
离线johnson
只看该作者 14 发表于: 2006-11-25
不好意思,电脑问题,连发两次
离线madboy
只看该作者 15 发表于: 2006-11-25
顶!!
谢谢楼主!!
离线cache
只看该作者 16 发表于: 2006-11-25
看一看!
离线billylinux
只看该作者 17 发表于: 2006-11-26
第二题好难懂啊!!!
哪位大虾解释一下,谢谢。
离线annylicole
只看该作者 18 发表于: 2006-11-27
请帮忙看一下普及组的第一题这样解行不行?
var
i,j,k,p,t,n:integer;
a:array[1..100] of integer;
input,output:text;
begin
assign(input,'D:\random.in');
reset(input);
readln(input,n);
for i:=1 to n do read(input,a); readln;
close(input);
//writeln('input n:'); readln(n);
  //writeln('input imformation:');
  //for i:=1 to n do read(a);
t:=n;
  for i:=1 to n do
  for j:=1 to t do
    if j<>i then
      begin
        if a=a[j] then
          begin
          for k:=j+1 to t do
              a[k-1]:=a[k];
              a[t]:=0;
              dec(t);
          end;

      end;
  for i:=1 to t-1 do
  for j:=i+1 to t do
    if a>a[j] then
      begin
        p:=a;
        a:=a[j];
        a[j]:=p ;
      end;
  assign(output,'D:\random.out');
  rewrite(output);
writeln(output,t);
for i:=1 to t do write(output,a,' ');
close(output);
readln;
end.
离线yiwuwang
只看该作者 19 发表于: 2006-11-29
强烈支持
快速回复
限100 字节
 
上一个 下一个