#include <iostream> #include <string> #include <vector> using namespace std; int main(){ int N, begin = -1, end = -1; cin >> N; vector<int> v; int tmp; while (N--){ cin >> tmp; v.push_back(tmp); } for (int i = 0; i<v.size(); i++){ if (v[i] == 1){ beg...