比赛 |
20101119 |
评测结果 |
AAAWWWWWWW |
题目名称 |
奥运会 |
最终得分 |
30 |
用户昵称 |
reamb |
运行时间 |
0.000 s |
代码语言 |
Pascal |
内存使用 |
0.00 MiB |
提交时间 |
2010-11-19 10:49:14 |
显示代码纯文本
program olympic;
var
jilu1,jilu2,l,jilu3,i,j,k,p,n,w,answer:longint;
g,y,t:array[1..15]of longint;
begin
assign (input,'olympic.in');
reset (input);
assign (output,'olympic.out');
rewrite (output);
readln (n);
for i:=1 to n do
readln (g[i],y[i],t[i]);
answer:=n;
for i:=1 to 100 do
for j:=1 to i do
for k:=1 to j do
begin
l:=i*g[1]+j*y[1]+k*t[1];
w:=1;
for p:=2 to n do
if i*g[p]+j*y[p]+k*t[p]>l then
w:=w+1;
if w<answer then
begin
jilu1:=i;
jilu2:=j;
jilu3:=k;
answer:=w
end;
if w=1 then
begin
writeln (jilu1,' ',jilu2,' ',jilu3);
close (input);
close (output);
halt
end
end;
writeln (jilu1,' ',jilu2,' ',jilu3);
close (input);
close (output)
end.