Created
October 15, 2013 09:59
-
-
Save dividedmind/6989334 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env ruby | |
# solution of http://uva.onlinejudge.org/external/13/1339.pdf | |
ARGF.map {|x| x.strip.chars.group_by(&:to_s).values.map(&:length).sort }. | |
each_slice(2) {|a, b| puts a == b ? 'YES' : 'NO' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment