记录编号 |
27754 |
评测结果 |
WWWAWAWAAW |
题目名称 |
拱猪计分 |
最终得分 |
40 |
用户昵称 |
feng |
是否通过 |
未通过 |
代码语言 |
Pascal |
运行时间 |
0.002 s |
提交时间 |
2011-09-29 14:43:57 |
内存使用 |
0.12 MiB |
显示代码纯文本
program olx;
const
filename='heart';
inf=filename+'.in';
ouf=filename+'.out';
maxn=16;
v:array[1..13]of longint=(-50,-2,-3,-4,-5,-6,-7,-8,-9,-10,-20,-30,-40);
var
i,j,k,l,m,n,sum,s:longint;
a:array[1..4,0..maxn]of boolean;
f:array[1..4]of longint;
q,t:boolean;
ch,ch1:char;
begin
assign(input,inf); reset(input);
assign(output,ouf);rewrite(output);
t:=false;
while not(eof) do
begin
fillchar(a,sizeof(a),false);
if t then begin
for j:=1 to 3 do
begin
if f[j]<=0 then
write(f[j],' ');
if f[j]>0 then
write('+',f[j],' ');
end;
if f[4]<=0 then write(f[4]);
if f[4]>0 then write('+',f[4]);
writeln; end;
for i:=1 to 4 do
begin
read(n);
read(ch);
for j:=1 to n do
begin
read(ch);
ch1:=ch;
s:=0;
repeat
read(ch);
if ch in ['0'..'9'] then
s:=s*10+ord(ch)-ord('0');
until not(ch in ['0'..'9']);
if ch1='H' then a[i,s]:=true
else if (ch1='C')and(s=10) then a[i,14]:=true
else if (ch1='D')and(s=11) then a[i,15]:=true
else if (ch1='S')and(s=12) then a[i,16]:=true;
end;
readln;
q:=true;
sum:=0;
for j:=1 to 13 do
begin
if not(a[i,j]) then q:=false;
if a[i,j] then sum:=sum+v[j];
end;
if q then
begin
sum:=200;
if (a[i,15])and(a[i,16]) then sum:=500
else if a[i,15] then sum:=sum+100
else if a[i,16] then sum:=sum-100;
end
else begin
if a[i,15] then sum:=sum+100;
if a[i,16] then sum:=sum-100;
end;
if a[i,14] then sum:=sum*2;
f[i]:=sum;
end;
t:=true;
end;
close(input);close(output);
end.