This is surprisingly easy...basically following Arch Wiki:
https://wiki.archlinux.org/index.php/Howdy
After some investigation, here is step by step and preferences
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
/** | |
* The while loop represents the game. | |
* Each iteration represents a turn of the game | |
* where you are given inputs (the heights of the mountains) | |
* and where you have to print an output (the index of the moutain to fire on) | |
* The inputs you are given are automatically updated according to your last actions. |
This is surprisingly easy...basically following Arch Wiki:
https://wiki.archlinux.org/index.php/Howdy
After some investigation, here is step by step and preferences