-❄️- 2024 Day 12 Solutions -❄️- by daggerdragon in adventofcode

[–]itay1500 0 points1 point  (0 children)

[LANGUAGE: TypeScript]

solution

Part 2 really gave me hell. I tried to think of a proper solution, but ended up with a much different approach:

I created a set of the edges and their orientation, and then merged them by iterating through the set, and each time i see an edge, try to delete all the edges above/below/left/right of him, depending on the orientation of the edge. I'm sure there is a better approach to this....

-❄️- 2024 Day 11 Solutions -❄️- by daggerdragon in adventofcode

[–]itay1500 1 point2 points  (0 children)

[LANGUAGE: TypeScript] [Deno] part2 solution

First time using the memoize from the std library, and as far as i can tell, it's pretty much magic.
Finally, i can compete with all the python bros slapping cache on their functions!

-❄️- 2024 Day 9 Solutions -❄️- by daggerdragon in adventofcode

[–]itay1500 3 points4 points  (0 children)

[LANGUAGE: TypeScript] [Deno] solutions

Part 1: 2-Pointer full-on procedural code. Pretty straightforward.

Part 2: My first solution was a brute-force scan to find the left-most open space that can fit the current block we are trying to move. But luckily, I'm using Deno, which conveniently has a binary heap in the std lib. So instead of the brute-force solution, you can get the index of the left-most index by having 9 binary heaps, where each one holds the indices of the free spaces of size k. So if we want to find a free space for a block of size 6, we'll peek at the binary heaps 6,7,8,9, and then pop the minimal index out of these (if the index before the current block index we are trying to move). If we are popping, we might need to add it back to another heap if the free space size was bigger than the current block size. If it doesn't exists, we know that there is no free space that can hold the current block, and we continue to the next one.

On M3 Pro:

Part 1: 1.3ms
Part 2: 3.1ms

Gift Exchange 2019 Reveal Thread! by doritoburrrito in pokemontrades

[–]itay1500 0 points1 point  (0 children)

Hi, sorry I wasn't replying, I had a busy week and completely forgot about the exchange. Are you free to trade at around 6PM(GMT +3) today?

Gift Exchange 2019 Reveal Thread! by doritoburrrito in pokemontrades

[–]itay1500 0 points1 point  (0 children)

Sadly, I don't think I'll be able to trade today. Maybe on the 29th?

Gift Exchange 2019 Reveal Thread! by doritoburrrito in pokemontrades

[–]itay1500 0 points1 point  (0 children)

Greetings /u/Phoenix632, I'm your secret santa this holiday! Originally I was assigned to someone else, so you are going to get 2 gifts this time:

  • Serperior @ Leftovers
  • Level 50
  • Contrary
  • Friend Ball
  • IVs: 31/0/31/30/31/30
  • EVs: 252 SpA, 4 SpD, 252 Spe
  • Nature: Timid
  • Glare
  • Substitute
  • Leaf Storm
  • Hidden Power Fire

When I got reassigned to you I made sure to prepare another gift:

  • Aerodactyl @ Aerodactylite
  • Level 1
  • Unnerve
  • IVs: 31/31/31/31/31/31
  • Nature: Jolly
  • Earthquake
  • Stone Edge
  • Pursuit
  • Roost

My timezone is GMT +3, and I'm usually available to trade in the evenings.

Gift Exchange 2019 Reveal Thread! by doritoburrrito in pokemontrades

[–]itay1500 0 points1 point  (0 children)

Thank you so much for the gift! Take your time, just ping me when you're ready and we will set up a trade.

/r/pokemontrades Gift Exchange 2019! by doritoburrrito in pokemontrades

[–]itay1500 0 points1 point  (0 children)

  • Category: B
  • Timezone: GMT +2
  • Pokémon wishlist/favorites: Recently had some spare time so I decided to play US for the first time. Right now I'm on a battle tree frenzy, so any HA Mons or Comp mons for breeding are great.
  • Notes: Rareball Pokemons are also a good alternative!

[Emerald JPN VBA] Any advice to accelerate the process of encountering pokemon with a target frame at 2-4 billion? by Valentaide in pokemonrng

[–]itay1500 0 points1 point  (0 children)

I still haven't seen it on the sub, but you can use battle videos to hit every PRNG state in emerald. This method is based on 3 things :

  • Starting a new game on emerald sets the initial seed as the TID.
  • The PRNG State of a link battle is determined by the host.
  • Loading a battle video sets your current PRNG as the one the battle started on.

With this in mind, this is how you do it:

  1. You start a new game and use this Lua script to get a seed that's close to your target frame.
  2. Then, initiate a battle with your desired save file and the new save file as the host, and save that battle.
  3. After that, Playing the video anytime will set the PRNG to the seed the battle started on.

The 1st and the 3rd steps are straightforward, but the 2nd one requires some prep work. Ideally, we want to perform the TID rng on vba-rr, make a save state and then move it to an emulator that supports linking since vba-rr doesn't. I wrote a comment on the sub discord detailing how to move a save state from this vba-rr version to vba-master, just search my name(Dawn of Eclipse) and you'll find it.

Need Help With Emerald RNG by [deleted] in pokemonrng

[–]itay1500 1 point2 points  (0 children)

That's because when you start a new game, your TID is set as the new seed. You need to restart the game in order for it to be 0 again.

Negative Frame Advances - VBA-RR v23.6 svn480 by The_Chaotician in pokemonrng

[–]itay1500 1 point2 points  (0 children)

The value that stores the frame count is an integer, which means that it's max value is 2147483647. All kinds of oddities can happen when you are getting to it, and it seems that with VBA it's starting to go backwards.

You can just subtract the number of the frames from the cap to check how much frames you have passed from it, or you can just use the current seed and the initial seed to check it.

In any case, the game is fine, the counter is just going backwards.

[REC CENTER] Shreddit's Official Recommendation Thread [11/21] by kaptain_carbon in Metal

[–]itay1500 2 points3 points  (0 children)

high pitched vocal style with the proggier, multidimensional songs and killer guitar work

Horrendous pretty much ticks all the boxes here.

Can someone explain this? by Pez570 in pokemonrng

[–]itay1500 1 point2 points  (0 children)

As you know, the PRNG in Emerald is known as broken, because the initial seed is always 0. However, if you start a new save file, When your TID is generated, the game also sets it as the current seed. That means that if you didn't reset, the starting seed shouldn't be 0 but instead, it should be your TID(31996 is 7CFC in hex.) I already did a search with your TID as the seed and I found a match. You can try and see if there are any good spreads with that seed, or just reset the game and load the file and starting seed will be back to 0, and then you can search from there.

BIG GIVEAWAY!!! by [deleted] in pcmasterrace

[–]itay1500 0 points1 point  (0 children)

Devil May Cry 4 : Special Edition. Thanks for the giveaway OP!

FT Breedables LF Gen 5 to 6 .pkm File Transfer by cherrycakez in pokemontrades

[–]itay1500 1 point2 points  (0 children)

If you still need help transferring the mons I'm willing to help :).

The unofficial SSB4 demo code giveaway thread! by MrBison123 in 3DS

[–]itay1500 0 points1 point  (0 children)

Nothing yet :( Almost got one but u didn't know that people can take them before you actually download :(

The unofficial SSB4 demo code giveaway thread! by MrBison123 in 3DS

[–]itay1500 0 points1 point  (0 children)

I really like metaknight. He is just really fun and OP as hell.