diff options
author | carhaas <carhaas1@gmail.com> | 2014-09-09 09:31:07 +0200 |
---|---|---|
committer | carhaas <carhaas1@gmail.com> | 2014-09-09 09:31:07 +0200 |
commit | 4dd862953695849412cef0d8d840266a0a8c86cf (patch) | |
tree | c28951147b1386c7725e3afc31020a527f647eec /scripts/free917/sigf_format.rb | |
parent | 25fa34e5c4275cdd4a4ca735c12b4b22f7ed7c0e (diff) |
add free917
Diffstat (limited to 'scripts/free917/sigf_format.rb')
-rw-r--r-- | scripts/free917/sigf_format.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/free917/sigf_format.rb b/scripts/free917/sigf_format.rb new file mode 100644 index 0000000..beac2e7 --- /dev/null +++ b/scripts/free917/sigf_format.rb @@ -0,0 +1,20 @@ +#!/usr/bin/env ruby + +require 'zipf' + + +gold = ReadFile.readlines_strip ARGV[0] +i = -1 +while line = STDIN.gets + i += 1 + line.strip! + a = [0, 0, 1] + if line==gold[i] + a[0] = 1 + a[1] = 1 + elsif line!='' + a[1] = 1 + end + puts a.join " " +end + |