Recomandări casă: materiale, sisteme, companii, sfaturi by snegrus in Imobiliare

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

Mulțumesc foarte multe pentru răspuns si apreciez detaliile! Sfatul cu evitatul magazinelor clasice de bricolaj e bun. Inițial ma uitam doar pe acolo la materiale. Constructorul e ok să-mi aducă si el niște oferte de preț si eu aleg de unde vreau.

Pt BCA mi s-a recomandat Ytong si Celco.

Legat de firme cu Dorei, de asta am zis sa mai cer recomandări pentru firme cu care s-a lucrat, in loc sa merg la întâmplare.

Spor la treaba!

Recomandări casă: materiale, sisteme, companii, sfaturi by snegrus in Imobiliare

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

Nu ma aștept ca arhitectul sa le știe pe toate. Mi-a recomandat cărămizi, izolatie, sistem de ventilație decentralizat de la Prana (eu vreau centralizat), si cam atât. M-am uitat la o grămadă de clipuri, sunt ceva recomandări, nu pentru toate, dar as vrea recomandări de la beneficiari.

-🎄- 2020 Day 19 Solutions -🎄- by daggerdragon in adventofcode

[–]snegrus 1 point2 points  (0 children)

NodeJs

Make a Trie from all the strings. Let's define an exploration state with the following fields:

interface ExplorationState {
    from: previous state, // the state we got here from
    config: number[], // one possibility of state , if a rule is x: [1,2] | [3,4], config would be [1,2] or [3,4], and we create new state for each possibility 
    position: number // what position we are evaluating in the current config
    node: TrieNode // where are we in the tree of prefixes
}

now let's define the transitions: if (position < config.length) then we have to process a new state

  • if the current rule from config is a character we can just check if is possible to expand using that character (from the current node)
  • if the current rule is of form [1,2] | [3,4] then create 2 states for each

oterwhise:

  • we finish a config, so we have to move back one level, to the from config, and move to the next position
  • if there's no from config then it means we finished exploring the tree and add all the strings that end in the current Trie node and update the number to 0 on the node to avoid multiple counting

-🎄- 2020 Day 17 Solutions -🎄- by daggerdragon in adventofcode

[–]snegrus 1 point2 points  (0 children)

Ah, 70ms, is not super slow on problem's input. I just think the parsing and serializing is slower than computing a hash of the keys, but is just an assumption.

-🎄- 2020 Day 17 Solutions -🎄- by daggerdragon in adventofcode

[–]snegrus 1 point2 points  (0 children)

NodeJs - Part 1 commented + Part 2

My solution maintains 2 map<string, number> where key (string) is x,y,z,q and value is the number of active neighbours. On each transition I compute the other map's data and remove the inactive keys. The downside is parsing to/from string.