I have same question.EggHead wrote:Hello everyone!
I made a pascal program and try to pass 474, but failed all the time. And I found nearly no pascal programmers passed that. And some used C or C++ said they cannot pass with pascal! Why? Who can tell me? Thanks?
Search found 6 matches
- Thu Aug 22, 2002 3:52 am
- Forum: Volume 4 (400-499)
- Topic: 474 - Heads / Tails Probability
- Replies: 50
- Views: 18485
- Mon Aug 19, 2002 4:43 pm
- Forum: Volume 4 (400-499)
- Topic: 474 - Heads / Tails Probability
- Replies: 50
- Views: 18485
help:474 (WA)
I try n times,but...
[pascal]
const
fi='';
fo='';
var
f1,f2:text;
n,y:longint;
log2e,loge2,x:real;
function ppow(x,y:real):real;
begin
ppow:=exp(y*ln(x));
end;
function ceil(x:real):longint;
begin
if trunc(x)=x
then ceil:=trunc(x)
else ceil:=trunc(x)+1;
end;
begin
assign(f1,fi ...
[pascal]
const
fi='';
fo='';
var
f1,f2:text;
n,y:longint;
log2e,loge2,x:real;
function ppow(x,y:real):real;
begin
ppow:=exp(y*ln(x));
end;
function ceil(x:real):longint;
begin
if trunc(x)=x
then ceil:=trunc(x)
else ceil:=trunc(x)+1;
end;
begin
assign(f1,fi ...
- Wed Aug 14, 2002 1:09 pm
- Forum: Volume 4 (400-499)
- Topic: 433 - Bank (Not Quite O.C.R.)
- Replies: 18
- Views: 5161
Help:433 (WA)
Who can help me?
I try n times,but ...
[pascal]
type
ntype=array [0..8] of byte;
const
fi='';
fo='';
num:array [0..9] of ntype=((0,1,0,1,0,1,1,1,1),(0,0,0,0,0,1,0,0,1),
(0,1,0,0,1,1,1,1,0),(0,1,0,0,1,1,0,1,1),
(0,0,0,1,1,1,0,0,1),(0,1,0,1,1,0,0,1,1),
(0,1,0,1,1,0,1,1,1),(0,1,0,0,0,1,0,0,1 ...
I try n times,but ...
[pascal]
type
ntype=array [0..8] of byte;
const
fi='';
fo='';
num:array [0..9] of ntype=((0,1,0,1,0,1,1,1,1),(0,0,0,0,0,1,0,0,1),
(0,1,0,0,1,1,1,1,0),(0,1,0,0,1,1,0,1,1),
(0,0,0,1,1,1,0,0,1),(0,1,0,1,1,0,0,1,1),
(0,1,0,1,1,0,1,1,1),(0,1,0,0,0,1,0,0,1 ...
- Sat Aug 10, 2002 3:24 pm
- Forum: Volume 1 (100-199)
- Topic: 110 - Meta-Loopless Sorts
- Replies: 92
- Views: 16455
- Mon Jul 29, 2002 4:55 pm
- Forum: Volume 1 (100-199)
- Topic: 110 - Meta-Loopless Sorts
- Replies: 92
- Views: 16455
- Sun Jul 21, 2002 11:23 am
- Forum: Volume 1 (100-199)
- Topic: 110 - Meta-Loopless Sorts
- Replies: 92
- Views: 16455
WA: Problem 110 Why???
const
maxn=20;
type
atype=array [1..maxn] of byte;
var
n,m,i:byte;
a:atype;
procedure find(no:byte);
var
bak:atype;
j,k:byte;
begin
if no=n+1 then
begin
write('':n*2,'writeln(');
for j:=1 to n-1 do
write(chr(96+a[j]),',');
writeln(chr(96+a[n]),')');
exit;
end;
bak:=a;
a[no]:=no ...
maxn=20;
type
atype=array [1..maxn] of byte;
var
n,m,i:byte;
a:atype;
procedure find(no:byte);
var
bak:atype;
j,k:byte;
begin
if no=n+1 then
begin
write('':n*2,'writeln(');
for j:=1 to n-1 do
write(chr(96+a[j]),',');
writeln(chr(96+a[n]),')');
exit;
end;
bak:=a;
a[no]:=no ...