## Search found 34 matches

- Tue Mar 23, 2004 10:52 am
- Forum: Algorithms
- Topic: Distance between two convex poligons - help me
- Replies:
**1** - Views:
**1071**

### Distance between two convex poligons - help me

There are 2 convex poligons (coord. are integer numbers) and I need to calculate the minimum distance between them. Who can give me some ideas????

- Mon Jul 07, 2003 7:56 am
- Forum: Volume 100 (10000-10099)
- Topic: 10049 - Self-describing Sequence
- Replies:
**33** - Views:
**13462**

### 10049 - Self-describing Sequence

Who can give me some ideas to solve this problem... I foud some information about this sequance of numbers that are called "Golomb's sequence". I know that the formulas for this sequance: "a(n) is nearest integer to (and asymptotic to) tau^(2-tau)*n^(tau-1), where tau is the golden number (1+sqrt(5)...

- Sat Jun 28, 2003 7:01 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10016 - Flip-Flop the Squarelotron
- Replies:
**5** - Views:
**3080**

- Fri Apr 04, 2003 6:34 pm
- Forum: Volume 5 (500-599)
- Topic: 545 - Heads
- Replies:
**67** - Views:
**44576**

- Fri Apr 04, 2003 12:28 pm
- Forum: Volume 5 (500-599)
- Topic: 545 - Heads
- Replies:
**67** - Views:
**44576**

- Thu Apr 03, 2003 2:59 pm
- Forum: Volume 5 (500-599)
- Topic: 545 - Heads
- Replies:
**67** - Views:
**44576**

### 545 WA - 474 AC Who can help me???

Pls. tell me what's wrong with my code. I get WA but for 474 problem I got AC I modified the code so it round the result now, that means that for n=6 I obtain 1.563E-2, and for n=7 => 7.813E-3... [cpp] #include <stdio.h> #include <math.h> main() { long n; double u,a,l2; long b; l2=log10((double)2); ...

- Wed Mar 26, 2003 1:31 pm
- Forum: Volume 5 (500-599)
- Topic: 531 - Compromise
- Replies:
**73** - Views:
**26819**

Can you give me more input (and of course output) sample for this problem? I tried an DP algorithm but I received WA. I think that it's something tricky. How long must be the arrays because maybe this is an other problem... Is is ok with: type vect=array[1.100] of string[30]; var x,y,z:vect; j,i,n,m...

- Fri Feb 28, 2003 7:47 am
- Forum: Volume 4 (400-499)
- Topic: 414 - Machined Surfaces
- Replies:
**49** - Views:
**9460**

Can you tell me what's wrong with my code. I verified with all this input and it works... The idea is that I calculate the sum of all spaces (sum) and the minimum number of the spaces in a line (min). The oputput is then sum-n*min... Is it ok??? [pascal] program p414; var s:string; sum:longint; n,mi...

- Tue Jan 28, 2003 8:35 am
- Forum: Volume 100 (10000-10099)
- Topic: 10025 - The ? 1 ? 2 ? ... ? n = k problem
- Replies:
**42** - Views:
**12194**

so S1=n(n+1)/2 D1=S1-S S2=(n+1)(n+2)/2 D2=S2-S S3=(n+2)(n+3)/2 D3=S3-S => d1/2 < N+1 d2/2 < (2N+1)/2 < N+1 d3/2 < (3N+3)/2 <=2N+3=(N+1)+(N+2 ) a) if D1 is even => exist k between 0 and N so that D1/2 =k (we saw that D1/2 < N/2) => S1-S=2k S1-2k=S 1+2+...+(k-1)+k+(k+1)+...+N-2k=S 1+2+...+(k-1)-k+(k+1...

- Tue Jan 21, 2003 9:00 am
- Forum: Volume 100 (10000-10099)
- Topic: 10025 - The ? 1 ? 2 ? ... ? n = k problem
- Replies:
**42** - Views:
**12194**

- Tue Jan 21, 2003 8:58 am
- Forum: Volume 100 (10000-10099)
- Topic: 10025 - The ? 1 ? 2 ? ... ? n = k problem
- Replies:
**42** - Views:
**12194**

- Tue Jan 21, 2003 8:05 am
- Forum: Volume 100 (10000-10099)
- Topic: 10025 - The ? 1 ? 2 ? ... ? n = k problem
- Replies:
**42** - Views:
**12194**

I deleted the code, I think you can understend why... but I'll try to explain my algorithm... 1. You find the smallest n in that way that 1+2+...+n >= s (where s is the input) For this you have to solve the equation in n: n^2 + n 0 2s = 0 => n= ceil( (sqrt(1+8s) -1)/2 ) 2. Now your solution is n or ...

- Thu Jan 16, 2003 2:11 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10025 - The ? 1 ? 2 ? ... ? n = k problem
- Replies:
**42** - Views:
**12194**

- Thu Jan 16, 2003 11:36 am
- Forum: Volume 100 (10000-10099)
- Topic: 10025 - The ? 1 ? 2 ? ... ? n = k problem
- Replies:
**42** - Views:
**12194**

- Wed Jan 15, 2003 7:01 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10025 - The ? 1 ? 2 ? ... ? n = k problem
- Replies:
**42** - Views:
**12194**