## Search found 107 matches

- Sat Jan 12, 2019 12:06 am
- Forum: Recreational
- Topic: Some problem and user statistics
- Replies:
**4** - Views:
**1242**

### Re: Some problem and user statistics

What about the number of the best placements per person (ordered like in the olympic games)? 1. xyz (50 times 1st) 2. abc (26 times 1st) ... 19. dfg (40 times 2nd) ... Many of these statistics are interesting - but they are only as half as interesting, if you can not find your self in it. :wink: And...

- Wed Jan 02, 2019 11:28 pm
- Forum: News, Suggestions, and FAQ
- Topic: Code optimization techniques
- Replies:
**20** - Views:
**3298**

### Re: Code optimization techniques

I just changed your output so for each return, the current n is reported: -> the return is called twice as it's called by different function calls. For example fib(2) (the 4th call of fib) is startet, but it is still in progress until the result of fib(0) is returned. lookup[] = [-1, -1, -1, -1, -1,...

- Wed Jan 02, 2019 12:48 am
- Forum: News, Suggestions, and FAQ
- Topic: Code optimization techniques
- Replies:
**20** - Views:
**3298**

### Re: Code optimization techniques

It's only the return section of the previously called functions: The first calls of fib(5), fib(4), fib(3) and fib(2) did not immediately return - they need to call fib(n-1) and fib(n-2) first. So read it as follows: Stack: fib(5) (A.1) Call fib(5) -> nothing known; call fib(4) and fib(3) Stack: A T...

- Fri Dec 14, 2018 11:14 pm
- Forum: Discrete Mathematics
- Topic: Sorting...
- Replies:
**4** - Views:
**1576**

### Re: Sorting...

There is the problem of the handling of entries with equal values. So your "ArraySort" is not an algorithm for sorting, but for the mathematical union-sort operation. The algorithm of Array.sort() is not specified by the language it self: It can differ by the implementation - for primitive types, th...

- Wed Sep 12, 2018 5:10 am
- Forum: News, Suggestions, and FAQ
- Topic: New Language
- Replies:
**2** - Views:
**2171**

### Re: New Language

viewtopic.php?f=49&t=2903&p=31055&hilit ... ipt#p31055

It is already there.

It is already there.

- Thu Aug 23, 2018 8:03 pm
- Forum: Programming languages
- Topic: which compiler to use for c++ programs
- Replies:
**2** - Views:
**1852**

### Re: which compiler to use for c++ programs

You should clarify it: Do you mean websites?

Most of us use an installed compiler:

gcc, visual studio c++, intel or llvm

Most of us use an installed compiler:

gcc, visual studio c++, intel or llvm

- Tue Aug 21, 2018 9:20 pm
- Forum: Clarifications on Project Euler Problems
- Topic: Problem 113
- Replies:
**1** - Views:
**332**

### Re: Problem 113

Yes - bouncing is stated clearly as neither increasing nor decreasing.

- Sun Aug 19, 2018 9:32 pm
- Forum: Clarifications on Project Euler Problems
- Topic: Problem 039
- Replies:
**11** - Views:
**2428**

### Re: Problem 039

Right angle triangle should be clear enough. Only 1 angle of a degenerated triangle can be determined exactly: 0° between the two identical sides. The other two angles are undetermined. In any problem description, corner cases are named extra. (Integer 0, degenerated polygons,...) But this does not ...

- Thu Aug 09, 2018 11:25 pm
- Forum: Number Theory
- Topic: An Infinite Prime Number Generator
- Replies:
**5** - Views:
**2229**

### Re: An Infinite Prime Number Generator

For sure, mod 6 will have a better performance than mod 2 -> the speedup is around 1.4 ... 1.5 and for mod 30, we will have a speedup of 1.8 in comparison to mod 2. It is possible to optimize the performance of the higher versions as mod 6. But the max performance (n/2)/EulerPhi(n), which is only hi...

- Thu Aug 09, 2018 8:00 am
- Forum: Number Theory
- Topic: An Infinite Prime Number Generator
- Replies:
**5** - Views:
**2229**

### Re: An Infinite Prime Number Generator

I don't know how the checks will be compiled, but I think, there is a hidden complexity in the loop checking: e.g. res = k + step while res in D or res % 30 not in (1, 7, 11, 13, 17, 19, 23, 29): You iterate through all (uneven) multiples - even if you don't store them, but in the case mod 6, you on...

- Sun Aug 05, 2018 12:47 pm
- Forum: News, Suggestions, and FAQ
- Topic: Problem with progress badge?
- Replies:
**2** - Views:
**1718**

