#include #include #include #include #include #include using namespace std; int main(){ int n,people=0,ans=0; cin >> n; vector cost(n-1); for(int i=0;i> cost[i]; vector b(n),c(n); for(int i=0;i> b[i] >> c[i]; for(int i=0;i