I submited my program n times but always got WA, HELP!!!
{This is my program}
program URAL1200;
var
a,b,xx,max:real;
c,k,x,y:longint;
bestx,besty:longint;
begin
read(a,b,k);
max:=0;
bestx:=0;
besty:=0;
for c:=1 to k do begin
xx:=(2*c+a-b)/4;
if xx<0 then xx:=0;
if xx>c then xx:=c;
x:=round(xx-0.001);
y:=c-x;
if a*x+b*y-x*x-y*y>max then begin
max:=a*x+b*y-x*x-y*y;
bestx:=x;
besty:=y;
end;
end;
writeln(max:0:2);
writeln(bestx,' ',besty);
end.