## Search found 67 matches

- Wed Aug 04, 2004 1:41 am
- Forum: Volume 7 (700-799)
- Topic: 725 - Division
- Replies:
**49** - Views:
**19548**

- Sat Jul 24, 2004 5:41 pm
- Forum: Volume 7 (700-799)
- Topic: 702 - The Vindictive Coach
- Replies:
**5** - Views:
**7893**

It means that: a) If the captain is the shortest player on the team, then the second shortest should be next to him and the pattern should be taller-shorter-taller-shorter-etc. b) If the captain is not the shortest player, then anyone shorter than him can be next to him and the pattern should be sho...

- Sun Jul 11, 2004 10:21 pm
- Forum: Volume 6 (600-699)
- Topic: 632 - Compression (II)
- Replies:
**13** - Views:
**5394**

### 632 - Compression (II)

The string can have spaces. That irked me. Don't let it irk you.

- Wed Jun 30, 2004 4:31 pm
- Forum: Volume 4 (400-499)
- Topic: 430 - Swamp County Supervisors
- Replies:
**8** - Views:
**3173**

- Sun May 30, 2004 1:22 am
- Forum: Volume 3 (300-399)
- Topic: 318 - Domino Effect
- Replies:
**12** - Views:
**7640**

- Sat May 15, 2004 6:36 am
- Forum: Volume 1 (100-199)
- Topic: 196 - Spreadsheet
- Replies:
**42** - Views:
**9938**

- Thu May 13, 2004 8:04 am
- Forum: Volume 2 (200-299)
- Topic: 209 - Triangular Vertices
- Replies:
**51** - Views:
**6911**

- Sat May 01, 2004 12:53 pm
- Forum: Volume 1 (100-199)
- Topic: 180 - Eeny Meeny
- Replies:
**34** - Views:
**9623**

Lets say that there are N people in the line and we want to remove every Kth one (in the problem K is always 15) until the last one, F(N), is left. So to start with the line looks like: 1, 2, 3, 4, ... N Ok, so take out the Kth one and it looks like this: K+1, K+2, K+3,.... N, 1, 2, 3, ... K-2, K-1 ...

- Sat Apr 10, 2004 3:19 am
- Forum: Volume 2 (200-299)
- Topic: 285 - Crosswords
- Replies:
**16** - Views:
**9163**

This is what I'm doing, and it's wrong but I don't know why: a) Build the actual crossword solution as a two dimentional matrix of characters, rembering the size of the matrix b) create a string from that matrix by treating each row as a string and concatenating rows c) removing all spaces from this...

- Wed Apr 07, 2004 8:57 am
- Forum: Volume 6 (600-699)
- Topic: 661 - Blowing Fuses
- Replies:
**67** - Views:
**20055**

- Fri Aug 15, 2003 2:27 am
- Forum: Volume 1 (100-199)
- Topic: 138 - Street Numbers
- Replies:
**93** - Views:
**6975**

### A simple property

I'll assume that you realize that this problem is equivalent to finding a pair (k,n) such that 2*k^2 = n(n+1). Once you have this the obvious solution is to just iterate through values of n (or of k) and solve for the other, checking to see if it is an integer. Of course it's equally obvious that th...

- Fri Aug 15, 2003 2:02 am
- Forum: Volume 1 (100-199)
- Topic: 138 - Street Numbers
- Replies:
**93** - Views:
**6975**

### A simple property

I'll assume that you realize that this problem is equivalent to finding a pair (k,n) such that 2*k^2 = n(n+1). Once you have this the obvious solution is to just iterate through values of n (or of k) and solve for the other, checking to see if it is an integer. Of course it's equally obvious that th...

- Sat Jul 12, 2003 5:28 pm
- Forum: Volume 1 (100-199)
- Topic: 117 - The Postal Worker Rings Once
- Replies:
**58** - Views:
**16273**

Except that the priority_queue doesn't have an update operation, so you lose the efficiency that dijkstra's provides. Ways to work around that would be to use the make_heap and then just write a little fix_heap operation, or perhaps do some wacky stuff with multisets. Any way you slice it, it's not ...

- Sat Jul 12, 2003 9:16 am
- Forum: Volume 1 (100-199)
- Topic: 117 - The Postal Worker Rings Once
- Replies:
**58** - Views:
**16273**

### 117 Good idea.

Euler (Yes, the same as the one mentioned in the background) proved a theorem about graphs. And it's one that any computer scientist could prove with a little graph theory and much thought (the amazing thing is that Euler proved it without having any graph theory, for he was the one to invent it). I...

- Sat Jul 12, 2003 2:01 am
- Forum: Volume 1 (100-199)
- Topic: 106 - Fermat vs. Pythagoras
- Replies:
**138** - Views:
**11920**

### Triples in the second example

Here are the triples that count (x, y, and z are ALL less than or equal to 25)(( I have them separated into groups that are multiples)) 3,4,5 6,8,10 9,12,15 12,16,20 15,20,25 8,15,17 5,12,13 7,24,25 Since there are four such groups, the first number in the output should be 4 Now, take a look at all ...