Radewoosh вдохновил меня, решив весь Project Euler, и я недавно начал сам медленно, но верно решать оттуда задачи. Буду рад каждому, кто добавит меня в друзья в Project Euler, мой токен дружбы 2127163_HmDkRoxUDZa38znoBSPq2n4Prg996WEX
, можете ввести его на этой странице, если вы зарегистрированы и хотели бы видеть меня в своём списке друзей. (Аналогично, и вы появитесь в моём списке друзей.)
Также я записываю весь процесс (на английском) и загружаю на Youtube, так как, согласно правилам, задачи 1–100 разрешено публично разбирать и обсуждать (впрочем, боюсь, в первой сотне не окажется сколько-нибудь серьёзных или интересных задач). На данный момент опубликованы видеоролики:
Это скринкасты, я бы даже назвал их разборами, но (по крайней мере среди совсем начальных задач) объяснять там почти что нечего. В любом случае, если хотите, то смотрите!
Ну и, конечно, призываю и вас регистрироваться и решать задачи, если вы ещё не приступили!
UPD. Неприятно это говорить, но на Project Euler есть лимит в 64 друзей. Таким образом, я не могу добавить в друзья всех желающих.
Поэтому мне придётся сделать какой-то приоритет и удалять тех, у кого он самый низкий. Некоторые варианты вроде времени добавления в список друзей — очень низкокачественные приоритеты, так что рассматривать их не будем. Вместо этого я решил удалять тех, кто решил меньше всего задач. На данный момент требуется 24 решённых задач. Так что, если я вас удалил, а вы почему-то хотите назад, просто решите пару задач и возвращайтесь!
Auto comment: topic has been updated by orz (previous revision, new revision, compare).
I started grinding ~3 months ago. Right now, I'm doing it casually.
1275826_jkyzVINq34WB3Ut8JnZOEXnvWFJ1hxlu
The discussion threads are helpful. E.g.
Lucy_Hedgehog
described an $$$O(N^{3/4})$$$ prime counting algorithm in problem 10.That technique is used in many other problems.
Well, it is even possible to do it in $$$\mathcal{O}{\left(n^{\frac{2}{3}} \log^{\frac{1}{3}}{n}\right)}$$$ time. However, for problems like tenth it is definitely an overkill.
If you want to enjoy Project Euler more, try solving some recent problems rather than just old ones.
I’ve added you in my friend list. I look forward to seeing you beat me on the recent problems!
I wanted to solve the today problem, but, for the recent problems, only getting in the first 50 solvers makes sense. And today I unfortunately felt not very well, so I decided to skip Codeforces Round 919 (Div. 2) and PE.862.
I finally managed to solve a recent problem. I woke up at 7:00 am today and I was 29th who solved Problem 874. Maximal Prime Score!
I did this once more! This time I Eulered Problem 919.
I've caught up with you just now.
It's really fast to be the 11th solver! (I haven't reach that value.)
Auto comment: topic has been updated by orz (previous revision, new revision, compare).
Автокомментарий: текст был переведен пользователем orz (оригинальная версия, переведенная версия, сравнить).
Auto comment: topic has been updated by orz (previous revision, new revision, compare).
Hello, your friend token is invalid
Fixed.
кто спрашивал
-
А тебя?
А тебя?
Самый умный?
Project Euler grind is truly addicting, nice to see more people joining in after that blog from Radewoosh. Nothing like spending weeks on a problem generously marked by PE as "40% difficulty". Worth it, though.
1477911_TuMm8yM8dRqPeSgKfG9TjouG2YPmnLwG
I don't understand in project Euler how do you know if your approach is good enough. For example the second question (finding sum of even fibonacci numbers below 4 million) can be easily brute forced but the solution shows an expression for just finding the even numbers.
Is the problem expected to just find the answer by whatever means and then show you the better expression on the solution? How do you infer that? How do I know that I don't need a closed-form expression that find the answer on O(1)?
Well, there is a one-minute rule, which allows you to cut too slow solutions off. Beyond this:
Some problems are educational. They usually allow suboptimal solutions, and after you solve it, you can read the attached pdf with some educational stuff, like how you could solve it faster.
After you solve a problem, you have access to the corresponding thread, where people usually share their approaches; so if some of them solved the problem faster than you did, you can read how it could be done.
Apart from that, during solving the problem, the most stable way to know if your solution can be improved in general is probably your intuition, which comes with experience.
If I stuck at particular problem, how can I know what is the solution or idea of that problem??
You cannot. Well, you can search the information in the Internet, or ask your friends, or try another approach. But if nothing helps, the intended by the website admins behavior is to just skip the problem until several days or weeks have passed and you are ready to approach it with new effort.
Some problems took me about 3 years of occasional thinking
For example? 😳
I think 167 or 581
big brainers's blog
Where to submit or solve Project Euler problems ? There's just a answer box. Where would I put my codes ? I simply don't get it. There're the same problems in freeCodeCamp but it shows error in the console box when I start writing code or simply declaring a variable. It says semicolon is missing in the mid way.
You have to execute your code locally and just paste the final answer (numerical value) into the " answer box ".
orz why you stopped
I had to spend a lot of time on the preparation to ICPC, so the priority of PE shifted down. After the ICPC it shifted even more. But it would be nice to return back!
I'm occasionally grinding PE as well.
764672_74774be2794bb65ce9b4df81b86bbedb
I also explored solving and proving solutions using Lean theorem prover. For now, it consists of just problem 1.
can i be IGM without solving PE?
Of course.
Of course. I haven't done a single problem in PE. (Might solve some in the near future, though.)
Using Lean to prove the solutions sounds like an interesting exercise. I wonder how it'll hold up for the more "computational" problems like Problem 84, though 😅
I'm not sure how to formally prove that one; the only solution I know is using statistics, which doesn't yield a verified result, and I don't think it can be easily transformed.
Having said that, there are other kind of "computational" problems (like Problem 83), where you can build the proof while running an algorithm (in this case dijkstra), so the outcome of dijkstra in this case would be both the value, and the proof that the value is optimal.
Woah, this is impressive. I used to have a thought of using Lean to prove time/space complexities of competitive programming problems. (Although I didn't even try.)
I have been thinking about this as well. However, I don't believe Lean is well suited to prove time/space complexities at this point from a given algorithm unless you define the number of steps the algorithm takes in some fancy way.
The approach I've been considering is implementing some lower-level virtual machine in Lean, maybe something like Knuth's MMIX or RISC. Within the virtual machine context, we can say the time it takes to run is "roughly" the number of instructions executed, and measuring the space should be simple. Then, we can provide proof of programs built for that target.
But all this looks like a gigantic project far away atm.
You should look into doing the hacker rank version of Project Euler, has the same kinds of problems with the same content and general idea, but is more like competitive programming with testcases. I tried a couple and learned a lot!