## Search found 30 matches

Thu Jun 01, 2006 10:03 am
Forum: Pascal
Topic: hello
Replies: 3
Views: 8980
Mon Apr 03, 2006 10:59 am
Forum: Volume 102 (10200-10299)
Topic: 10252 - Common Permutation
Replies: 150
Views: 53607
I think your program get SigSeg somewhere and so, it got TLE. Try to replace memset with a for loop which set all the elements of an array. I am not sure about how memset in C/C++ do.
Thu Mar 30, 2006 9:58 am
Forum: Volume 102 (10200-10299)
Topic: 10252 - Common Permutation
Replies: 150
Views: 53607
try to change
char lCase1[1001] = {0,};
char lCase2[1001] = {0,};
In checkMap, you go till a 0 is meeted, what if the inputs string's length are exactly 1000. you missed the trailing 0.
Thu Mar 30, 2006 9:20 am
Forum: Other words
Topic: Dynamic Programming (a tough one)
Replies: 2
Views: 2089
Let T(n,s) be the number of cases in which sum of n numbers (all less than 10) are eqaul to S. It is not hard to find a recursive descripton for T(n+ 1,s). Let T(n,s) be the number of cases in which sum of n numbers (all less than 10) are eqaul to S and the first number is non-zero. T'(n,s) can be e...
Tue Mar 28, 2006 1:06 pm
Forum: Volume 102 (10200-10299)
Topic: 10299 - Relatives
Replies: 57
Views: 14895
one of your code problem is that num must be longint,
because, the problem states that n<1000000000.
Sat Nov 13, 2004 3:40 pm
Forum: Volume 102 (10200-10299)
Topic: 10212 - The Last Non-zero Digit.
Replies: 63
Views: 31679
dear Riyad I dont think your code has any chance for getting accepted :wink: becuase you want to avoid having 0 by using , mult=mult%100000; which when i> 100000 , for example i=1000000> 20000000 then mult will be 0 and ... also in your while where x= mult%10, i cant understand why you use a loop, ?...
Sun Jul 04, 2004 6:14 am
Forum: Volume 101 (10100-10199)
Topic: 10146 - Dictionary
Replies: 8
Views: 4372
hi every one.
could you please tell me what is output for the following input
1

a
ab
abc
abd
abcd

is it
a
.ab
..abc
..abd
..abcd

or

a
.ab
..abc
..abd
...abcd <-

thanks
Amir
Sat Jun 05, 2004 6:32 am
Forum: Volume 101 (10100-10199)
Topic: 10162 - Last Digit
Replies: 21
Views: 8864
hi dear i afraid your program has problem with n> 100. that is correct that i^i= (i+ 100)^ (i+ 100) but note that you want to calculate the sum of this numbers. so i think you must at first find the last digit of (n div 100) (call it as a) and also n mod 100 (and call it as b). and let c and d be c:...
Wed Jun 02, 2004 9:10 am
Forum: Volume 101 (10100-10199)
Topic: 10139 - Factovisors
Replies: 80
Views: 27982
dear htl
consider the case where m has a prime factor which is bigger than Sqrt (2^31).
i think in these cases your code is wrong
Tue Jun 01, 2004 8:00 am
Forum: Pascal
Topic: How to configure RHIDE to use fpc!
Replies: 1
Views: 5133

### How to configure RHIDE to use fpc!

hi to all pascal lover! I looking for an IDE in linux to compile and and debug my pacal programs. I searched a lot but I can't find anything usefull except one IDE in FreePascal home page. but I can't compile it because it needs to a unit that isn't available for public. After sometime I found RhIDE...
Tue May 18, 2004 1:50 pm
Forum: Volume 101 (10100-10199)
Topic: 10140 - Prime Distance
Replies: 17
Views: 7437
hi

if you read the problem more carefully, you can see that the problem says , |L- U|< 1000000.
i means that you must do Sieve of Eratosthenes on an array with maximum length of 1000000.
Mon May 10, 2004 9:24 am
Forum: Volume 101 (10100-10199)
Topic: 10190 - Divide, But Not Quite Conquer!
Replies: 105
Views: 24822
may be your problem is in log function ( i mean that floating point error). why you don't devide a by n in your while and check if new a is a devisor of n. something like this: i:= 0; while (a mod n= 0) do begin Inc (i); No := a div n; a:= a div n; end; if a= 1 then for i:= 1 to i do Write (No ) els...
Sun Apr 11, 2004 9:13 pm
Forum: Volume 100 (10000-10099)
Topic: 10044 - Erdos Numbers
Replies: 102
Views: 40692
Dear Shamim
As I know there is n't any polynominal time alg for graph vertex coloring,
and this problem could be converted to a vertex coloring problem!!
I cant understand what do you mean by an alg les than O (n2).
Tue Apr 06, 2004 8:28 am
Forum: Volume 100 (10000-10099)
Topic: 10021 - Cube in the labirint
Replies: 17
Views: 4035
I think I solve the problem correctly but getting WA.
I want to know what is the lower point of the board. is it (0, 0) or (1, 1) or no limit?
thnx
Sat Apr 03, 2004 7:59 am
Forum: Pascal
Topic: can i use class in my programs
Replies: 1
Views: 5115

### can i use class in my programs

hi to all,
i want to know if there is any object pascal compiler in linux.
as you know BP 7.0 supports object pascal and we can define class in it.
i search the web but i cant find anything (maybe because of wrong keyword in search).