#line 9103 "smat.w" #line 5507 "smat.w" #include "smat.h" #include #include #include #include #include #include #include #include #ifdef linux #include #endif #line 9103 "smat.w" #include "smatsim.h" using namespace std; template static void update_range(T& lm, T& um, unsigned lower, unsigned upper) { unsigned ltag = (lower >> 24), utag = (upper >> 24); if (lm[(ltag) * 256] == 0) { lm[(ltag) * 256] = 1; lm[ltag] = lower; } else if (lower < lm[ltag]) lm[ltag] = lower; if (um[(utag) * 256] == 0) { um[(utag) * 256] = 1; um[utag] = upper; } else if (um[utag] < upper) um[utag] = upper; } int main() { map lm, um; ios::sync_with_stdio(false); cin.tie(0); for (istream_iterator i(cin), e; i != e; ++i) { (*i).write_readable(); update_range(lm, um, (*i).addr, (*i).addr + (*i).size); } map::iterator mi; for (mi = lm.begin(); mi != lm.end(); ++mi) { if ((*mi).first <= 0xff) { cerr << hex << setw(2) << setfill('0') << ((*mi).second >> 24) << " 0x" << hex << setw(8) << setfill('0') << (*mi).second << " 0x" << hex << setw(8) << setfill('0') << um[(*mi).first] << dec << ' ' << (*mi).second << ' ' << um[(*mi).first] << '\n'; } } return EXIT_SUCCESS; }