No solution is fastest. Here are a few things that COULD be done however: -

1.) Read as many bytes from the file as possible in one go.

2.) Make no more than a single parse.

3.) Use unrolling in case of loops.

And the good thing about the conversions:
> Arabic -> Roman is greedy
> Roman -> Arabic is incremental in that each roman numeral contributes an exact amount (without any positional factor) to the total.

mayur

mayur
On 11/15/05, HalFas` <[EMAIL PROTECTED]> wrote:
Task:
 
in file are text which made of words. separators are known. Change all numbers, if you find Arabic numerals then change them to Roman numerals and conversely (if you find Roman numerals then change them to Arabic numerals). Change just numbers that belongs to interval [1, 100].
 
INCLUDE area:
#include <fstream>
#include <iomanip>
using namespace std;
 
Note:
Need very fast and optimized way for this task!
 
Any volunteers to create fastest solution? Any suggestions?

 
 


 
 
 

 

Reply via email to