Detalii evaluare #61291483

Rezumat problemă

#3731

Tommy este un motan alintat care adoră să se plimbe prin orice tunel. De aceea, stăpânii lui i-au construit o nouă jucărie, formată din N tuneluri interconectate (etichetate cu numerele distincte de la 1 la N. Toate tunelurile au aceeași lungime, sunt formate din M elemente unitare identice (numerotate cu numerele distincte de la 1 la M) și au ieșiri la ambele capete. Conectarea dintre două tuneluri alăturate se face printr-un element unitar numit pasaj.

Pentru a fi mai provocator, stăpânii motanului plasează în ultimul element unitar al ultimului tunel o recompensă.

Ajutați-l pe Tommy să ajungă cât mai repede la recompensă respectând regulile jocului!

OSEPI 2021
Fișiere Minca Carmen (carmen) Prof. Cristina Sichim concurs

Detalii

Problema tunel2 Operații I/O tunel2.in/tunel2.out
Limita timp 0.07 secunde Limita memorie Total: 39 MB / Stivă 39 MB
Id soluție #61291483 Utilizator solomon alexandru noah (alibecguy)
Fișier tunel2.cpp Dimensiune 5.94 KB
Data încărcării 23 Noiembrie 2025, 22:04 Scor/rezultat Eroare de compilare

Evaluare

Mesaj compilare

tunel2.cpp:81:1: error: stray '\310' in program
 Descoperiți mai multe

 ^
tunel2.cpp:81:1: error: stray '\233' in program
tunel2.cpp:82:1: error: stray '\310' in program
 Educație

 ^
tunel2.cpp:82:1: error: stray '\233' in program
tunel2.cpp:85:1: error: stray '\310' in program
 educaționale

 ^
tunel2.cpp:85:1: error: stray '\233' in program
tunel2.cpp:205:1: error: stray '\310' in program
 Descoperiți mai multe

 ^
tunel2.cpp:205:1: error: stray '\233' in program
tunel2.cpp:214:1: error: stray '\310' in program
 educaționale

 ^
tunel2.cpp:214:1: error: stray '\233' in program
tunel2.cpp:81:1: error: 'Descoperi' does not name a type
 Descoperiți mai multe

 ^
tunel2.cpp:98:11: error: redefinition of 'std::ifstream f'
 ifstream f("tunel2.in");

           ^
tunel2.cpp:5:10: error: 'std::ifstream f' previously declared here
 ifstream f("tunel2.in");

          ^
tunel2.cpp:99:11: error: redefinition of 'std::ofstream g'
 ofstream g("tunel2.out");

           ^
tunel2.cpp:6:10: error: 'std::ofstream g' previously declared here
 ofstream g("tunel2.out");

          ^
tunel2.cpp: In function 'int main()':
tunel2.cpp:198:5: error: redefinition of 'int main()'
 int main() {

     ^
tunel2.cpp:61:5: error: 'int main()' previously defined here
 int main()

     ^
tunel2.cpp: At global scope:
tunel2.cpp:205:1: error: 'Descoperi' does not name a type
 Descoperiți mai multe

 ^
In file included from /usr/include/c++/4.8/set:61:0,
                 from tunel2.cpp:218:
/usr/include/c++/4.8/bits/stl_set.h:113:15: error: '_Rb_tree' does not name a type
       typedef _Rb_tree<key_type, value_type, _Identity<value_type>,
               ^
/usr/include/c++/4.8/bits/stl_set.h:115:7: error: '_Rep_type' does not name a type
       _Rep_type _M_t;  // Red-black tree representing set.
       ^
/usr/include/c++/4.8/bits/stl_set.h:127:24: error: '_Rep_type' has not been declared
       typedef typename _Rep_type::const_iterator            iterator;
                        ^
/usr/include/c++/4.8/bits/stl_set.h:128:24: error: '_Rep_type' has not been declared
       typedef typename _Rep_type::const_iterator            const_iterator;
                        ^
/usr/include/c++/4.8/bits/stl_set.h:129:24: error: '_Rep_type' has not been declared
       typedef typename _Rep_type::const_reverse_iterator    reverse_iterator;
                        ^
/usr/include/c++/4.8/bits/stl_set.h:130:24: error: '_Rep_type' has not been declared
       typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
                        ^
/usr/include/c++/4.8/bits/stl_set.h:131:24: error: '_Rep_type' has not been declared
       typedef typename _Rep_type::size_type                 size_type;
                        ^
/usr/include/c++/4.8/bits/stl_set.h:132:24: error: '_Rep_type' has not been declared
       typedef typename _Rep_type::difference_type           difference_type;
                        ^
/usr/include/c++/4.8/bits/stl_set.h: In constructor 'std::set<_Key, _Compare, _Alloc>::set()':
/usr/include/c++/4.8/bits/stl_set.h:140:9: error: class 'std::set<_Key, _Compare, _Alloc>' does not have any field named '_M_t'
       : _M_t() { }
         ^
/usr/include/c++/4.8/bits/stl_set.h: In constructor 'std::set<_Key, _Compare, _Alloc>::set(const _Compare&, const allocator_type&)':
/usr/include/c++/4.8/bits/stl_set.h:150:9: error: class 'std::set<_Key, _Compare, _Alloc>' does not have any field named '_M_t'
       : _M_t(__comp, _Key_alloc_type(__a)) { }
         ^
/usr/include/c++/4.8/bits/stl_set.h: In constructor 'std::set<_Key, _Compare, _Alloc>::set(_InputIterator, _InputIterator)':
/usr/include/c++/4.8/bits/stl_set.h:164:4: error: class 'std::set<_Key, _Compare, _Alloc>' does not have any field named '_M_t'
  : _M_t()
    ^
/usr/include/c++/4.8/bits/stl_set.h:165:4: error: '_M_t' was not declared in this scope
  { _M_t._M_insert_unique(__first, __last); }
    ^
/usr/include/c++/4.8/bits/stl_set.h: In constructor 'std::set<_Key, _Compare, _Alloc>::set(_InputIterator, _InputIterator, const _Compare&, const allocator_type&)':
/usr/include/c++/4.8/bits/stl_set.h:183:4: error: class 'std::set<_Key, _Compare, _Alloc>' does not have any field named '_M_t'
  : _M_t(__comp, _Key_alloc_type(__a))
    ^
/usr/include/c++/4.8/bits/stl_set.h:184:11: error: '_M_t' was not declared in this scope
         { _M_t._M_insert_unique(__first, __last); }
           ^
/usr/include/c++/4.8/bits/stl_set.h: In copy constructor 'std::set<_Key, _Compare, _Alloc>::set(const std::set<_Key, _Compare, _Alloc>&)':
/usr/include/c++/4.8/bits/stl_set.h:194:9: error: class 'std::set<_Key, _Compare, _Alloc>' does not have any field named '_M_t'
       : _M_t(__x._M_t) { }
         ^
/usr/include/c++/4.8/bits/stl_set.h: In constructor 'std::set<_Key, _Compare, _Alloc>::set(std::set<_Key, _Compare, _Alloc>&&)':
/usr/include/c++/4.8/bits/stl_set.h:206:9: error: class 'std::set<_Key, _Compare, _Alloc>' does not have any field named '_M_t'
       : _M_t(std::move(__x._M_t)) { }
         ^
/usr/include/c++/4.8/bits/stl_set.h: In constructor 'std::set<_Key, _Compare, _Alloc>::set(std::initializer_list<_Tp>, const _Compare&, const allocator_type&)':
/usr/include/c++/4.8/bits/stl_set.h:221:9: error: class 'std::set<_Key, _Compare, _Alloc>' does not have any field named '_M_t'
       : _M_t(__comp, _Key_alloc_type(__a))
         ^
/usr/include/c++/4.8/bits/stl_set.h:222:9: error: '_M_t' was not declared in this scope
       { _M_t._M_insert_unique(__l.begin(), __l.end()); }
         ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>& std::set<_Key, _Compare, _Alloc>::operator=(const std::set<_Key, _Compare, _Alloc>&)':
/usr/include/c++/4.8/bits/stl_set.h:235:2: error: '_M_t' was not declared in this scope
  _M_t = __x._M_t;
  ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::key_compare std::set<_Key, _Compare, _Alloc>::key_comp() const':
/usr/include/c++/4.8/bits/stl_set.h:282:16: error: '_M_t' was not declared in this scope
       { return _M_t.key_comp(); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::value_compare std::set<_Key, _Compare, _Alloc>::value_comp() const':
/usr/include/c++/4.8/bits/stl_set.h:286:16: error: '_M_t' was not declared in this scope
       { return _M_t.key_comp(); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::allocator_type std::set<_Key, _Compare, _Alloc>::get_allocator() const':
/usr/include/c++/4.8/bits/stl_set.h:290:31: error: '_M_t' was not declared in this scope
       { return allocator_type(_M_t.get_allocator()); }
                               ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::begin() const':
/usr/include/c++/4.8/bits/stl_set.h:299:16: error: '_M_t' was not declared in this scope
       { return _M_t.begin(); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::end() const':
/usr/include/c++/4.8/bits/stl_set.h:308:16: error: '_M_t' was not declared in this scope
       { return _M_t.end(); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::reverse_iterator std::set<_Key, _Compare, _Alloc>::rbegin() const':
/usr/include/c++/4.8/bits/stl_set.h:317:16: error: '_M_t' was not declared in this scope
       { return _M_t.rbegin(); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::reverse_iterator std::set<_Key, _Compare, _Alloc>::rend() const':
/usr/include/c++/4.8/bits/stl_set.h:326:16: error: '_M_t' was not declared in this scope
       { return _M_t.rend(); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::cbegin() const':
/usr/include/c++/4.8/bits/stl_set.h:336:16: error: '_M_t' was not declared in this scope
       { return _M_t.begin(); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::cend() const':
/usr/include/c++/4.8/bits/stl_set.h:345:16: error: '_M_t' was not declared in this scope
       { return _M_t.end(); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::reverse_iterator std::set<_Key, _Compare, _Alloc>::crbegin() const':
/usr/include/c++/4.8/bits/stl_set.h:354:16: error: '_M_t' was not declared in this scope
       { return _M_t.rbegin(); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::reverse_iterator std::set<_Key, _Compare, _Alloc>::crend() const':
/usr/include/c++/4.8/bits/stl_set.h:363:16: error: '_M_t' was not declared in this scope
       { return _M_t.rend(); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'bool std::set<_Key, _Compare, _Alloc>::empty() const':
/usr/include/c++/4.8/bits/stl_set.h:369:16: error: '_M_t' was not declared in this scope
       { return _M_t.empty(); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::size() const':
/usr/include/c++/4.8/bits/stl_set.h:374:16: error: '_M_t' was not declared in this scope
       { return _M_t.size(); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::max_size() const':
/usr/include/c++/4.8/bits/stl_set.h:379:16: error: '_M_t' was not declared in this scope
       { return _M_t.max_size(); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'void std::set<_Key, _Compare, _Alloc>::swap(std::set<_Key, _Compare, _Alloc>&)':
/usr/include/c++/4.8/bits/stl_set.h:394:9: error: '_M_t' was not declared in this scope
       { _M_t.swap(__x._M_t); }
         ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::pair<int, bool> std::set<_Key, _Compare, _Alloc>::emplace(_Args&& ...)':
/usr/include/c++/4.8/bits/stl_set.h:414:11: error: '_M_t' was not declared in this scope
  { return _M_t._M_emplace_unique(std::forward<_Args>(__args)...); }
           ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::emplace_hint(std::set<_Key, _Compare, _Alloc>::const_iterator, _Args&& ...)':
/usr/include/c++/4.8/bits/stl_set.h:441:11: error: '_M_t' was not declared in this scope
    return _M_t._M_emplace_hint_unique(__pos,
           ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::pair<int, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&)':
/usr/include/c++/4.8/bits/stl_set.h:462:46: error: wrong number of template arguments (1, should be 2)
  std::pair<typename _Rep_type::iterator, bool> __p =
                                              ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from tunel2.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:96:12: error: provided for 'template<class _T1, class _T2> struct std::pair'
     struct pair
            ^
In file included from /usr/include/c++/4.8/set:61:0,
                 from tunel2.cpp:218:
/usr/include/c++/4.8/bits/stl_set.h:462:52: error: invalid type in declaration before '=' token
  std::pair<typename _Rep_type::iterator, bool> __p =
                                                    ^
/usr/include/c++/4.8/bits/stl_set.h:463:4: error: '_M_t' was not declared in this scope
    _M_t._M_insert_unique(__x);
    ^
/usr/include/c++/4.8/bits/stl_set.h:464:39: error: request for member 'first' in '__p', which is of non-class type 'int'
  return std::pair<iterator, bool>(__p.first, __p.second);
                                       ^
/usr/include/c++/4.8/bits/stl_set.h:464:50: error: request for member 'second' in '__p', which is of non-class type 'int'
  return std::pair<iterator, bool>(__p.first, __p.second);
                                                  ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::pair<int, bool> std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::value_type&&)':
/usr/include/c++/4.8/bits/stl_set.h:471:46: error: wrong number of template arguments (1, should be 2)
  std::pair<typename _Rep_type::iterator, bool> __p =
                                              ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from tunel2.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:96:12: error: provided for 'template<class _T1, class _T2> struct std::pair'
     struct pair
            ^
In file included from /usr/include/c++/4.8/set:61:0,
                 from tunel2.cpp:218:
/usr/include/c++/4.8/bits/stl_set.h:471:52: error: invalid type in declaration before '=' token
  std::pair<typename _Rep_type::iterator, bool> __p =
                                                    ^
/usr/include/c++/4.8/bits/stl_set.h:472:4: error: '_M_t' was not declared in this scope
    _M_t._M_insert_unique(std::move(__x));
    ^
/usr/include/c++/4.8/bits/stl_set.h:473:39: error: request for member 'first' in '__p', which is of non-class type 'int'
  return std::pair<iterator, bool>(__p.first, __p.second);
                                       ^
/usr/include/c++/4.8/bits/stl_set.h:473:50: error: request for member 'second' in '__p', which is of non-class type 'int'
  return std::pair<iterator, bool>(__p.first, __p.second);
                                                  ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, const value_type&)':
/usr/include/c++/4.8/bits/stl_set.h:498:16: error: '_M_t' was not declared in this scope
       { return _M_t._M_insert_unique_(__position, __x); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::value_type&&)':
/usr/include/c++/4.8/bits/stl_set.h:503:16: error: '_M_t' was not declared in this scope
       { return _M_t._M_insert_unique_(__position, std::move(__x)); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator)':
/usr/include/c++/4.8/bits/stl_set.h:518:4: error: '_M_t' was not declared in this scope
  { _M_t._M_insert_unique(__first, __last); }
    ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator)':
/usr/include/c++/4.8/bits/stl_set.h:552:16: error: '_M_t' was not declared in this scope
       { return _M_t.erase(__position); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::erase(const key_type&)':
/usr/include/c++/4.8/bits/stl_set.h:582:16: error: '_M_t' was not declared in this scope
       { return _M_t.erase(__x); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::const_iterator)':
/usr/include/c++/4.8/bits/stl_set.h:604:16: error: '_M_t' was not declared in this scope
       { return _M_t.erase(__first, __last); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'void std::set<_Key, _Compare, _Alloc>::clear()':
/usr/include/c++/4.8/bits/stl_set.h:631:9: error: '_M_t' was not declared in this scope
       { _M_t.clear(); }
         ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::count(const key_type&) const':
/usr/include/c++/4.8/bits/stl_set.h:645:16: error: '_M_t' was not declared in this scope
       { return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&)':
/usr/include/c++/4.8/bits/stl_set.h:663:16: error: '_M_t' was not declared in this scope
       { return _M_t.find(__x); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::const_iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&) const':
/usr/include/c++/4.8/bits/stl_set.h:667:16: error: '_M_t' was not declared in this scope
       { return _M_t.find(__x); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::lower_bound(const key_type&)':
/usr/include/c++/4.8/bits/stl_set.h:684:16: error: '_M_t' was not declared in this scope
       { return _M_t.lower_bound(__x); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::const_iterator std::set<_Key, _Compare, _Alloc>::lower_bound(const key_type&) const':
/usr/include/c++/4.8/bits/stl_set.h:688:16: error: '_M_t' was not declared in this scope
       { return _M_t.lower_bound(__x); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::upper_bound(const key_type&)':
/usr/include/c++/4.8/bits/stl_set.h:700:16: error: '_M_t' was not declared in this scope
       { return _M_t.upper_bound(__x); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::set<_Key, _Compare, _Alloc>::const_iterator std::set<_Key, _Compare, _Alloc>::upper_bound(const key_type&) const':
/usr/include/c++/4.8/bits/stl_set.h:704:16: error: '_M_t' was not declared in this scope
       { return _M_t.upper_bound(__x); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::pair<int, int> std::set<_Key, _Compare, _Alloc>::equal_range(const key_type&)':
/usr/include/c++/4.8/bits/stl_set.h:725:16: error: '_M_t' was not declared in this scope
       { return _M_t.equal_range(__x); }
                ^
/usr/include/c++/4.8/bits/stl_set.h: In member function 'std::pair<int, int> std::set<_Key, _Compare, _Alloc>::equal_range(const key_type&) const':
/usr/include/c++/4.8/bits/stl_set.h:729:16: error: '_M_t' was not declared in this scope
       { return _M_t.equal_range(__x); }
                ^
In file included from /usr/include/c++/4.8/set:62:0,
                 from tunel2.cpp:218:
/usr/include/c++/4.8/bits/stl_multiset.h: At global scope:
/usr/include/c++/4.8/bits/stl_multiset.h:113:15: error: '_Rb_tree' does not name a type
       typedef _Rb_tree<key_type, value_type, _Identity<value_type>,
               ^
/usr/include/c++/4.8/bits/stl_multiset.h:116:7: error: '_Rep_type' does not name a type
       _Rep_type _M_t;
       ^
/usr/include/c++/4.8/bits/stl_multiset.h:126:24: error: '_Rep_type' has not been declared
       typedef typename _Rep_type::const_iterator            iterator;
                        ^
/usr/include/c++/4.8/bits/stl_multiset.h:127:24: error: '_Rep_type' has not been declared
       typedef typename _Rep_type::const_iterator            const_iterator;
                        ^
/usr/include/c++/4.8/bits/stl_multiset.h:128:24: error: '_Rep_type' has not been declared
       typedef typename _Rep_type::const_reverse_iterator    reverse_iterator;
                        ^
/usr/include/c++/4.8/bits/stl_multiset.h:129:24: error: '_Rep_type' has not been declared
       typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
                        ^
/usr/include/c++/4.8/bits/stl_multiset.h:130:24: error: '_Rep_type' has not been declared
       typedef typename _Rep_type::size_type                 size_type;
                        ^
/usr/include/c++/4.8/bits/stl_multiset.h:131:24: error: '_Rep_type' has not been declared
       typedef typename _Rep_type::difference_type           difference_type;
                        ^
/usr/include/c++/4.8/bits/stl_multiset.h: In constructor 'std::multiset<_Key, _Compare, _Alloc>::multiset()':
/usr/include/c++/4.8/bits/stl_multiset.h:138:9: error: class 'std::multiset<_Key, _Compare, _Alloc>' does not have any field named '_M_t'
       : _M_t() { }
         ^
/usr/include/c++/4.8/bits/stl_multiset.h: In constructor 'std::multiset<_Key, _Compare, _Alloc>::multiset(const _Compare&, const allocator_type&)':
/usr/include/c++/4.8/bits/stl_multiset.h:148:9: error: class 'std::multiset<_Key, _Compare, _Alloc>' does not have any field named '_M_t'
       : _M_t(__comp, _Key_alloc_type(__a)) { }
         ^
/usr/include/c++/4.8/bits/stl_multiset.h: In constructor 'std::multiset<_Key, _Compare, _Alloc>::multiset(_InputIterator, _InputIterator)':
/usr/include/c++/4.8/bits/stl_multiset.h:161:4: error: class 'std::multiset<_Key, _Compare, _Alloc>' does not have any field named '_M_t'
  : _M_t()
    ^
/usr/include/c++/4.8/bits/stl_multiset.h:162:11: error: '_M_t' was not declared in this scope
         { _M_t._M_insert_equal(__first, __last); }
           ^
/usr/include/c++/4.8/bits/stl_multiset.h: In constructor 'std::multiset<_Key, _Compare, _Alloc>::multiset(_InputIterator, _InputIterator, const _Compare&, const allocator_type&)':
/usr/include/c++/4.8/bits/stl_multiset.h:179:4: error: class 'std::multiset<_Key, _Compare, _Alloc>' does not have any field named '_M_t'
  : _M_t(__comp, _Key_alloc_type(__a))
    ^
/usr/include/c++/4.8/bits/stl_multiset.h:180:11: error: '_M_t' was not declared in this scope
         { _M_t._M_insert_equal(__first, __last); }
           ^
/usr/include/c++/4.8/bits/stl_multiset.h: In copy constructor 'std::multiset<_Key, _Compare, _Alloc>::multiset(const std::multiset<_Key, _Compare, _Alloc>&)':
/usr/include/c++/4.8/bits/stl_multiset.h:190:9: error: class 'std::multiset<_Key, _Compare, _Alloc>' does not have any field named '_M_t'
       : _M_t(__x._M_t) { }
         ^
/usr/include/c++/4.8/bits/stl_multiset.h: In constructor 'std::multiset<_Key, _Compare, _Alloc>::multiset(std::multiset<_Key, _Compare, _Alloc>&&)':
/usr/include/c++/4.8/bits/stl_multiset.h:202:9: error: class 'std::multiset<_Key, _Compare, _Alloc>' does not have any field named '_M_t'
       : _M_t(std::move(__x._M_t)) { }
         ^
/usr/include/c++/4.8/bits/stl_multiset.h: In constructor 'std::multiset<_Key, _Compare, _Alloc>::multiset(std::initializer_list<_Tp>, const _Compare&, const allocator_type&)':
/usr/include/c++/4.8/bits/stl_multiset.h:217:9: error: class 'std::multiset<_Key, _Compare, _Alloc>' does not have any field named '_M_t'
       : _M_t(__comp, _Key_alloc_type(__a))
         ^
/usr/include/c++/4.8/bits/stl_multiset.h:218:9: error: '_M_t' was not declared in this scope
       { _M_t._M_insert_equal(__l.begin(), __l.end()); }
         ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>& std::multiset<_Key, _Compare, _Alloc>::operator=(const std::multiset<_Key, _Compare, _Alloc>&)':
/usr/include/c++/4.8/bits/stl_multiset.h:231:2: error: '_M_t' was not declared in this scope
  _M_t = __x._M_t;
  ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::key_compare std::multiset<_Key, _Compare, _Alloc>::key_comp() const':
/usr/include/c++/4.8/bits/stl_multiset.h:279:16: error: '_M_t' was not declared in this scope
       { return _M_t.key_comp(); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::value_compare std::multiset<_Key, _Compare, _Alloc>::value_comp() const':
/usr/include/c++/4.8/bits/stl_multiset.h:283:16: error: '_M_t' was not declared in this scope
       { return _M_t.key_comp(); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::allocator_type std::multiset<_Key, _Compare, _Alloc>::get_allocator() const':
/usr/include/c++/4.8/bits/stl_multiset.h:287:31: error: '_M_t' was not declared in this scope
       { return allocator_type(_M_t.get_allocator()); }
                               ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::begin() const':
/usr/include/c++/4.8/bits/stl_multiset.h:296:16: error: '_M_t' was not declared in this scope
       { return _M_t.begin(); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::end() const':
/usr/include/c++/4.8/bits/stl_multiset.h:305:16: error: '_M_t' was not declared in this scope
       { return _M_t.end(); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::reverse_iterator std::multiset<_Key, _Compare, _Alloc>::rbegin() const':
/usr/include/c++/4.8/bits/stl_multiset.h:314:16: error: '_M_t' was not declared in this scope
       { return _M_t.rbegin(); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::reverse_iterator std::multiset<_Key, _Compare, _Alloc>::rend() const':
/usr/include/c++/4.8/bits/stl_multiset.h:323:16: error: '_M_t' was not declared in this scope
       { return _M_t.rend(); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::cbegin() const':
/usr/include/c++/4.8/bits/stl_multiset.h:333:16: error: '_M_t' was not declared in this scope
       { return _M_t.begin(); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::cend() const':
/usr/include/c++/4.8/bits/stl_multiset.h:342:16: error: '_M_t' was not declared in this scope
       { return _M_t.end(); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::reverse_iterator std::multiset<_Key, _Compare, _Alloc>::crbegin() const':
/usr/include/c++/4.8/bits/stl_multiset.h:351:16: error: '_M_t' was not declared in this scope
       { return _M_t.rbegin(); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::reverse_iterator std::multiset<_Key, _Compare, _Alloc>::crend() const':
/usr/include/c++/4.8/bits/stl_multiset.h:360:16: error: '_M_t' was not declared in this scope
       { return _M_t.rend(); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'bool std::multiset<_Key, _Compare, _Alloc>::empty() const':
/usr/include/c++/4.8/bits/stl_multiset.h:366:16: error: '_M_t' was not declared in this scope
       { return _M_t.empty(); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::size_type std::multiset<_Key, _Compare, _Alloc>::size() const':
/usr/include/c++/4.8/bits/stl_multiset.h:371:16: error: '_M_t' was not declared in this scope
       { return _M_t.size(); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::size_type std::multiset<_Key, _Compare, _Alloc>::max_size() const':
/usr/include/c++/4.8/bits/stl_multiset.h:376:16: error: '_M_t' was not declared in this scope
       { return _M_t.max_size(); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'void std::multiset<_Key, _Compare, _Alloc>::swap(std::multiset<_Key, _Compare, _Alloc>&)':
/usr/include/c++/4.8/bits/stl_multiset.h:391:9: error: '_M_t' was not declared in this scope
       { _M_t.swap(__x._M_t); }
         ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::emplace(_Args&& ...)':
/usr/include/c++/4.8/bits/stl_multiset.h:410:11: error: '_M_t' was not declared in this scope
  { return _M_t._M_emplace_equal(std::forward<_Args>(__args)...); }
           ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::emplace_hint(std::multiset<_Key, _Compare, _Alloc>::const_iterator, _Args&& ...)':
/usr/include/c++/4.8/bits/stl_multiset.h:437:11: error: '_M_t' was not declared in this scope
    return _M_t._M_emplace_hint_equal(__pos,
           ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(const value_type&)':
/usr/include/c++/4.8/bits/stl_multiset.h:455:16: error: '_M_t' was not declared in this scope
       { return _M_t._M_insert_equal(__x); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(std::multiset<_Key, _Compare, _Alloc>::value_type&&)':
/usr/include/c++/4.8/bits/stl_multiset.h:460:16: error: '_M_t' was not declared in this scope
       { return _M_t._M_insert_equal(std::move(__x)); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(std::multiset<_Key, _Compare, _Alloc>::const_iterator, const value_type&)':
/usr/include/c++/4.8/bits/stl_multiset.h:485:16: error: '_M_t' was not declared in this scope
       { return _M_t._M_insert_equal_(__position, __x); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(std::multiset<_Key, _Compare, _Alloc>::const_iterator, std::multiset<_Key, _Compare, _Alloc>::value_type&&)':
/usr/include/c++/4.8/bits/stl_multiset.h:490:16: error: '_M_t' was not declared in this scope
       { return _M_t._M_insert_equal_(__position, std::move(__x)); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'void std::multiset<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator)':
/usr/include/c++/4.8/bits/stl_multiset.h:504:11: error: '_M_t' was not declared in this scope
         { _M_t._M_insert_equal(__first, __last); }
           ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::erase(std::multiset<_Key, _Compare, _Alloc>::const_iterator)':
/usr/include/c++/4.8/bits/stl_multiset.h:538:16: error: '_M_t' was not declared in this scope
       { return _M_t.erase(__position); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::size_type std::multiset<_Key, _Compare, _Alloc>::erase(const key_type&)':
/usr/include/c++/4.8/bits/stl_multiset.h:568:16: error: '_M_t' was not declared in this scope
       { return _M_t.erase(__x); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::erase(std::multiset<_Key, _Compare, _Alloc>::const_iterator, std::multiset<_Key, _Compare, _Alloc>::const_iterator)':
/usr/include/c++/4.8/bits/stl_multiset.h:590:16: error: '_M_t' was not declared in this scope
       { return _M_t.erase(__first, __last); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'void std::multiset<_Key, _Compare, _Alloc>::clear()':
/usr/include/c++/4.8/bits/stl_multiset.h:617:9: error: '_M_t' was not declared in this scope
       { _M_t.clear(); }
         ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::size_type std::multiset<_Key, _Compare, _Alloc>::count(const key_type&) const':
/usr/include/c++/4.8/bits/stl_multiset.h:628:16: error: '_M_t' was not declared in this scope
       { return _M_t.count(__x); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::find(const key_type&)':
/usr/include/c++/4.8/bits/stl_multiset.h:646:16: error: '_M_t' was not declared in this scope
       { return _M_t.find(__x); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::const_iterator std::multiset<_Key, _Compare, _Alloc>::find(const key_type&) const':
/usr/include/c++/4.8/bits/stl_multiset.h:650:16: error: '_M_t' was not declared in this scope
       { return _M_t.find(__x); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::lower_bound(const key_type&)':
/usr/include/c++/4.8/bits/stl_multiset.h:667:16: error: '_M_t' was not declared in this scope
       { return _M_t.lower_bound(__x); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::const_iterator std::multiset<_Key, _Compare, _Alloc>::lower_bound(const key_type&) const':
/usr/include/c++/4.8/bits/stl_multiset.h:671:16: error: '_M_t' was not declared in this scope
       { return _M_t.lower_bound(__x); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::upper_bound(const key_type&)':
/usr/include/c++/4.8/bits/stl_multiset.h:683:16: error: '_M_t' was not declared in this scope
       { return _M_t.upper_bound(__x); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::multiset<_Key, _Compare, _Alloc>::const_iterator std::multiset<_Key, _Compare, _Alloc>::upper_bound(const key_type&) const':
/usr/include/c++/4.8/bits/stl_multiset.h:687:16: error: '_M_t' was not declared in this scope
       { return _M_t.upper_bound(__x); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::pair<int, int> std::multiset<_Key, _Compare, _Alloc>::equal_range(const key_type&)':
/usr/include/c++/4.8/bits/stl_multiset.h:708:16: error: '_M_t' was not declared in this scope
       { return _M_t.equal_range(__x); }
                ^
/usr/include/c++/4.8/bits/stl_multiset.h: In member function 'std::pair<int, int> std::multiset<_Key, _Compare, _Alloc>::equal_range(const key_type&) const':
/usr/include/c++/4.8/bits/stl_multiset.h:712:16: error: '_M_t' was not declared in this scope
       { return _M_t.equal_range(__x); }
                ^
tunel2.cpp: At global scope:
tunel2.cpp:222:11: error: redefinition of 'std::ifstream f'
 ifstream f("tunel2.in");

           ^
tunel2.cpp:5:10: error: 'std::ifstream f' previously declared here
 ifstream f("tunel2.in");

          ^
tunel2.cpp:223:11: error: redefinition of 'std::ofstream g'
 ofstream g("tunel2.out");

           ^
tunel2.cpp:6:10: error: 'std::ofstream g' previously declared here
 ofstream g("tunel2.out");

          ^
tunel2.cpp:225:11: error: redefinition of 'const int NMAX'
 const int NMAX = 1000;

           ^
tunel2.cpp:101:11: error: 'const int NMAX' previously defined here
 const int NMAX = 1000;

           ^
tunel2.cpp:226:11: error: redefinition of 'const int MMAX'
 const int MMAX = 200000;

           ^
tunel2.cpp:102:11: error: 'const int MMAX' previously defined here
 const int MMAX = 20000;

           ^
tunel2.cpp:228:11: error: redefinition of 'const int SUS'
 const int SUS = 0;

           ^
tunel2.cpp:104:11: error: 'const int SUS' previously defined here
 const int SUS = 0;

           ^
tunel2.cpp:229:11: error: redefinition of 'const int JOS'
 const int JOS = 1;

           ^
tunel2.cpp:105:11: error: 'const int JOS' previously defined here
 const int JOS = 1;

           ^
tunel2.cpp:230:11: error: redefinition of 'const int STANGA'
 const int STANGA = 2;

           ^
tunel2.cpp:106:11: error: 'const int STANGA' previously defined here
 const int STANGA = 2;

           ^
tunel2.cpp:231:11: error: redefinition of 'const int DREAPTA'
 const int DREAPTA = 3;

           ^
tunel2.cpp:107:11: error: 'const int DREAPTA' previously defined here
 const int DREAPTA = 3;

           ^
tunel2.cpp:233:5: error: redefinition of 'int c'
 int c, n, m, x;

     ^
tunel2.cpp:109:5: error: 'int c' previously declared here
 int c, n, m, x;

     ^
tunel2.cpp:233:8: error: redefinition of 'int n'
 int c, n, m, x;

        ^
tunel2.cpp:109:8: error: 'int n' previously declared here
 int c, n, m, x;

        ^
tunel2.cpp:233:11: error: redefinition of 'int m'
 int c, n, m, x;

           ^
tunel2.cpp:109:11: error: 'int m' previously declared here
 int c, n, m, x;

           ^
tunel2.cpp:233:14: error: redefinition of 'int x'
 int c, n, m, x;

              ^
tunel2.cpp:109:14: error: 'int x' previously declared here
 int c, n, m, x;

              ^
tunel2.cpp:235:32: error: conflicting declaration 'std::set<int> pasaj_in_jos [20002]'
 set <int> pasaj_in_jos[MMAX + 2];

                                ^
tunel2.cpp:111:14: error: 'pasaj_in_jos' has a previous declaration as 'std::vector<int> pasaj_in_jos [20002]'
 vector <int> pasaj_in_jos[MMAX + 2];

              ^
tunel2.cpp: In function 'void citeste()':
tunel2.cpp:237:6: error: redefinition of 'void citeste()'
 void citeste() {

      ^
tunel2.cpp:113:6: error: 'void citeste()' previously defined here
 void citeste() {

      ^
tunel2.cpp:247:39: error: no matching function for call to 'std::vector<int>::insert(int&)'
             pasaj_in_jos[poz].insert(i);

                                       ^
tunel2.cpp:247:39: note: candidates are:
In file included from /usr/include/c++/4.8/vector:69:0,
                 from tunel2.cpp:94:
/usr/include/c++/4.8/bits/vector.tcc:107:5: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::iterator, const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*; std::vector<_Tp, _Alloc>::value_type = int]
     vector<_Tp, _Alloc>::
     ^
/usr/include/c++/4.8/bits/vector.tcc:107:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/4.8/vector:64:0,
                 from tunel2.cpp:94:
/usr/include/c++/4.8/bits/stl_vector.h:988:7: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::iterator, std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*; std::vector<_Tp, _Alloc>::value_type = int]
       insert(iterator __position, value_type&& __x)
       ^
/usr/include/c++/4.8/bits/stl_vector.h:988:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/4.8/bits/stl_vector.h:1005:7: note: void std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::iterator, std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*]
       insert(iterator __position, initializer_list<value_type> __l)
       ^
/usr/include/c++/4.8/bits/stl_vector.h:1005:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/4.8/bits/stl_vector.h:1023:7: note: void std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::iterator, std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*; std::vector<_Tp, _Alloc>::size_type = unsigned int; std::vector<_Tp, _Alloc>::value_type = int]
       insert(iterator __position, size_type __n, const value_type& __x)
       ^
/usr/include/c++/4.8/bits/stl_vector.h:1023:7: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/4.8/bits/stl_vector.h:1044:9: note: template<class _InputIterator, class> void std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::iterator, _InputIterator, _InputIterator) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _Tp = int; _Alloc = std::allocator<int>]
         insert(iterator __position, _InputIterator __first,
         ^
/usr/include/c++/4.8/bits/stl_vector.h:1044:9: note:   template argument deduction/substitution failed:
tunel2.cpp:247:39: note:   cannot convert 'i' (type 'int') to type 'std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}'
             pasaj_in_jos[poz].insert(i);

                                       ^
tunel2.cpp: In function 'bool am_pasaj_in_jos(int, int)':
tunel2.cpp:252:6: error: redefinition of 'bool am_pasaj_in_jos(int, int)'
 bool am_pasaj_in_jos(int i, int j) {

      ^
tunel2.cpp:128:6: error: 'bool am_pasaj_in_jos(int, int)' previously defined here
 bool am_pasaj_in_jos(int i, int j) {

      ^
tunel2.cpp:253:28: error: 'class std::vector<int>' has no member named 'find'
     return pasaj_in_jos[j].find(i) != pasaj_in_jos[j].end();

                            ^
tunel2.cpp: In function 'bool am_pasaj_in_sus(int, int)':
tunel2.cpp:256:6: error: redefinition of 'bool am_pasaj_in_sus(int, int)'
 bool am_pasaj_in_sus(int i, int j) {

      ^
tunel2.cpp:140:6: error: 'bool am_pasaj_in_sus(int, int)' previously defined here
 bool am_pasaj_in_sus(int i, int j) {

      ^
tunel2.cpp: In function 'void c1()':
tunel2.cpp:260:6: error: redefinition of 'void c1()'
 void c1() {

      ^
tunel2.cpp:144:6: error: 'void c1()' previously defined here
 void c1() {

      ^
tunel2.cpp: In function 'int traseu_c2(int, int, int, int)':
tunel2.cpp:284:5: error: redefinition of 'int traseu_c2(int, int, int, int)'
 int traseu_c2(int i, int j, int vin_din, int pasaje) {

     ^
tunel2.cpp:168:5: error: 'int traseu_c2(int, int, int, int)' previously defined here
 int traseu_c2(int i, int j, int vin_din, int pasaje) {

     ^
tunel2.cpp: In function 'void c2()':
tunel2.cpp:307:6: error: redefinition of 'void c2()'
 void c2() {

      ^
tunel2.cpp:191:6: error: 'void c2()' previously defined here
 void c2() {

      ^
tunel2.cpp: In function 'int main()':
tunel2.cpp:314:5: error: redefinition of 'int main()'
 int main() {

     ^
tunel2.cpp:61:5: error: 'int main()' previously defined here
 int main()

     ^
tunel2.cpp: In function 'bool am_pasaj_in_jos(int, int)':
tunel2.cpp:254:1: warning: control reaches end of non-void function [-Wreturn-type]
 }

 ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema tunel2 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.

Du-te sus!