UVa 10062

From Algorithmist

Jump to: navigation, search

Contents

[edit] 10062 - Tell me the frequencies!

[edit] Summary

This is a standard sorting problem. Since N \leq 96, a short O(N2) algorithm will work too.

[edit] Explanation

This is as straightforward as it's going to get.

[edit] Gotcha's

  • Watch out for the non-alphanumerics.
  • Be careful with the output presentation. There is a blank line between the two adjacent outputs, but there is no blank lines after the last output.

[edit] Input

AAABBC
122333

[edit] Output

67 1
66 2
65 3

49 1
50 2
51 3
Personal tools