## Search found 12 matches

- Sun Nov 23, 2003 12:52 am
- Forum: Volume 4 (400-499)
- Topic: 465 - Overflow
- Replies:
**104** - Views:
**26797**

There is an input for which most of the people get WA ! I have corrected many person's code by giving this input. I am giving it here, if any body need more help, then write here, in future i will help again. 2147483648 + -1 Yes, it is possible :o . Just try it with your code. First number is too bi...

- Sat Nov 22, 2003 6:17 am
- Forum: Volume 5 (500-599)
- Topic: 583 - Prime Factors
- Replies:
**171** - Views:
**41561**

### 583

Here is my code. Please help me ! I am totally confused about this TLE ! :oops: [cpp]#include<stdio.h> #include<math.h> #define max 2000000 char prime[max+10]; long PRIME[90000]; /*int isprime(long n) { long i; for(i=2;i<=sqrt(n);i++) { if(n%i==0) return 0; } return 1; }*/ void find_prime() { long i...

- Wed Nov 19, 2003 12:23 pm
- Forum: Volume 5 (500-599)
- Topic: 583 - Prime Factors
- Replies:
**171** - Views:
**41561**

Hi raymond85 ! I tried to solve this problem and faced the same problem that u faced. I use sieve method to find the primes from 2 to 20000000. then for bigger prime i use 'sqrt' method. My code can run quite nice in my PC for large input. such as (2^31)-1 :-) but i got TLE. Why ? can u help me to s...

- Wed Nov 19, 2003 12:15 pm
- Forum: Volume 5 (500-599)
- Topic: 583 - Prime Factors
- Replies:
**171** - Views:
**41561**

- Wed Nov 19, 2003 12:11 pm
- Forum: Volume 5 (500-599)
- Topic: 583 - Prime Factors
- Replies:
**171** - Views:
**41561**

- Wed Nov 19, 2003 12:01 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10049 - Self-describing Sequence
- Replies:
**33** - Views:
**14146**

### Thanks friend.

Thanks friend for giving me the formula. I haven't yet tried. If i get accepted, i will informe you.

Niaz

Niaz

- Mon Nov 17, 2003 10:02 am
- Forum: Volume 100 (10000-10099)
- Topic: 10035 - Primary Arithmetic
- Replies:
**328** - Views:
**66798**

- Mon Nov 17, 2003 9:52 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies:
**1394** - Views:
**212209**

- Mon Nov 17, 2003 9:47 am
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies:
**635** - Views:
**55751**

When we run our program in TC we usually don't get runtime error. If we compile our code in gcc then we can easily find the problem. Please compile ur code in gcc and then look what it says. Another thing for run time error is to access wrong area such as str = '0' [ but i = -1] or if we what to acc...

- Mon Nov 17, 2003 9:39 am
- Forum: Volume 100 (10000-10099)
- Topic: 10041 - Vito's Family
- Replies:
**90** - Views:
**32418**

### Algo

One of the important property of the median is the distance from any median (in case of even we get two medians) to each element is equal. So u need not to find the distance from each median or from the mean of the median. I have seen that many persons tried to find the mean in the median :D So don'...

- Sun Nov 16, 2003 7:18 am
- Forum: Volume 100 (10000-10099)
- Topic: 10049 - Self-describing Sequence
- Replies:
**33** - Views:
**14146**

### 10049

I am really confused with this problem. I have read the previous posts at the board but i could not find the besic thing i,e the formula . Is there any one can tell me about the formula and the way to solve it (if can). Thanks in advance.

- Sun Nov 09, 2003 7:48 pm
- Forum: Volume 8 (800-899)
- Topic: 861 - Little Bishops
- Replies:
**33** - Views:
**21836**

### 861

Any one can help me saying a formula for this problem ? Thanks in advance