/** * Osaki (Problem B, Practice Contest for Japan Domestic, 2007-06-24) * by Kenji Inoue, 2007-06-25 **/ #include #include #include using namespace std; struct Event { string time; int type; // 0 = start, 1 = end int operator<(const Event &a) const { return time != a.time ? time < a.time : type > a.type; } }; int main() { int n; while (cin >> n, n) { vector ev; for (int i=0; i> s >> e; Event start = {s, 0}; Event end = {e, 1}; ev.push_back(start); ev.push_back(end); } sort(ev.begin(), ev.end()); int max = 0, current = 0; for (int i=0; i max) { max = current; } } cout << max << endl; } return 0; }