#include <iostream> #include <algorithm> using namespace std; struct dat { int s; int f; bool operator<(const dat& com) { return f < com.f; } }dict[1005]; int main() { int n; cin >> n; int k = n; int index = 0; while (k--)...