Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #415: Efficient Resource Distribution Using Macros

Kenda
16 - Nebula
16 - Nebula
Spoiler
also no macro solution
 

image.png

oscar_leeper_wf
7 - Meteor

I'm with you, TurboToad.  I couldn't figure out why I needed a macro and also removed an if statement by concluding 0 resources needed was a "Yes".

Spoiler
Challenge_415_non_macro_screenprint.png

 

nSpire
8 - Asteroid
Spoiler
415.png
Qiu
20 - Arcturus
20 - Arcturus

@DataNath @Luke_C 
Great challenge!

I tried the non-macro one.

Spoiler
challenge_415.PNG
gawa
15 - Aurora
15 - Aurora

Tool golf! (4 tools)

Spoiler
image.png
sergejs_kutkovics
9 - Comet

My try! Also did it without macro.

Why do we consider Period 9 in East as an one unmet requirement? With zero resources needed and no resources allocated, it is a perfect match for me.

Spoiler
Capture.PNGCapture1.PNG

 

Chris-Nienart
7 - Meteor

I found it tricky to understand the resource usage. Perhaps it is a product like a software free trial -  that may explain why it could be used in multiple regions but only once per region.

 

I also agree with several of the users above that when 0 resources are needed, the need is met regardless of the resource availability.

 

Initial workflow

Spoiler

set up candidate resources, a total pool of resources, and prep regionsset up candidate resources, a total pool of resources, and prep regions

Batch macro

Spoiler
process by region as the same resource can be used in multiple regionsprocess by region as the same resource can be used in multiple regions

Iterative macro

Spoiler
loop through the periods until resources are exhaustedloop through the periods until resources are exhausted

 

Yoshiro_Fujimori
15 - Aurora

My solution witout macro.

Spoiler
Workflow
Challenge_415_Workflow.png
Watermark
12 - Quasar
12 - Quasar

Was going to say it like it was Butch Cassidy and the Sundance kid: "Macro? We don't need no stinking macro"

But it seems, that's the majority of the consensus, I didn't see a need either.  Short, sweet, clear, simple. 

I agree with someone else who posted about  "0 needed" being no, I actually labeled them N/A. 

 

Spoiler
MT_Solution_415.jpg

 

 

kenji-kobayashi
5 - Atom

My solution without macro.

(It would be simpler to use the GetPart function, but my version did not have it)

Spoiler
Clipboard01.png