#include #include using namespace std; char cisla[7] = { 'm', 'd', 'c', 'l', 'x', 'v', 'i' }; int hodnota[7] = { 1000, 500, 100, 50, 10, 5, 1}; int limit[7] = { -1, 1, 3, 1, 3, 1, 3 }; // string read_line() { // char ch; // scanf("%c", &ch); // if (ch != "") // } int main() { string s; while ( getline(cin, s) ) { // s.gets(cin); int cislo = 0; int posl_poloha = 0; bool doslo_k_finte=false; for (int c=0; c<7; c++) { int vyskyty = 0; for (int i=posl_poloha; i= limit[c] && limit[c]!=-1) { if (c==2 || c==4) { // cerr << "hledam pro "<