Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • Striker Fox2: download it
      Today at 03:26:06 AM
    • Zezuma09: how do i get this game started ?
      October 22, 2017, 03:24:27 AM
    • Striker Fox2: Much more on General Board
      October 21, 2017, 04:30:25 AM
    • Striker Fox2: New price guide link [link]
      October 21, 2017, 04:30:18 AM
    • Striker Fox2: New discord link [link]
      October 21, 2017, 04:30:03 AM
    • Saltyspade10: If you are new and reading this, stick around becaus it's a great server and community! Hope to see you in-game :)
      October 21, 2017, 02:44:16 AM
    • damian6: hello i wanne buy this server can u add me
      October 20, 2017, 03:54:38 PM
    • Wilkooo: lol jks
      October 20, 2017, 02:39:53 PM
    • Wilkooo: ilyall
      October 20, 2017, 02:39:48 PM
    • tm4dz: why cant i see any download links??
      October 20, 2017, 10:46:55 AM
    • stCky: u dont need to its fudgeing sick
      October 19, 2017, 08:13:13 PM
    • odin stormborn: how do i change my username
      October 19, 2017, 12:16:51 PM
    • qazplm102938: everyone play manicps its best server out there loads to do its badboyyyy - manicps manicps shout out kiteshield
      October 19, 2017, 10:28:21 AM
    • qazplm102938: everyone play manicps its best server out there loads to do its badboyyyy - manicps manicps
      October 19, 2017, 10:11:08 AM
    • Travas: wtf
      October 19, 2017, 07:37:52 AM
    • stCky: Adaro, you are a threat to the communities image, yes
      October 18, 2017, 02:53:43 PM
    • Krackkid: Hello everyone it is I, Krackkid.
      October 18, 2017, 07:21:56 AM
    • soma_: Does anyone have an updated link to a blank Source / Client? 317/508
      October 18, 2017, 04:57:44 AM
    • michaeltrailer: olm t pst
      October 18, 2017, 04:52:48 AM
    • Adaro: Strange that staff think I'm a threat when I'm not threatening anyone
      October 18, 2017, 03:07:16 AM

    Author Topic: Advent of Code  (Read 5744 times)

    0 Members and 1 Guest are viewing this topic.

    Offlinejustaguy

    • Member
    • ****
    • *
    • Posts: 707
    • Thanks: +0/-0
      • View Profile
    Advent of Code
    « on: December 01, 2015, 12:26:36 PM »
    I saw this posted on R-S, so why not have our own thread? Check it out here.

    Let's see who can make it through all 25 days! Don't post solutions here unless they were from a previous day and are in spoiler tags.
    « Last Edit: December 02, 2015, 02:51:56 PM by justaguy »
    RIP

    OfflineBowser jr

    • Member
    • ****
    • Posts: 6,001
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #1 on: December 01, 2015, 12:56:25 PM »
    Join the non-official Mopar leaderboard: 5918-34284122

    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    (click to show/hide)
    « Last Edit: December 14, 2015, 04:40:09 AM by Bowser jr »

    Offlinerunescape sucks

    • Member
    • ****
    • Posts: 2,798
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #2 on: December 01, 2015, 12:59:44 PM »
    Quote
    Here's an easy puzzle to warm you up.

    Very true.
    (click to show/hide)


    OfflineBowser jr

    • Member
    • ****
    • Posts: 6,001
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #3 on: December 02, 2015, 01:11:14 PM »
    Day two was even easier. If it continues like this, day 25 will be hello world.

    Offlinejustaguy

    • Member
    • ****
    • *
    • Posts: 707
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #4 on: December 02, 2015, 02:50:40 PM »
    Day two was even easier. If it continues like this, day 25 will be hello world.

    Haven't tried them yet, working on school assignments. By the sound of it, they wouldn't take very long!
    RIP

    OfflineBowser jr

    • Member
    • ****
    • Posts: 6,001
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #5 on: December 02, 2015, 03:00:24 PM »
    Day two was even easier. If it continues like this, day 25 will be hello world.

    Haven't tried them yet, working on school assignments. By the sound of it, they wouldn't take very long!
    1-6 lines for each part at most. And when I say lines, it's simple lines. Not complex programs in a one-liner lines.

    OfflineChassy13

    • R.I.P. Jimmy "The Rev" Sullivan.
    • Member
    • ****
    • Posts: 7,779
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #6 on: December 02, 2015, 03:32:47 PM »
    Day two was even easier. If it continues like this, day 25 will be hello world.

    The current problems are similar to those covered in intro-level computer science courses... I expect a pretty large difficulty curve on its way, and the first few days in general being a 'warmup'. I read that the main creator is well-known for formulating challenging and complex problems. It's even mentioned that these problems are directed at a wide variety of skill levels.
    I'm far more mature than to steal a notebook

    OfflineBowser jr

    • Member
    • ****
    • Posts: 6,001
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #7 on: December 02, 2015, 03:44:11 PM »
    Ofc I know it will be harder, I was just joking. I just had expected that day two would be a bit trickier than the first one.

    Not that anything could be simpler than this


    Code: Scala
    1. input.count(_=='(') - input.count(_==')')
    Code for day one part one.

    Offlinejustaguy

    • Member
    • ****
    • *
    • Posts: 707
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #8 on: December 03, 2015, 12:36:12 AM »
    Day 1:
    (click to show/hide)

    Day 2:
    (click to show/hide)
    RIP

    OfflineRyley

    • Member
    • ****
    • *
    • Posts: 7,315
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #9 on: December 03, 2015, 12:43:40 AM »
    Day 1: Not Quite Lisp
    (click to show/hide)

    Day 2: I Was Told There Would Be No Math
    (click to show/hide)

    Offlinez

    • Member
    • ****
    • *
    • Posts: 1,407
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #10 on: December 03, 2015, 01:01:56 AM »
    inb4 potentially shit java

    https://github.com/zg/adventofcode
    « Last Edit: December 11, 2015, 09:21:23 PM by z »
    pls dont ever leave me guis you were all the most stable thing in my life <3

    Offlinez

    • Member
    • ****
    • *
    • Posts: 1,407
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #11 on: December 03, 2015, 09:22:51 AM »
    I think it would be smarter to post solutions one by one, that way you're forced to navigate through each post to find a solution.

    edit: nvm
    « Last Edit: December 03, 2015, 09:39:25 AM by z »
    pls dont ever leave me guis you were all the most stable thing in my life <3

    OfflineBowser jr

    • Member
    • ****
    • Posts: 6,001
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #12 on: December 03, 2015, 09:33:19 AM »
    z: It's not really about getting the solution for now, but seeing how other people solved it, so it is nice to have them collected.

    Offlinez

    • Member
    • ****
    • *
    • Posts: 1,407
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #13 on: December 03, 2015, 09:39:29 AM »
    z: It's not really about getting the solution for now, but seeing how other people solved it, so it is nice to have them collected.
    meh

    Edit: by the way, avoid reading the Java code posted by other users on /r/adventofcode, it's unbearable
    « Last Edit: December 03, 2015, 10:23:00 AM by z »
    pls dont ever leave me guis you were all the most stable thing in my life <3

    OfflineBowser jr

    • Member
    • ****
    • Posts: 6,001
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #14 on: December 03, 2015, 12:41:03 PM »
    z: It's not really about getting the solution for now, but seeing how other people solved it, so it is nice to have them collected.
    meh

    Edit: by the way, avoid reading the Java code posted by other users on /r/adventofcode, it's unbearable
    I don't even like your solutions, but it's Java, it isn't your fault.
    « Last Edit: December 03, 2015, 12:42:46 PM by Bowser jr »

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #15 on: December 03, 2015, 12:53:10 PM »
    scala imo looks worse than java

    Offlinez

    • Member
    • ****
    • *
    • Posts: 1,407
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #16 on: December 03, 2015, 12:58:44 PM »
    z: It's not really about getting the solution for now, but seeing how other people solved it, so it is nice to have them collected.
    meh

    Edit: by the way, avoid reading the Java code posted by other users on /r/adventofcode, it's unbearable
    I don't even like your solutions, but it's Java, it isn't your fault.
    why don't you like my solutions? this hurts me on an emotional level
    pls dont ever leave me guis you were all the most stable thing in my life <3

    OfflineBowser jr

    • Member
    • ****
    • Posts: 6,001
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #17 on: December 03, 2015, 01:04:05 PM »
    z: It's not really about getting the solution for now, but seeing how other people solved it, so it is nice to have them collected.
    meh

    Edit: by the way, avoid reading the Java code posted by other users on /r/adventofcode, it's unbearable
    I don't even like your solutions, but it's Java, it isn't your fault.
    why don't you like my solutions? this hurts me on an emotional level
    This part only, I'm sure you can guess why.
    Code: [Select]
                if(dir == '^') {
                    if(flag) santa_loc.y++;
                        else  robo_loc.y++;
                } else if(dir == 'v') {
                    if(flag) santa_loc.y--;
                        else  robo_loc.y--;
                } else if(dir == '<') {
                    if(flag) santa_loc.x--;
                        else  robo_loc.x--;
                } else if(dir == '>') {
                    if(flag) santa_loc.x++;
                        else  robo_loc.x++;
                }
                if(flag) visited.add(santa_loc.toString());
                    else visited.add(robo_loc.toString());

    Offlinez

    • Member
    • ****
    • *
    • Posts: 1,407
    • Thanks: +0/-0
      • View Profile
    Re: Advent of Code
    « Reply #18 on: December 03, 2015, 02:13:34 PM »
    z: It's not really about getting the solution for now, but seeing how other people solved it, so it is nice to have them collected.
    meh

    Edit: by the way, avoid reading the Java code posted by other users on /r/adventofcode, it's unbearable
    I don't even like your solutions, but it's Java, it isn't your fault.
    why don't you like my solutions? this hurts me on an emotional level
    This part only, I'm sure you can guess why.
    Code: [Select]
                if(dir == '^') {
                    if(flag) santa_loc.y++;
                        else  robo_loc.y++;
                } else if(dir == 'v') {
                    if(flag) santa_loc.y--;
                        else  robo_loc.y--;
                } else if(dir == '<') {
                    if(flag) santa_loc.x--;
                        else  robo_loc.x--;
                } else if(dir == '>') {
                    if(flag) santa_loc.x++;
                        else  robo_loc.x++;
                }
                if(flag) visited.add(santa_loc.toString());
                    else visited.add(robo_loc.toString());
    but readability!

    edit: okay, so i rewrote it a little bit... how terrible is it now?

    (click to show/hide)
    « Last Edit: December 03, 2015, 02:29:12 PM by z »
    pls dont ever leave me guis you were all the most stable thing in my life <3

    OfflineRuneAgent

    • wololo
    • Member
    • ****
    • *
    • *
    • Posts: 7,516
    • Thanks: +0/-0
      • View Profile
      • MITB FORUMS
    Re: Advent of Code
    « Reply #19 on: December 03, 2015, 03:35:41 PM »
    Here is my day one:
    (click to show/hide)
    « Last Edit: December 03, 2015, 04:18:17 PM by Miss Silabsoft »

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal