## Search found 51 matches

- Wed Nov 08, 2017 7:40 pm
- Forum: Discrete Mathematics
- Topic: Finding shortest subarray with given value: many queries
- Replies:
**2** - Views:
**5301**

### Finding shortest subarray with given value: many queries

Background I came across this interesting stack overflow question: https://stackoverflow.com/questions/47111546/finding-smallest-subarray-lengths-for-given-multiple-queries#comment81192683_47111546 Question There is an array n = 1 million in length containing positive integers. There are also n = 1...

- Sun Feb 21, 2016 1:12 pm
- Forum: Clarifications on Project Euler Problems
- Topic: Problem 548
- Replies:
**5** - Views:
**2326**

### Problem 548

Can you also give the value for g(1)?

I am not sure from the problem statement whether g(1) should be 0 or 1?

I am not sure from the problem statement whether g(1) should be 0 or 1?

- Tue Apr 28, 2015 9:40 pm
- Forum: News, Suggestions, and FAQ
- Topic: Errors/Warnings/Bugs
- Replies:
**525** - Views:
**105818**

### Re: Errors/Warnings/Bugs

I've just enjoyed solving problem 459 (after a year and a bit) but noticed a slightly curious thing when looking to see how quickly others had managed to solve it: The fastest solvers list for Problem 459 only mentions 61 people, while the archives page lists 114 people as having solved it. Is this ...

- Tue Aug 26, 2014 6:20 pm
- Forum: Game Theory
- Topic: Optimal strategy for a game on a binary tree
- Replies:
**0** - Views:
**6515**

### Optimal strategy for a game on a binary tree

I have been struggling to solve a problem from CodeForces involving the optimal strategy for a two player game played on a tree. (This is a problem from a finished contest - but no editorial has been published yet as far as I can see.) I have put a description of the problem on Stack Overflow http:/...

- Tue Mar 04, 2014 7:37 pm
- Forum: News, Suggestions, and FAQ
- Topic: Where's my badge? :)
- Replies:
**12** - Views:
**3822**

### Re: Where's my badge? :)

Incidentally, I notice that I have now lost my perfection badge

I guess the system spotted I have been getting lazy recently and not attempting many problems...

I guess the system spotted I have been getting lazy recently and not attempting many problems...

- Sat Dec 28, 2013 1:59 pm
- Forum: News, Suggestions, and FAQ
- Topic: Credits for Authors of problems
- Replies:
**7** - Views:
**2956**

### Credits for Authors of problems

I was just wondering whether it would be good to note somewhere who suggested each problem? It might show a bit of appreciation to those able to come up with the problems, and solvers might be able to start recognising the names of problem setters whose questions they enjoy, perhaps helping them whe...

- Sun Jan 13, 2013 7:50 pm
- Forum: News, Suggestions, and FAQ
- Topic: Posting solutions outside of Project Euler's site
- Replies:
**25** - Views:
**12473**

### Re: Posting solutions outside of Project Euler's site

For what it's worth, I would prefer there not be such limits before people can solve recent problems. If I recommend Project Euler to someone who wants to learn a new language then I suggest starting from the easiest problems, but if someone just wants to have fun and play with solving some mathemat...

- Sun Sep 16, 2012 5:09 pm
- Forum: Clarifications on Project Euler Problems
- Topic: problem 394
- Replies:
**7** - Views:
**2545**

### Re: problem 394

I wonder if you are thinking about the problem like a game where Jeff is choosing where to make the cuts? In this case you are correct, and Jeff can "win" the game on his first move by cutting off most of the cake. However, this is not the intention of the problem. It is better to think of it as a s...

- Mon Jun 11, 2012 9:00 am
- Forum: Recreational
- Topic: Have you written a program to write a program?
- Replies:
**7** - Views:
**4567**

### Re: Have you written a program to write a program?

I use this kind of metaprogramming quite often when I need to write in hardware description languages (such as Verilog or VHDL) because these languages are relatively verbose. However, my preferred direction is opposite to yours - I tend to write Python code to generate the RTL output. I find my met...

- Sat May 19, 2012 8:10 pm
- Forum: Applied Mathematics
- Topic: Physics Problem
- Replies:
**4** - Views:
**7920**

### Re: Physics Problem

