https://www.luogu.org/problem/show?pid=1412
这题是在胡老师哪里做的;
话说蛮怀念在初中的那段日子;
当年好像还不知道csgo
直接大力dp,只要从后往前就好了
var
a,b:Array[1..100001]of longint;
f:array[1..100001] of real;
n,w,k,c,i,j:longint;
function max(a,b:real):real;begin if a>b then exit(a);exit(b);end;
begin
read(n,k,c,w);
for i:=1 to n do read(b[i],a[i]);
for i:=n downto 1 do
begin
if b[i]=1 then f[i]:=max(f[i+1],a[i]+f[i+1]*(1-k/100));
if b[i]=2 then f[i]:=max(f[i+1],-a[i]+f[i+1]*(1+c/100));
end;
f[1]:=f[1]*w;
write(f[1]:0:2);
end.