/ SB域 /

记录详情

Accepted

/usr/bin/ld.bfd: warning: /out/link.res contains output sections; did you forget -T?
# 状态 耗时 内存占用
#1 Accepted 0ms 128.0 KiB
#2 Accepted 0ms 128.0 KiB
#3 Accepted 0ms 128.0 KiB
#4 Accepted 0ms 128.0 KiB
#5 Accepted 0ms 128.0 KiB
#6 Accepted 0ms 128.0 KiB
#7 Accepted 0ms 128.0 KiB
#8 Accepted 0ms 128.0 KiB
#9 Accepted 0ms 128.0 KiB
#10 Accepted 0ms 128.0 KiB
#11 Accepted 0ms 128.0 KiB
#12 Accepted 0ms 128.0 KiB
#13 Accepted 0ms 128.0 KiB
#14 Accepted 1ms 128.0 KiB
#15 Accepted 0ms 128.0 KiB
#16 Accepted 0ms 128.0 KiB
#17 Accepted 0ms 128.0 KiB
#18 Accepted 0ms 128.0 KiB
#19 Accepted 0ms 128.0 KiB
#20 Accepted 0ms 128.0 KiB
#21 Accepted 0ms 128.0 KiB
#22 Accepted 0ms 128.0 KiB
#23 Accepted 0ms 128.0 KiB
#24 Accepted 0ms 128.0 KiB
#25 Accepted 0ms 128.0 KiB
#26 Accepted 0ms 128.0 KiB
#27 Accepted 0ms 128.0 KiB
#28 Accepted 0ms 128.0 KiB
#29 Accepted 0ms 128.0 KiB
#30 Accepted 0ms 128.0 KiB
#31 Accepted 0ms 128.0 KiB
#32 Accepted 0ms 128.0 KiB
#33 Accepted 0ms 128.0 KiB
#34 Accepted 0ms 128.0 KiB
#35 Accepted 0ms 128.0 KiB
#36 Accepted 0ms 128.0 KiB
#37 Accepted 0ms 128.0 KiB
#38 Accepted 0ms 128.0 KiB
#39 Accepted 0ms 128.0 KiB
#40 Accepted 0ms 128.0 KiB
#41 Accepted 0ms 128.0 KiB
#42 Accepted 0ms 128.0 KiB
#43 Accepted 0ms 128.0 KiB
#44 Accepted 0ms 128.0 KiB
#45 Accepted 0ms 128.0 KiB
#46 Accepted 0ms 128.0 KiB
#47 Accepted 0ms 128.0 KiB
#48 Accepted 0ms 128.0 KiB
#49 Accepted 0ms 128.0 KiB
#50 Accepted 0ms 128.0 KiB
#51 Accepted 0ms 128.0 KiB
#52 Accepted 0ms 128.0 KiB
#53 Accepted 0ms 132.0 KiB
#54 Accepted 0ms 128.0 KiB
#55 Accepted 0ms 128.0 KiB
#56 Accepted 0ms 128.0 KiB
#57 Accepted 0ms 128.0 KiB
#58 Accepted 0ms 128.0 KiB
#59 Accepted 0ms 128.0 KiB
#60 Accepted 0ms 128.0 KiB
#61 Accepted 0ms 128.0 KiB
#62 Accepted 0ms 128.0 KiB
#63 Accepted 0ms 128.0 KiB
#64 Accepted 0ms 128.0 KiB
#65 Accepted 0ms 128.0 KiB
#66 Accepted 0ms 128.0 KiB
#67 Accepted 0ms 128.0 KiB
#68 Accepted 0ms 128.0 KiB
#69 Accepted 0ms 128.0 KiB
#70 Accepted 0ms 128.0 KiB
#71 Accepted 0ms 128.0 KiB
#72 Accepted 0ms 128.0 KiB
#73 Accepted 0ms 128.0 KiB
#74 Accepted 0ms 128.0 KiB

代码

var n,i,j,e,m,h,k:longint;
    a:array[1..50]of longint;
procedure swap(var a,b:longint);
var t:longint;
begin
 t:=a; a:=b; b:=t;
end;
function f(x,y,z:longint):longint;
begin
 exit(abs(abs(a[y]-a[x])-abs(a[z]-a[y])));
end;
begin
 readln(n);
 for i:=1 to n do read(a[i]);
 for i:=1 to n-1 do
  for j:=i+1 to n do
   if a[i]>a[j] then swap(a[i],a[j]);
 E:=1; M:=2; H:=n;
 for i:=1 to n do
  for k:=n downto i+2 do
   for j:=i+1 to k-1 do
     if f(i,j,k)<f(E,M,H) then begin
        E:=i;M:=j;H:=k;
     end;
 writeln(a[E],' ',a[M],' ',a[H]);
 close(input);
 close(output);
end.

信息

递交者
类型
递交
题目
ProblemSetter(问题的设置)
题目数据
下载
语言
Pascal
递交时间
2017-08-22 16:26:59
评测时间
2019-04-09 18:41:58
评测机
分数
100
总耗时
54ms
峰值内存
132.0 KiB