#include #include #include #include #include using namespace std; int main() { ifstream in("input.txt"); if (in) { vector v; int x; while (in >> x) v.push_back(x); cout << "Введите искомое число:"; cin >> x; int how_much = count(v.begin(), v.end(), x); cout << how_much << endl; list pos_list; vector::iterator pos = v.begin(); while (1) { pos = find(pos, v.end(), x); if (pos == v.end()) break; pos_list.push_back((int) (pos - v.begin())); pos++; } list::iterator i; for (i = pos_list.begin(); i != pos_list.end(); ++i) cout << *i << " "; return 0; } return 1; }