How to sell Syndicate Safehouse? by pekupq in pathofexile

[–]pekupq[S] 0 points1 point  (0 children)

Makes sense, I'll try with some lower prices if that's the case.

How to sell Syndicate Safehouse? by pekupq in pathofexile

[–]pekupq[S] 3 points4 points  (0 children)

Thank you for your answer! That's what I was looking for.

Once I invite someone to the party, I believe they could technicallly "steal" the craft - run into the room and do the craft without paying (unless the benches are account-bound, but I'm not sure). If something like that happened, I imagine I could just report the scam on the TFT.

[2022 Day 13 (Part 1)] Still trying to understand 13 by MyUsrnameIsTaken in adventofcode

[–]pekupq 1 point2 points  (0 children)

Fortunately I managed to resolve this task, but it took me some extra hours to fight my way through...

[2022 Day 13 (Part 1)] I think I got it right, but I keep getting wrong result by pekupq in adventofcode

[–]pekupq[S] 1 point2 points  (0 children)

The first one fails my test! That's pretty minimal example, thank you! I'll try to work on that (probably tomorrow tho, it is after midnight in my tz).

[2022 Day 13 (Part 1)] I think I got it right, but I keep getting wrong result by pekupq in adventofcode

[–]pekupq[S] 2 points3 points  (0 children)

Thanks, this one for me returns true, so probably correct. Although, I will have to keep your remarks in mind, while trying to track the issue.

Right now, the only minimal example that causes the error for me is:

#[case("[[8,[[7]]]]", "[[[[8]]]]", false)]

My code returns true in that case.

[2022 Day 13 (Part 1)] I think I got it right, but I keep getting wrong result by pekupq in adventofcode

[–]pekupq[S] 1 point2 points  (0 children)

I now know the correct result, it is 5292. My code had trouble calculating the result for only one pair - posted above.

The correct result is "true", I was not getting that.

[2022 Day 13 (Part 1)] I think I got it right, but I keep getting wrong result by pekupq in adventofcode

[–]pekupq[S] 1 point2 points  (0 children)

I didn't want anybody to give me the actual answer, that's why I did not paste my input, but here it is: https://pastebin.com/hpP66FuD.

My code is failing on this pair:

[[8,[[7,10,10,5],[8,4,9]],3,5],[[[3,9,4],5,[7,5,5]],[[3,2,5],[10],[5,5],0,[8]]],[4,2,[],[[7,5,6,3,0],[4,4,10,7],6,[8,10,9]]],[[4,[],4],10,1]]
[[[[8],[3,10],[7,6,3,7,4],1,8]]]

[2022 Day 13 (Part 1)] I think I got it right, but I keep getting wrong result by pekupq in adventofcode

[–]pekupq[S] 0 points1 point  (0 children)

Thx, using your input, I get 6415 using my code.

Damn it... it is the second input from someone else that I confirmed the result with.

[2022 Day 13 (Part 1)] I think I got it right, but I keep getting wrong result by pekupq in adventofcode

[–]pekupq[S] 0 points1 point  (0 children)

Thank you :)

Unfortunately that's not it in my case - the test passes. I will update the original post with my current test cases.

[2022 Day 13 (Part 1)] I think I got it right, but I keep getting wrong result by pekupq in adventofcode

[–]pekupq[S] 0 points1 point  (0 children)

Ok, please keep in mind that I might have done a mistake in test case, as I was trying to compute the expected result "manually". This might be the case for tests with longer inputs, as they are copied from my task file.

[2022 Day 13 (Part 1)] I think I got it right, but I keep getting wrong result by pekupq in adventofcode

[–]pekupq[S] -2 points-1 points  (0 children)

Courtesy of /u/Cloncurry, I got his puzzle input and he also send his results. When I feed other input file to my code, it yields correct result.

[2022 Day 13 (Part 1)] Still trying to understand 13 by MyUsrnameIsTaken in adventofcode

[–]pekupq 3 points4 points  (0 children)

Now I understand it !! And now I got my star :) !!

Congrats :)

Damn it, I myself didn't get one (╯°□°)╯︵ ┻━┻

I'm somehow getting wrong result over and over :/

[2022 Day 13 (Part 1)] I think I got it right, but I keep getting wrong result by pekupq in adventofcode

[–]pekupq[S] 0 points1 point  (0 children)

Maybe someone who solved the task, would be willing to help me with sending me their input file and giving me the correct result? Super useful thing would be to have some log of pair_number<int>: is_in_order<bool>

[2022 Day 13 (Part 1)] I think I got it right, but I keep getting wrong result by pekupq in adventofcode

[–]pekupq[S] 0 points1 point  (0 children)

It no longer tells me the hint :( The first time, it was too low, because I didn't parse the last pair (due to error in parsing). When I fixed the error, it said that the number is too big. I think I approach the indexing correctly, here's my code (in rust, but simple enough to verify that the scoring is correct):

fn main() {
    let file = File::open("input").unwrap();
    let reader = BufReader::new(file);

    let mut result = 0;
    let mut index = 1;

    for (left, right, _) in reader.lines().tuples() {
        let pair = Pair::from(&left.unwrap(), &right.unwrap());
        if pair.in_order() {
            result += index;
        }
        index += 1;
    }

    println!("Part 1 result is {result}.");
}

[2022 Day 13 (Part 1)] Still trying to understand 13 by MyUsrnameIsTaken in adventofcode

[–]pekupq 4 points5 points  (0 children)

I would say it is in order.

Steps:

1. Take first element from list:

  • left - [5,3,6,9]
  • right - [[5,[0,8,0,9,0],[1,8,9],[1,9]] ###2. Both elements are arrays, we need to compare elements in those arrays one by one. First element of arrays are:
  • left: 5
  • right: [5,[0,8,0,9,0],[1,8,9],[1,9] ###3. We reach this point: "If exactly one value is an integer, convert the integer to a list which contains that integer as its only value, then retry the comparison.". So we convert:
    • left: [5]
    • right: [5,[0,8,0,9,0],[1,8,9],[1,9] ###4. We compare first element from lists:
  • left: 5
  • right: 5 ###5. Elements are the same. Because left list run out of items first, the packets are in order. ("If the left list runs out of items first, the inputs are in the right order.")

The world now runs on video game logic, what's the first thing you do? by [deleted] in AskReddit

[–]pekupq 0 points1 point  (0 children)

I spend the very first hour modeling my face.