Back to Archive
Computer Science
QID: #53508
Subject: Computer Science
Status:
Order This Question Now
You shall write a C++ program that:
Reads an arbitrary number of whitespace-delimited tokens from standard input.
Determines and prints (to standard output) two decimal integer values:
The number of input tokens that are valid Scrabble words (case-insensitive), i.e. those that can be found in /srv/datasets/scrabble-hybrid.
The total number of points that all those words would be worth in Scrabble, according to the letter values in /srv/datasets/scrabble-letter-values.
Specific Requirements
You may assume that the number of valid words and the total number of points will not exceed the range of an unsigned 64-bit integer.
Open and read the contents of each relevant data file exactly once.
Make sure to use STL components that will avoid any gross inefficiencies (excessive computation and/or storage) in your program. Your program should at least be able to process each of the example inputs below in no more than 5 seconds, on our server.
Print the two integer values in the order specified above, and make sure your output contains no other numeric decimal values. Otherwise, the format of output is up to you.
ZERO AI
Human Written
Human Written
PHD EXPERTS
Verified
Verified
TURNITIN
Clean Report
Clean Report
24/7 SUPPORT
Instant Help
Instant Help