Saturday, November 07, 2009

Project euler memo: #160

Problem 261: Square-pivots. I re-installed GMP, the math library, for the first time after Snow Leopard. It runs in two hours, that is too long. That's a C program in C.

Wednesday, November 04, 2009

Project euler memo: #159

Problem 212: The combined volume of a lot of cuboids. I spent ten hours on 300 lines of C code and it runs in three hours. I feel really bad.

Saturday, October 31, 2009

Project euler memo: #158

Problem 192: Finding a best approximation to a square root of n with the denominator bound. It is a Diophantine approximation problem. It was really hard for me and I spent almost all day today. Two minutes and half with python.

Monday, October 26, 2009

Project euler memo: #157

Problem 260: Stone game. My python program runs in 70 minutes. Too long. Well, it's wrong, I think. I will check the forum later.

Tuesday, October 20, 2009

Project euler memo: #156

Problem 259: Finding positive integers by doing such as 1 * (23 - 4/5) * 65 + 7 / 8 + 9. This one is not difficult. 16 minutes in python.

Wednesday, September 30, 2009

Project euler memo: #155

Problem 257: Angular bisectors of triangles. It's an interesting problem. FIrst I found the formula but it needed O(n^2) time. I needed a way to avoid it. I learned how to parameterize this kind of problems. 20 seconds in C.

Wednesday, September 23, 2009

Project euler memo: #154

Problem 245: Coresilience of composite integers. I had a terrible bug in a function definition, 32 bit integer instead of 64 bit. I feel it was little bit slow, 100 seconds in C, so I will check the forum later. It's time to go out for lunch. Today is the last day of my very long holidays.

Monday, September 21, 2009

Influenza and national holidays

Our children and myself took influenza last week. We all diagnosed as the type A influenza. Type A flu is treated as H1N1 flu.
We all got better within some days, but my company regulation prohibited me coming back to the office for a week. So I was out of the office last week.

This is originally 5-day weekend because we have four national holidays. I will be back to my office on 24th of September. It is almost two weeks off for me!

Project euler memo: #153

Problem 147: The number of rectangles in cross-hatched grids. Looks very complicated. I took a simple approach which is not very clever but easy to debug. You need to answer the sum of all result for the grids under 47x43. One minutes and half in python.

Saturday, September 19, 2009

Project euler memo: #152

Problem 176: Finding the smallest number for cathetus of 47547 rectangular triangles. It looks a hard problem. I actually read something about this problem. So the problem is not very exciting. Almost no time in python.