Euler 4

0 views
Skip to first unread message

Vernie Montagna

unread,
Aug 5, 2024, 2:20:54 AM8/5/24
to fiocalllandnmat
Itwas a beautiful journey full of internet digging, searching for patterns, learning stuff, fighting with formulas on paper, making crazy observations, coming up with brilliant ideas, implementing crazy optimizations, waiting for the programs to finish, suffering when something was wrong, and so on (and each of the mentioned not once not twice took multiple hours).

It's been a couple of months since I was left with the last unsolved problem and finally I did it! I didn't give up and I obtained the answer alone, without anyone's help, like in the rest of the problems (I was using only internet sources created before the publication of the problem). I'm writing this blog because I am bursting with joy and I wanted to share it with the community. I highly recommend PE as most of the problems were definitely very high quality (and some were a real pain in the ass, but they still teach how to overcome stuff that you're uncomfortable with).


I don't get if it's a sarcasm or what xd That's true that the blog has the vibe of bragging, sorry for that, I just wanted to share my happiness that it's over. I'm not insane yet and I don't think that I can solve everything or smth.


It's the curse of written word in the Internet that with the lack of facial expressions and intonation it is sometimes hard to understand the intended message properly. I guess that everybody of us went through that a few times that we didn't get a sarcasm or a joke in the Internet and were made fun of cause of that, so we are naturally suspecting some traps even where there aren't any :p


I don't know of Radewoosh's favorite problem, but it truly blows my mind that the process described in =566 always ends. It has to be one of my fav and most legendary problems for me even though I made 0% progress towards solving it


i hope you accept my advice but i think project euler might kind of useful since the problems are solved using tricks you will learn however i think your question is it useful for cp is kind of big i mean what is your goal is it rating in codeforces if this is the case and then open archive and solve problems above your level do you mant IOI do more olympiad problems once you have mastered basic tricks(please do not downvote me)


yes, my goal is to reach expert here (at least) so i was asking if this will help or should i focus in another topics (at least for now), also ofc i won't downvote lol i can't even get why are they doing it :3




thanks first, i siad don't downvote me not for you exactly but for everyone becuase in so many comments where i give some advice i get downovoted especially when i was gray(check also the comment of A4n0n4 it has so many downvotes although it is very interesting advice), as for becoming specialist i think focus more on codeforces archive problems you can use very interesting to practice random problems


If you are looking towards 100% completion of a problem set that brings you progress for CP, I find CSES great. It's great at least until "advanced techniques" and "additional problems" which I didn't do yet si I can't say.


What I really liked about CSES is that it cover most of the essential topics and for each topic, the problem are mostly climbing in difficulty which each problem. It's a perfect introduction to the multiple classes of problems before you face them in contest.


i aggree with you cses is very useful i solved a bunch of problems in it and i started feeling real improvement the tricks you learn there are very amazing good starting place before you have great understanding of how to use algos then you can start practicing randomly


Congratulations Radewoosh! Which topic would you say appealed the most to you among all Project Euler problems, in terms of problem statements and solutions, possibly separately? Separately because my experience with PE has been that there are some problems that look benign but end up being really cool and some that are the complete opposite of this description, so I was wondering whether this is true for others too, especially someone who has solved all problems.


Congrats! If one is to start Euler project what book resources would you recommend to have a chance to solve most of them? I bet I mean book positions from combinatorics, geometry, number theory, game theory, ... ? What set of skills is crucial to solve the most difficult ones?


For example, when I manually input a rotation in the inspector of [180,0,0], I expect that when I read transform.localEulerAngles (or transform.localRotation.eulerAngles) that I will also get [180,0,0], however instead what I am getting is [0,180,180]. Furthermore, the rotations wrap around from 0-360, so if the inspector shows a value such as [0,720,0], the value I get from transform.localEulerAngles is [0,0,0]. Unity is obviously calculating these values in a different way.


Also to clarify, I care more about the calculation/data than the inspector. The inspector window after all is just the GUI. I want to know how/where it gets the values it displays. If the rotation is purely stored internally as Quaternion, then how do I extract the extended Euler angle values to exactly match what I see in the inspector? Or if there is additional data being stored, how do I access that?


Well, when you edit your object in editor (I mean rotate) it will save additional data. All field of your objects are serialized and stored in the scene file. If you force Unity to keep em human readable aka text format, you can see something like this:


So to follow up, I finished implementing the solution as described by @ericbegue and it is working great! In the end it was pretty easy to set up. The only caveat is if any other scripts on the same object set localRotation, then those values will be overwritten. To help ensure my script sets the value in the end, I am setting it in LateUpdate.


NEW EDIT based on comment: I changed the last few lines. However, the output is still the same. The reason is (IMHO) there is no "AMSEuler". Therefore, the question remains. May be, it is not possible to use AMS Euler font this way.


enabling an alternate math alphabet involves replicating at least parts of that file, substituting the euler roman for the math italic; it could be as simple as redefining the "letters" complement, which is


but it's possible that (perhaps much) more is involved, especially if the euler digits are wanted in addition to the letters. if i can find time, i will make some experiments, but the prospects are uncertain, as i am preparing for the upcoming tug meeting.


In ConTeXt, one can switch bodyfont in the middle of a document, which changes the math font as well. Here is an example using pagella-euler typescript (which sets pagella as the text font and euler as the math font) and euler typescript (which sets euler as the text and math font).

3a8082e126
Reply all
Reply to author
Forward
0 new messages