### Re: Problem with progress badge?

The graphic is not updated immediately after a problem is solved and sometimes, the browser cache stores an old version.

So: try to view the picture in 1 hour and reload it without cache (Ctrl + F5 in most browsers).

So: try to view the picture in 1 hour and reload it without cache (Ctrl + F5 in most browsers).

- Mon Jul 09, 2018 10:21 am
- Forum: Number
- Topic: an old maths olympiad question
- Replies:
**27** - Views:
**4663**

### Re: an old maths olympiad question

If n>3, there is no integer solution:

a = (n-2)/n * pi

1/1 = 1/(2-2cos(a)) + 1/(3-2cos(2a-pi))

-> n = 13.757

a = (n-2)/n * pi

1/1 = 1/(2-2cos(a)) + 1/(3-2cos(2a-pi))

-> n = 13.757

- Mon Jul 09, 2018 8:30 am
- Forum: Number
- Topic: an old maths olympiad question
- Replies:
**27** - Views:
**4663**

### Re: an old maths olympiad question

3-sided:

A1A2 = A1A3 = A2A3 = 1 = S

And if A4 didn't exist, A1A4 = infinity

-> 1/1 = 1/1 + 1/infinity ...

-> 1 = 1 + 0

The usage of capital letters is typical for Points, small letters are used for lengths.

A1A2 = A1A3 = A2A3 = 1 = S

And if A4 didn't exist, A1A4 = infinity

-> 1/1 = 1/1 + 1/infinity ...

-> 1 = 1 + 0

The usage of capital letters is typical for Points, small letters are used for lengths.

- Tue May 29, 2018 5:56 am
- Forum: Clarifications on Project Euler Problems
- Topic: Problem 396
- Replies:
**5** - Views:
**1392**

### Re: Problem 396

Read carefully:

The second one is just a less not a less-equalIt can also be verified that SumG(n) = 2517 for 1 <= n < 8.

- Wed May 16, 2018 11:16 pm
- Forum: Number
- Topic: Decimal expansion = Continued fraction
- Replies:
**1** - Views:
**1794**

### Re: Decimal expansion = Continued fraction

Just my thoughts:

If you use the strict definition of continued fractions, there is no more number with more than a(=any integer) and b=3.

But if you allow any of the digits of the continued fraction to be 0, then the search is much more complicated...

If you use the strict definition of continued fractions, there is no more number with more than a(=any integer) and b=3.

But if you allow any of the digits of the continued fraction to be 0, then the search is much more complicated...

- Wed May 02, 2018 9:25 pm
- Forum: Combinatorics
- Topic: Container Packing Problem
- Replies:
**5** - Views:
**2082**

### Re: Container Packing Problem

If you have a layer with e.g. the left two elements going to the next layer, then the next layer has to be of a special kind: Option 1: there is 1 element in the layer on the right side. Option 2: there are 2 elements on the right side going to the next-next layer. The 2 places at the left side are ...

- Tue May 01, 2018 9:30 pm
- Forum: Combinatorics
- Topic: Container Packing Problem
- Replies:
**5** - Views:
**2082**

### Re: Container Packing Problem

4541161 Try to solve it layer by layer. I checked the options for a 2x2 layer (At which of the 4 positions the cuboid connects the current and the next layer) Only 6 types of the 16 layer types are relevant. And after this: Matrix multiplication n(12) times. If mirror and rotation should not count, ...

- Mon Apr 16, 2018 10:14 am
- Forum: Clarifications on Project Euler Problems
- Topic: Problem 084
- Replies:
**29** - Views:
**7487**

### Re: Problem 084

Why not? A lot of problems here need a little pre-knowledge or understanding of the topic. In any geometric problem, the term for parallel isn't explicit stated. One of the most popular games shouldn't be a problem here. All relevant rules are stated in the problem description. There is no need to p...

- Sat Jan 13, 2018 11:28 am
- Forum: Clarifications on Project Euler Problems
- Topic: Problem 617
- Replies:
**6** - Views:
**1384**

### Re: Problem 617

They all have a different beginning.

You may try brute force all n, a_0 and e (2...6) smaller than 100.

You may try brute force all n, a_0 and e (2...6) smaller than 100.

- Mon Dec 25, 2017 12:13 am
- Forum: Recreational
- Topic: Best sort
- Replies:
**12** - Views:
**3245**

### Re: Best sort

Unless a predictable randomness, O(n*log n) is the necessary time for sorting. O(n) can only be achieved if the sequence has a defined order. It doesn't matter if there are all the numbers in randomized order (I would assume from the description) or 1 million random numbers (up to 1million). So my a...