Search found 7 matches

by gates1
Wed Jul 25, 2007 8:06 pm
Forum: Off topic (General chit-chat)
Topic: i need problems
Replies: 1
Views: 30541

i need problems

i need bfs problems and easy backtracking problems...


sorry for poor english
by gates1
Sun May 06, 2007 12:04 pm
Forum: Volume 6 (600-699)
Topic: 628 - Passwords
Replies: 14
Views: 13709

can anybody say me what is wrong with my code, i got wa

var s,s1:string;
b:array[1..1000] of string;
i,j,n1,n,k,z,l:integer;
begin
repeat
readln(n);
writeln('--');
for i:=1 to n do
readln(b[i]);
readln(n1);
for i:=1 to n1 do begin
readln(s1);
for l:=1 to n do
for k:=0 to 9 do begin
for j:=1 to ...
by gates1
Fri May 04, 2007 8:44 am
Forum: Volume 4 (400-499)
Topic: 489 - Hangman Judge
Replies: 52
Views: 23885

i got WA can anybody help me plzzzzz

var a:array[1..100000] of byte;
b:array[1..100000] of integer;
i,e,h,k,l,p:integer;
s,g,s1:string;
begin
repeat
readln(e);
if e>0 then begin
inc(h);
b[h]:=e;
readln(s);
readln(g);
l:=0;
p:=0;
s1:='';
for i:=1 to length(g) do begin
k:=0;
while pos(g[i],s ...
by gates1
Tue May 01, 2007 8:44 pm
Forum: Volume 4 (400-499)
Topic: 490 - Rotating Sentences
Replies: 212
Views: 48190

please help me, this is WA

Code: Select all

var n,i,max:integer;
s:string;
a:array[1..100]of string;
begin
repeat
readln(s);
if length(s)>max then max:=length(s);
for i:=1 to length(s) do
a[i]:=a[i]+s[i];
until eof;
for i:=1 to max do
writeln(a[i]);
readln;
end.
by gates1
Tue May 01, 2007 8:31 pm
Forum: Volume 4 (400-499)
Topic: 440 - Eeny Meeny Moo
Replies: 18
Views: 4195

what's wrong in this, i getting WA

var a:array[1..100] of shortint;
b:array[1..100] of byte;
i,j,u,z,k,n,r,l:longint;
begin
b[1]:=1;
repeat
inc(i);
readln(a[i]);
until a[i]=0;
n:=i-1;
for i:=1 to n do begin
r:=a[i];
j:=1;
repeat
inc(j);
l:=1;
k:=1;
for z:=2 to r do
b[z]:=0;
repeat
u:=0;
repeat ...
by gates1
Tue May 01, 2007 4:33 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318350

rocky's test cases work on my program
by gates1
Tue May 01, 2007 2:13 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318350

can anybody help me

i always get wa, here is my code:

var n,k:array[1..100000] of longint;
i,j,max,p,k1,f:longint;
function nn(a:longint):integer;
begin
p:=0;
while a<>1 do begin
if a mod 2=0 then a:=a div 2 else a:=(3*a)+1;
inc(p);
end;
nn:=p;
end;
begin
i:=0;
repeat
inc(i);
read(n[i],k[i ...

Go to advanced search