Please help me to find bugs in my code
[pascal]program n615;
var
graph : array[1..1000] of array[1..1000] of integer;
marked : array[1..1000] of array [1..1000] of integer;
quantity : array[1..1000] of integer;
bg,nd : integer;
i,j : integer;
subgraph : integer;
max : integer;
tree ...
Search found 7 matches
- Fri Jan 16, 2004 6:25 pm
- Forum: Volume 6 (600-699)
- Topic: 615 - Is It A Tree?
- Replies: 71
- Views: 36121
- Wed Jan 07, 2004 9:05 pm
- Forum: Volume 7 (700-799)
- Topic: 763 - Fibinary Numbers
- Replies: 40
- Views: 23453
763
Help me plz to understand why my program gets the WA
[pascal]program n763;
var
a,b,res : array[1..1000] of integer;
i,j : integer;
s : string;
len : integer;
begin
assign(input,'input.txt');
reset(input);
assign(output,'output.txt');
rewrite(output);
while not eof do
begin
fillchar(a ...
[pascal]program n763;
var
a,b,res : array[1..1000] of integer;
i,j : integer;
s : string;
len : integer;
begin
assign(input,'input.txt');
reset(input);
assign(output,'output.txt');
rewrite(output);
while not eof do
begin
fillchar(a ...
- Sat Jan 03, 2004 9:32 pm
- Forum: Volume 1 (100-199)
- Topic: 120 - Stacks of Flapjacks
- Replies: 118
- Views: 30315
problem 120
My program works on all my tests but gets the WA . Please help me to fix the mistakes.
This is my code
[pascal]program n120;
var
stk : array[1..1000] of integer;
operators : array[1..10000] of integer;
len : integer;
max : integer;
ready : integer;
maxissue : integer;
i : integer ...
This is my code
[pascal]program n120;
var
stk : array[1..1000] of integer;
operators : array[1..10000] of integer;
len : integer;
max : integer;
ready : integer;
maxissue : integer;
i : integer ...
- Wed Dec 31, 2003 12:09 pm
- Forum: Volume 7 (700-799)
- Topic: 729 - The Hamming Distance Problem
- Replies: 54
- Views: 21449
- Sun Dec 28, 2003 2:59 pm
- Forum: Volume 7 (700-799)
- Topic: 732 - Anagrams by Stack
- Replies: 17
- Views: 16308
732 why time limit Exceeded
this is my source
[pascal]program n732;
var
comand : string;
i,j : integer;
n : integer;
s1,s2 : string;
comands : array[1..100000] of string;
qual : integer;
procedure getnext;
var
i,j,sc : integer;
begin
i := n*2;
while (i > 1) and (comand[i-1]+comand[i] <>'oi') do dec(i);
comand[i-1 ...
[pascal]program n732;
var
comand : string;
i,j : integer;
n : integer;
s1,s2 : string;
comands : array[1..100000] of string;
qual : integer;
procedure getnext;
var
i,j,sc : integer;
begin
i := n*2;
while (i > 1) and (comand[i-1]+comand[i] <>'oi') do dec(i);
comand[i-1 ...
- Sat Dec 27, 2003 9:57 pm
- Forum: Volume 2 (200-299)
- Topic: 231 - Testing the CATCHER
- Replies: 53
- Views: 24580
I got ACCEPTED
i made some changes
read -> readln
and
heights[i,2] := max -> heights[i,2] := heights[i,2] + max
and got accepted
read -> readln

and
heights[i,2] := max -> heights[i,2] := heights[i,2] + max
and got accepted
- Fri Dec 26, 2003 8:03 pm
- Forum: Volume 2 (200-299)
- Topic: 231 - Testing the CATCHER
- Replies: 53
- Views: 24580
231
Why WA ?
This is my source
program n231;
type
tpair = array[1..2] of integer;
var heights : array[1..3000000] of tpair;
i,j : integer;
n : integer;
temp : integer;
max,testnr : integer;
begin
testnr := 1;
{assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite ...
This is my source
program n231;
type
tpair = array[1..2] of integer;
var heights : array[1..3000000] of tpair;
i,j : integer;
n : integer;
temp : integer;
max,testnr : integer;
begin
testnr := 1;
{assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite ...