Skip to content

Instantly share code, notes, and snippets.


Nicolas François nfrancois

View GitHub Profile
nfrancois / oneline_kirk_descent
Created Mar 28, 2014
From Codingame Challenge : Kirk's Quest - The descent - Dart Solution in oneline
View oneline_kirk_descent
import 'dart:io';
import 'dart:collection';
void main() => new List.filled(10, true).forEach((_) => print(stdin.readLineSync().split(' ').map((s) => int.parse(s)).toList()[0] == new SplayTreeMap.fromIterable(new List.generate(8, (i) =>i), key: (_) => int.parse(stdin.readLineSync())).values.last ? 'FIRE' : 'HOLD'));
View Naive Santa
// Naive solution for
With :
["Zoe Washburne", "Hoban Washburne", "Malcolm Reynolds", "Simon Tam", "River Tam", "Buffy Summers", "Dawn Summers"];
Output is :
Malcolm Reynolds is santa for Zoe Washburne
Simon Tam is santa for Hoban Washburne
River Tam is santa for Malcolm Reynolds
Buffy Summers is santa for Simon Tam