One argument is that air resistance will increase non-linearly with speed, so the ball going through the trough might be expected to be faster and meet with more air resistance, and come out slower.

However, this is likely to be a negligible effect so probably the proper answer is something else?

However, this is likely to be a negligible effect so probably the proper answer is something else?

- Sun May 13, 2012 7:54 pm
- Forum: News, Suggestions, and FAQ
- Topic: how to add the solution
- Replies:
**1** - Views:
**2662**

### Re: how to add the solution

Welcome! In Project Euler you just need to submit the numerical answer not the code. Type the answer you found in the box labelled Answer. Type the 5 digit number shown in the image in the box labelled Confirmation Code. Press the Check button. You will then get a green tick (if the answer is right)...

- Wed Mar 28, 2012 1:46 pm
- Forum: Resources
- Topic: Resources for Programming Competitions?
- Replies:
**4** - Views:
**9304**

### Re: Resources for Programming Competitions?

There are some good tutorial articles at http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=alg_index . It is also worth reading the editorials for past competitions as these contain worked solutions for all their competition problems. http://apps.topcoder.com/wiki/display/tc/Algorithm+P...

- Sun Mar 18, 2012 2:37 pm
- Forum: Clarifications on Project Euler Problems
- Topic: Problem 376
- Replies:
**21** - Views:
**5463**

### Re: problem 376 clarification

I also misread the question initially so here is a clarification that would have helped me and I hope is not considered to spoil the question. Suppose A has a probability of 20% of winning, and a probability of 10% of losing, and there is a 70% probability of a draw. In this case A does NOT have a >...

- Sat Dec 31, 2011 7:15 pm
- Forum: Clarifications on Project Euler Problems
- Topic: Problem 050
- Replies:
**42** - Views:
**13441**

### Re: Project 50

The sum does not have to start with 2.

e.g. 7+11+13 = 31 would be another example.

e.g. 7+11+13 = 31 would be another example.

- Sat Dec 31, 2011 5:04 pm
- Forum: News, Suggestions, and FAQ
- Topic: Can't see new problem
- Replies:
**6** - Views:
**2746**

### Re: Can't see new problem

Works for me now.

- Sat Dec 31, 2011 4:24 pm
- Forum: News, Suggestions, and FAQ
- Topic: Can't see new problem
- Replies:
**6** - Views:
**2746**

### Re: Can't see new problem

Same for me, perhaps someone could post the problem here if they can see it?

- Tue Dec 06, 2011 10:20 pm
- Forum: Recreational
- Topic: Exceptionally difficult questions
- Replies:
**2** - Views:
**3057**

### Re: Exceptionally difficult questions

Thank you very much for your reply, this satisifes my curiosity. (Although I was kind of hoping that someone had suggested a problem (and worked solution) along the lines "What is the smallest N such that if the integers {1, 2, ..., N} are colored, each with one of 2 different colors, then there are...

- Mon Dec 05, 2011 7:34 pm
- Forum: Recreational
- Topic: Exceptionally difficult questions
- Replies:
**2** - Views:
**3057**

### Exceptionally difficult questions

Out of curiosity I was wondering how often the Project Euler team comes across a question that: 1) is interesting and easy to explain 2) has a nice simple solution (e.g. 15 lines of Python) 3) is considered too hard to be used as a Project Euler problem(!) It is simple enough to find questions that ...

- Sun Nov 20, 2011 2:11 pm
- Forum: News, Suggestions, and FAQ
- Topic: What are Pythagorean problems?
- Replies:
**4** - Views:
**2132**

### Re: What are Pythagorean problems?

Curiously, according to http://projecteuler.net/award=22;page=20 someone called oldjales has this award despite only having solved a single problem, so perhaps the award just depends on one particular solution?

- Tue Oct 25, 2011 6:25 pm
- Forum: Number Theory
- Topic: Numbers of the form (1+cX)^1/2
- Replies:
**8** - Views:
**4202**

### Re: Numbers of the form (1+cX)^1/2

You may want to consider this factorisation: z^2 = 1 +cx cx=z^2-1 cx=(z-1)(z+1) For example, suppose c is a prime p. => p|(z-1) or p|(z+1) =>z=kp+1 or z=kp-1 gives all the solutions. (Solutions for x given by x=(z-1)(z+1)/c) If c is composite, then you could consider all factorisations c=a.b You can...