#include #include #include int main() { char line[10001]; char chars[] = "mdclxvi"; int numbers[] = {1000, 500, 100, 50, 10, 5, 1}; int max_count[] = {10000, 1, 3, 1, 3, 1, 3}; int len, lastpos, count; int num =0; while (!feof(stdin)) { line[0] = '\0'; fgets(line, 10000, stdin); len = strlen(line); lastpos = 0; num = 0; for (unsigned c = 0; c < strlen(chars); c++) { count = 0; for (int pos = lastpos; pos < len; pos++) { if (line[pos] == chars[c] && count