This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Naive solution for https://plus.google.com/+SethLadd/posts/XjgFRvqtVA4 | |
/* | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 | |
3 | |
1 | |
2 | |
5 |