mirror of
https://github.com/bertptrs/adventofcode.git
synced 2026-05-11 15:20:35 +02:00
Make most solutions work with make or shebang.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
CXXFLAGS=-Wall -Wextra -pedantic -O3 -std=c++14
|
||||
|
||||
all: solution
|
||||
./$<
|
||||
|
||||
Regular → Executable
+1
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env clojure
|
||||
(defn lower_root [n] (int (Math/floor (Math/sqrt n))))
|
||||
|
||||
(defn box_size [n] (
|
||||
|
||||
Regular → Executable
+1
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/awk -f
|
||||
function word2key(word, a, i, n, result)
|
||||
{
|
||||
n = split(word, a, "")
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
solution.exe
|
||||
@@ -0,0 +1,5 @@
|
||||
all: solution.exe
|
||||
mono $<
|
||||
|
||||
solution.exe: solution.cs
|
||||
mcs $< -o $@
|
||||
Regular → Executable
+1
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env scala
|
||||
import scala.io.StdIn
|
||||
|
||||
object solution {
|
||||
|
||||
Regular → Executable
+1
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
const stdin = process.openStdin();
|
||||
let content = '';
|
||||
|
||||
|
||||
Regular → Executable
+1
@@ -1,3 +1,4 @@
|
||||
///usr/bin/env go run $0 $@ ; exit
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
solution
|
||||
@@ -0,0 +1,5 @@
|
||||
all: solution
|
||||
./$<
|
||||
|
||||
solution: solution.rs
|
||||
rustc $< -o $@
|
||||
@@ -0,0 +1,5 @@
|
||||
all: solution
|
||||
./$<
|
||||
|
||||
solution: solution.hs
|
||||
ghc $< -o $@
|
||||
Regular → Executable
+1
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env groovy
|
||||
void doRotate(List<String> list, String arg) {
|
||||
def amount = Integer.valueOf(arg.substring(1))
|
||||
|
||||
|
||||
Regular → Executable
+1
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env coffee
|
||||
String.prototype.count = (pattern) ->
|
||||
(this.match(pattern) || []).length
|
||||
|
||||
|
||||
Reference in New Issue
Block a user