Search found 50 matches

by razibcse
Fri Jan 30, 2004 8:29 pm
Forum: Volume 7 (700-799)
Topic: 713 - Adding Reversed Numbers
Replies: 142
Views: 39875

To Raiyan Kamal: I got AC. here are some sample inputs and outputs. Hope these will help you. Input: 100 200 999999999999999 1 00010 9 1 9 1 9 5 5 456 654 0 0 Output: 3 1 9001 1 1 1 111 0 But the preoblem statement said, Also note that the reversed number never has any trailing zeros. So when you us...
by razibcse
Sat Dec 13, 2003 9:26 pm
Forum: Other words
Topic: Please stop this rejudgement rate
Replies: 25
Views: 5866

Yes!!! Stop it.

Yes, I completely agree with PdR. What's the rejudgement hell is this? Last 3 days, 3 of my solved problems are excluded after rejudging. I solved them long ago. Is it reasonable to rejudge the solutions so late? What we are supposed to do? Thinking about new problems or trying to understand what's ...
by razibcse
Thu Nov 06, 2003 4:57 pm
Forum: Volume 5 (500-599)
Topic: 562 - Dividing coins
Replies: 73
Views: 29671

I just can't understand why this program gets WA always...I checked all possible inputs which came to my mind,but no bug was found... I tried to generate all possible numbers that can be made using the coins and set the flag of these numbers to 1. then I checked for the number which is half of the s...
by razibcse
Sun Oct 26, 2003 8:48 pm
Forum: Algorithms
Topic: Segmented Sieve
Replies: 6
Views: 2239

Segmented Sieve

I found that segmented sieve can be used to find large primes and it's more time & space efficient than the conventional one...but I didn't find any implementation or explanation...can somebody explain this method to me please...

Razib :roll:
by razibcse
Mon Oct 13, 2003 9:16 pm
Forum: Volume 105 (10500-10599)
Topic: 10533 - Digit Primes
Replies: 108
Views: 31213

Can you guys tell me, why on earth this program gets RTE(Floating point Exception)...I am totally depressed seeing this message again & again...

please someone help me out...

At last I got AC...I had to change my prime generating function...

thanks guys

Code: Select all

Deleted
Razib
by razibcse
Sun Oct 12, 2003 9:20 pm
Forum: Algorithms
Topic: Need help on prime numbers
Replies: 7
Views: 2632

thanx guys for your suggestions... actually I got AC on 10200 already...Just had to pre-calculate the primarility...I knew this approach, but wanted to know about any other faster method that can be implemented in THIS TYPE of problems... and about probabilistic methods, I solved quite a few problem...
by razibcse
Sat Oct 11, 2003 9:03 pm
Forum: Algorithms
Topic: Need help on prime numbers
Replies: 7
Views: 2632

actually I use the sieve method to generate primes...but in this case,the maximum range is 10000,which yields 10000^2+10000+41,which is really big...how can I test this is prime or not... and with sieve method, you can generate primes upto 65000..then how do you produce primes??? and dividing the nu...
by razibcse
Sat Oct 11, 2003 11:28 am
Forum: Algorithms
Topic: Need help on prime numbers
Replies: 7
Views: 2632

Need help on prime numbers

Is there any other reliable method of finding whether a number is prime or not than the traditional method? The system of dividing a number by all the primes less than its square root is too time consuming. Say, in 10200, when you want to find the number of primes between a certain range. If I preca...
by razibcse
Mon Oct 06, 2003 9:23 pm
Forum: Volume 105 (10500-10599)
Topic: 10530 - Guessing Game
Replies: 57
Views: 27478

this easy problem is really bugging me..I can't find where's my mistake...the output for the samples given here is correct in my program.

could u guys give me some more inputs u think may cause WA..

thanx anyway...

Razib
by razibcse
Sat Apr 26, 2003 8:39 pm
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 25599

I followed the same ascending order as u guys..but getting WA... I don't find any error in my code..one problem may be in determining the factorial of the length of the string... I didn't find statement about what's the maximum size of the string.. please explain it to me...I used double to calculat...
by razibcse
Tue Apr 22, 2003 9:04 pm
Forum: Volume 104 (10400-10499)
Topic: 10464 - Big Big Real Numbers
Replies: 10
Views: 4244

Finally I got it right

I am getting RTE for this..I couldn't figure out why... please help me to find my mistake..I have matched all the answers in the special cases given here.... are extra spaces there in the input number?The problem says: First line of the input is a non negative integer N. Next N line follows a pair o...
by razibcse
Sun Apr 20, 2003 8:52 pm
Forum: Volume 104 (10400-10499)
Topic: 10474 - Where is the Marble?
Replies: 50
Views: 19099

Hi, I thought it was really an easy problem. But I am getting RTE.The problem statement said, Be assured, none of the input numbers are greater than 10000 and none of them are negative. What does it mean? is the maximum size of the number array 10000? I made this upto 900000, but same result... Can ...
by razibcse
Wed Apr 16, 2003 8:22 pm
Forum: Volume 4 (400-499)
Topic: 469 - Wetlands of Florida
Replies: 63
Views: 20863

I am getting Runtime error... can't understand why? is the process of my taking input is wrong? Here's my code... #include <stdio.h> #include <string.h> #include <ctype.h> #define MAX 120 long Q[MAX*MAX][2],r,c,nr,nc,i_max,j_max,head,tail; long N,test,grid[MAX][MAX],visited[MAX][MAX]; char str[MAX][...
by razibcse
Mon Apr 14, 2003 9:15 am
Forum: Volume 100 (10000-10099)
Topic: 10009 - All Roads Lead Where?
Replies: 60
Views: 14135

thanx man for ur help...
actually my word size was too small...so I was getting WA..

I fixed it & got AC..

thanx again for ur assistance
by razibcse
Wed Apr 09, 2003 8:39 pm
Forum: Volume 100 (10000-10099)
Topic: 10009 - All Roads Lead Where?
Replies: 60
Views: 14135

someone pls see the code and tell me what to do to prevent WA..

i din't find any mistake..

is there some special input?

Go to advanced search