ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1567. SMS-spam

AC
Posted by Anton 10 Nov 2011 05:08
Very easy. Just use int array in this way: a[ 'b' ] = 2, a[ ' ' ] = 1, and so on.
So after such initialization we just have to read char from input stream and add a[ c ] to res.

Edited by author 10.11.2011 05:09