Detalii evaluare #43040874

Rezumat problemă

#4124 colibri

Se dau N triplete de numere naturale (ai, bi, ci), unde ai ≠ 0 și 1 ≤ i ≤ N, fiecare reprezentând câte un număr rațional qi egal cu: \( \frac{(-1)^{a_i}b_i}{c_i} \). Găsiți un subșir nevid al șirului q1, q2, …, qN al cărui produs al valorilor să fie maxim posibil.

ONI 2022, clasa a IX-a

Detalii

Problema colibri Operații I/O colibri.in/colibri.out
Limita timp 0.2 secunde Limita memorie Total: 512 MB / Stivă 8 MB
Id soluție #43040874 Utilizator Ivanovsky Vladan (AlxyD)
Fișier colibri.cpp Dimensiune 3.79 KB
Data încărcării 28 Martie 2023, 16:01 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

colibri.cpp: In function 'Weird undersolve()':
colibri.cpp:47:77: error: parameter declared 'auto'
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                             ^
colibri.cpp:47:85: error: parameter declared 'auto'
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                     ^
colibri.cpp: In lambda function:
colibri.cpp:47:97: error: 'x' was not declared in this scope
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                                 ^
colibri.cpp:47:108: error: 'y' was not declared in this scope
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                                            ^
colibri.cpp: In function 'Weird undersolve()':
colibri.cpp:48:85: error: parameter declared 'auto'
       nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                     ^
colibri.cpp:48:93: error: parameter declared 'auto'
       nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                             ^
colibri.cpp: In lambda function:
colibri.cpp:48:105: error: 'x' was not declared in this scope
       nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                                         ^
colibri.cpp:48:116: error: 'y' was not declared in this scope
       nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                                                    ^
colibri.cpp: In function 'Weird undersolve()':
colibri.cpp:55:75: error: parameter declared 'auto'
   nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                           ^
colibri.cpp:55:83: error: parameter declared 'auto'
   nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                   ^
colibri.cpp: In lambda function:
colibri.cpp:55:95: error: 'x' was not declared in this scope
   nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                               ^
colibri.cpp:55:106: error: 'y' was not declared in this scope
   nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                                          ^
colibri.cpp: In function 'Weird undersolve()':
colibri.cpp:57:75: error: parameter declared 'auto'
     nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                           ^
colibri.cpp:57:83: error: parameter declared 'auto'
     nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                   ^
colibri.cpp: In lambda function:
colibri.cpp:57:95: error: 'x' was not declared in this scope
     nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                               ^
colibri.cpp:57:106: error: 'y' was not declared in this scope
     nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                                          ^
colibri.cpp: In function 'Weird undersolve()':
colibri.cpp:58:83: error: parameter declared 'auto'
     nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                   ^
colibri.cpp:58:91: error: parameter declared 'auto'
     nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                           ^
colibri.cpp: In lambda function:
colibri.cpp:58:103: error: 'x' was not declared in this scope
     nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                                       ^
colibri.cpp:58:114: error: 'y' was not declared in this scope
     nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                                                  ^
colibri.cpp: In function 'int main()':
colibri.cpp:91:12: error: expected unqualified-id before '[' token
   for(auto [ptr, C] : type[2])

            ^
colibri.cpp:91:12: error: expected ';' before '[' token
colibri.cpp:91:13: error: 'ptr' was not declared in this scope
   for(auto [ptr, C] : type[2])

             ^
colibri.cpp:91:18: error: 'C' was not declared in this scope
   for(auto [ptr, C] : type[2])

                  ^
colibri.cpp: In lambda function:
colibri.cpp:91:21: error: expected '{' before ':' token
   for(auto [ptr, C] : type[2])

                     ^
colibri.cpp: In function 'int main()':
colibri.cpp:91:21: error: expected ';' before ':' token
colibri.cpp:91:21: error: expected primary-expression before ':' token
colibri.cpp:91:21: error: expected ')' before ':' token
colibri.cpp:91:21: error: expected primary-expression before ':' token
colibri.cpp:91:21: error: expected ';' before ':' token
colibri.cpp:93:12: error: expected unqualified-id before '[' token
   for(auto [ptr, C] : type[0])

            ^
colibri.cpp:93:12: error: expected ';' before '[' token
colibri.cpp:93:13: error: 'ptr' was not declared in this scope
   for(auto [ptr, C] : type[0])

             ^
colibri.cpp:93:18: error: 'C' was not declared in this scope
   for(auto [ptr, C] : type[0])

                  ^
colibri.cpp: In lambda function:
colibri.cpp:93:21: error: expected '{' before ':' token
   for(auto [ptr, C] : type[0])

                     ^
colibri.cpp: In function 'int main()':
colibri.cpp:93:21: error: expected ';' before ':' token
colibri.cpp:93:21: error: expected primary-expression before ':' token
colibri.cpp:93:21: error: expected ')' before ':' token
colibri.cpp:93:21: error: expected primary-expression before ':' token
colibri.cpp:93:21: error: expected ';' before ':' token
colibri.cpp:102:79: error: parameter declared 'auto'
       nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                               ^
colibri.cpp:102:87: error: parameter declared 'auto'
       nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                       ^
colibri.cpp: In lambda function:
colibri.cpp:102:99: error: 'x' was not declared in this scope
       nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                                   ^
colibri.cpp:102:110: error: 'y' was not declared in this scope
       nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                                              ^
colibri.cpp: In function 'int main()':
colibri.cpp:104:77: error: parameter declared 'auto'
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                             ^
colibri.cpp:104:85: error: parameter declared 'auto'
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                     ^
colibri.cpp: In lambda function:
colibri.cpp:104:97: error: 'x' was not declared in this scope
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                                 ^
colibri.cpp:104:108: error: 'y' was not declared in this scope
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                                            ^
colibri.cpp: In function 'int main()':
colibri.cpp:112:14: error: expected unqualified-id before '[' token
         auto [cost, solution] = undersolve();

              ^
colibri.cpp:114:18: error: expected unqualified-id before '[' token
         for(auto [a, b] : type[2])

                  ^
colibri.cpp:114:18: error: expected ';' before '[' token
colibri.cpp:114:19: error: 'a' was not declared in this scope
         for(auto [a, b] : type[2])

                   ^
colibri.cpp:114:22: error: 'b' was not declared in this scope
         for(auto [a, b] : type[2])

                      ^
colibri.cpp: In lambda function:
colibri.cpp:114:25: error: expected '{' before ':' token
         for(auto [a, b] : type[2])

                         ^
colibri.cpp: In function 'int main()':
colibri.cpp:114:25: error: expected ';' before ':' token
colibri.cpp:114:25: error: expected primary-expression before ':' token
colibri.cpp:114:25: error: expected ')' before ':' token
colibri.cpp:114:25: error: expected primary-expression before ':' token
colibri.cpp:114:25: error: expected ';' before ':' token
colibri.cpp:116:79: error: parameter declared 'auto'
         nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                               ^
colibri.cpp:116:87: error: parameter declared 'auto'
         nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                       ^
colibri.cpp: In lambda function:
colibri.cpp:116:99: error: 'x' was not declared in this scope
         nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                                   ^
colibri.cpp:116:110: error: 'y' was not declared in this scope
         nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                                              ^
colibri.cpp: In function 'int main()':
colibri.cpp:118:18: error: expected unqualified-id before '[' token
         for(auto [a, b] : type[3])

                  ^
colibri.cpp:118:18: error: expected ';' before '[' token
colibri.cpp:118:19: error: 'a' was not declared in this scope
         for(auto [a, b] : type[3])

                   ^
colibri.cpp:118:22: error: 'b' was not declared in this scope
         for(auto [a, b] : type[3])

                      ^
colibri.cpp: In lambda function:
colibri.cpp:118:25: error: expected '{' before ':' token
         for(auto [a, b] : type[3])

                         ^
colibri.cpp: In function 'int main()':
colibri.cpp:118:25: error: expected ';' before ':' token
colibri.cpp:118:25: error: expected primary-expression before ':' token
colibri.cpp:118:25: error: expected ')' before ':' token
colibri.cpp:118:25: error: expected primary-expression before ':' token
colibri.cpp:118:25: error: expected ';' before ':' token
colibri.cpp:120:12: error: 'cost' was not declared in this scope
         if(cost < mine) {

            ^
colibri.cpp:122:20: error: expected unqualified-id before '[' token
           for(auto [a, b] : type[3])

                    ^
colibri.cpp:122:20: error: expected ';' before '[' token
colibri.cpp:122:21: error: 'a' was not declared in this scope
           for(auto [a, b] : type[3])

                     ^
colibri.cpp:122:24: error: 'b' was not declared in this scope
           for(auto [a, b] : type[3])

                        ^
colibri.cpp: In lambda function:
colibri.cpp:122:27: error: expected '{' before ':' token
           for(auto [a, b] : type[3])

                           ^
colibri.cpp: In function 'int main()':
colibri.cpp:122:27: error: expected ';' before ':' token
colibri.cpp:122:27: error: expected primary-expression before ':' token
colibri.cpp:122:27: error: expected ')' before ':' token
colibri.cpp:122:27: error: expected primary-expression before ':' token
colibri.cpp:122:27: error: expected ';' before ':' token
colibri.cpp:126:21: error: 'solution' was not declared in this scope
           swap(rez, solution);

                     ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda4]':
/usr/include/c++/4.8/bits/stl_algo.h:2387:61:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = undersolve()::__lambda4]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda4]'
colibri.cpp:47:119:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: error: no match for call to '(undersolve()::__lambda4) (std::pair<int, double>&, std::pair<int, double>&)'
  if (__comp(*__i, *__first))
                           ^
colibri.cpp:47:70: note: candidates are:
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                      ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note: void (*)() <conversion>
  if (__comp(*__i, *__first))
                           ^
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note:   candidate expects 1 argument, 3 provided
colibri.cpp:47:86: note: undersolve()::__lambda4
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                      ^
colibri.cpp:47:86: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda4]':
/usr/include/c++/4.8/bits/stl_algo.h:2400:52:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = undersolve()::__lambda4]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda4]'
colibri.cpp:47:119:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: error: no match for call to '(undersolve()::__lambda4) (std::pair<int, double>&, std::pair<int, double>&)'
    if (__comp(*__i, *__first))
                             ^
colibri.cpp:47:70: note: candidates are:
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                      ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note: void (*)() <conversion>
    if (__comp(*__i, *__first))
                             ^
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note:   candidate expects 1 argument, 3 provided
colibri.cpp:47:86: note: undersolve()::__lambda4
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                      ^
colibri.cpp:47:86: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda5]':
/usr/include/c++/4.8/bits/stl_algo.h:2387:61:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = undersolve()::__lambda5]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda5]'
colibri.cpp:48:127:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: error: no match for call to '(undersolve()::__lambda5) (std::pair<int, double>&, std::pair<int, double>&)'
  if (__comp(*__i, *__first))
                           ^
colibri.cpp:48:78: note: candidates are:
       nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                              ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note: void (*)() <conversion>
  if (__comp(*__i, *__first))
                           ^
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note:   candidate expects 1 argument, 3 provided
colibri.cpp:48:94: note: undersolve()::__lambda5
       nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                              ^
colibri.cpp:48:94: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda5]':
/usr/include/c++/4.8/bits/stl_algo.h:2400:52:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = undersolve()::__lambda5]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda5]'
colibri.cpp:48:127:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: error: no match for call to '(undersolve()::__lambda5) (std::pair<int, double>&, std::pair<int, double>&)'
    if (__comp(*__i, *__first))
                             ^
colibri.cpp:48:78: note: candidates are:
       nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                              ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note: void (*)() <conversion>
    if (__comp(*__i, *__first))
                             ^
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note:   candidate expects 1 argument, 3 provided
colibri.cpp:48:94: note: undersolve()::__lambda5
       nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                              ^
colibri.cpp:48:94: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda6]':
/usr/include/c++/4.8/bits/stl_algo.h:2387:61:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = undersolve()::__lambda6]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda6]'
colibri.cpp:55:117:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: error: no match for call to '(undersolve()::__lambda6) (std::pair<int, double>&, std::pair<int, double>&)'
  if (__comp(*__i, *__first))
                           ^
colibri.cpp:55:68: note: candidates are:
   nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                    ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note: void (*)() <conversion>
  if (__comp(*__i, *__first))
                           ^
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note:   candidate expects 1 argument, 3 provided
colibri.cpp:55:84: note: undersolve()::__lambda6
   nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                    ^
colibri.cpp:55:84: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda6]':
/usr/include/c++/4.8/bits/stl_algo.h:2400:52:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = undersolve()::__lambda6]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda6]'
colibri.cpp:55:117:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: error: no match for call to '(undersolve()::__lambda6) (std::pair<int, double>&, std::pair<int, double>&)'
    if (__comp(*__i, *__first))
                             ^
colibri.cpp:55:68: note: candidates are:
   nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                    ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note: void (*)() <conversion>
    if (__comp(*__i, *__first))
                             ^
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note:   candidate expects 1 argument, 3 provided
colibri.cpp:55:84: note: undersolve()::__lambda6
   nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                    ^
colibri.cpp:55:84: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda7]':
/usr/include/c++/4.8/bits/stl_algo.h:2387:61:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = undersolve()::__lambda7]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda7]'
colibri.cpp:57:117:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: error: no match for call to '(undersolve()::__lambda7) (std::pair<int, double>&, std::pair<int, double>&)'
  if (__comp(*__i, *__first))
                           ^
colibri.cpp:57:68: note: candidates are:
     nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                    ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note: void (*)() <conversion>
  if (__comp(*__i, *__first))
                           ^
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note:   candidate expects 1 argument, 3 provided
colibri.cpp:57:84: note: undersolve()::__lambda7
     nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                    ^
colibri.cpp:57:84: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda7]':
/usr/include/c++/4.8/bits/stl_algo.h:2400:52:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = undersolve()::__lambda7]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda7]'
colibri.cpp:57:117:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: error: no match for call to '(undersolve()::__lambda7) (std::pair<int, double>&, std::pair<int, double>&)'
    if (__comp(*__i, *__first))
                             ^
colibri.cpp:57:68: note: candidates are:
     nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                    ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note: void (*)() <conversion>
    if (__comp(*__i, *__first))
                             ^
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note:   candidate expects 1 argument, 3 provided
colibri.cpp:57:84: note: undersolve()::__lambda7
     nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                    ^
colibri.cpp:57:84: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda8]':
/usr/include/c++/4.8/bits/stl_algo.h:2387:61:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = undersolve()::__lambda8]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda8]'
colibri.cpp:58:125:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: error: no match for call to '(undersolve()::__lambda8) (std::pair<int, double>&, std::pair<int, double>&)'
  if (__comp(*__i, *__first))
                           ^
colibri.cpp:58:76: note: candidates are:
     nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                            ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note: void (*)() <conversion>
  if (__comp(*__i, *__first))
                           ^
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note:   candidate expects 1 argument, 3 provided
colibri.cpp:58:92: note: undersolve()::__lambda8
     nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                            ^
colibri.cpp:58:92: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda8]':
/usr/include/c++/4.8/bits/stl_algo.h:2400:52:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = undersolve()::__lambda8]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda8]'
colibri.cpp:58:125:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: error: no match for call to '(undersolve()::__lambda8) (std::pair<int, double>&, std::pair<int, double>&)'
    if (__comp(*__i, *__first))
                             ^
colibri.cpp:58:76: note: candidates are:
     nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                            ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note: void (*)() <conversion>
    if (__comp(*__i, *__first))
                             ^
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note:   candidate expects 1 argument, 3 provided
colibri.cpp:58:92: note: undersolve()::__lambda8
     nth_element(type[3].begin() + 1, type[3].begin() + 1, type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                            ^
colibri.cpp:58:92: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = main()::__lambda11]':
/usr/include/c++/4.8/bits/stl_algo.h:2387:61:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = main()::__lambda11]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = main()::__lambda11]'
colibri.cpp:102:121:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: error: no match for call to '(main()::__lambda11) (std::pair<int, double>&, std::pair<int, double>&)'
  if (__comp(*__i, *__first))
                           ^
colibri.cpp:102:72: note: candidates are:
       nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                        ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note: void (*)() <conversion>
  if (__comp(*__i, *__first))
                           ^
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note:   candidate expects 1 argument, 3 provided
colibri.cpp:102:88: note: main()::__lambda11
       nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                        ^
colibri.cpp:102:88: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = main()::__lambda11]':
/usr/include/c++/4.8/bits/stl_algo.h:2400:52:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = main()::__lambda11]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = main()::__lambda11]'
colibri.cpp:102:121:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: error: no match for call to '(main()::__lambda11) (std::pair<int, double>&, std::pair<int, double>&)'
    if (__comp(*__i, *__first))
                             ^
colibri.cpp:102:72: note: candidates are:
       nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                        ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note: void (*)() <conversion>
    if (__comp(*__i, *__first))
                             ^
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note:   candidate expects 1 argument, 3 provided
colibri.cpp:102:88: note: main()::__lambda11
       nth_element(type[2].begin(), type[2].end() - 1, type[2].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                        ^
colibri.cpp:102:88: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = main()::__lambda12]':
/usr/include/c++/4.8/bits/stl_algo.h:2387:61:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = main()::__lambda12]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = main()::__lambda12]'
colibri.cpp:104:119:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: error: no match for call to '(main()::__lambda12) (std::pair<int, double>&, std::pair<int, double>&)'
  if (__comp(*__i, *__first))
                           ^
colibri.cpp:104:70: note: candidates are:
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                      ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note: void (*)() <conversion>
  if (__comp(*__i, *__first))
                           ^
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note:   candidate expects 1 argument, 3 provided
colibri.cpp:104:86: note: main()::__lambda12
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                      ^
colibri.cpp:104:86: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = main()::__lambda12]':
/usr/include/c++/4.8/bits/stl_algo.h:2400:52:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = main()::__lambda12]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = main()::__lambda12]'
colibri.cpp:104:119:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: error: no match for call to '(main()::__lambda12) (std::pair<int, double>&, std::pair<int, double>&)'
    if (__comp(*__i, *__first))
                             ^
colibri.cpp:104:70: note: candidates are:
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                      ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note: void (*)() <conversion>
    if (__comp(*__i, *__first))
                             ^
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note:   candidate expects 1 argument, 3 provided
colibri.cpp:104:86: note: main()::__lambda12
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                      ^
colibri.cpp:104:86: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = main()::__lambda14]':
/usr/include/c++/4.8/bits/stl_algo.h:2387:61:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = main()::__lambda14]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = main()::__lambda14]'
colibri.cpp:116:121:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: error: no match for call to '(main()::__lambda14) (std::pair<int, double>&, std::pair<int, double>&)'
  if (__comp(*__i, *__first))
                           ^
colibri.cpp:116:72: note: candidates are:
         nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                        ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note: void (*)() <conversion>
  if (__comp(*__i, *__first))
                           ^
/usr/include/c++/4.8/bits/stl_algo.h:1948:27: note:   candidate expects 1 argument, 3 provided
colibri.cpp:116:88: note: main()::__lambda14
         nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                        ^
colibri.cpp:116:88: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = main()::__lambda14]':
/usr/include/c++/4.8/bits/stl_algo.h:2400:52:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = main()::__lambda14]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = main()::__lambda14]'
colibri.cpp:116:121:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: error: no match for call to '(main()::__lambda14) (std::pair<int, double>&, std::pair<int, double>&)'
    if (__comp(*__i, *__first))
                             ^
colibri.cpp:116:72: note: candidates are:
         nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                        ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note: void (*)() <conversion>
    if (__comp(*__i, *__first))
                             ^
/usr/include/c++/4.8/bits/stl_algo.h:2159:29: note:   candidate expects 1 argument, 3 provided
colibri.cpp:116:88: note: main()::__lambda14
         nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                        ^
colibri.cpp:116:88: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__move_median_to_first(_Iterator, _Iterator, _Iterator, _Iterator, _Compare) [with _Iterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda4]':
/usr/include/c++/4.8/bits/stl_algo.h:2295:13:   required from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda4]'
/usr/include/c++/4.8/bits/stl_algo.h:2394:62:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = undersolve()::__lambda4]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda4]'
colibri.cpp:47:119:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:114:28: error: no match for call to '(undersolve()::__lambda4) (std::pair<int, double>&, std::pair<int, double>&)'
       if (__comp(*__a, *__b))
                            ^
colibri.cpp:47:70: note: candidates are:
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                      ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:114:28: note: void (*)() <conversion>
       if (__comp(*__a, *__b))
                            ^
/usr/include/c++/4.8/bits/stl_algo.h:114:28: note:   candidate expects 1 argument, 3 provided
colibri.cpp:47:86: note: undersolve()::__lambda4
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                      ^
colibri.cpp:47:86: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:116:25: error: no match for call to '(undersolve()::__lambda4) (std::pair<int, double>&, std::pair<int, double>&)'
    if (__comp(*__b, *__c))
                         ^
colibri.cpp:47:70: note: candidates are:
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                      ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:116:25: note: void (*)() <conversion>
    if (__comp(*__b, *__c))
                         ^
/usr/include/c++/4.8/bits/stl_algo.h:116:25: note:   candidate expects 1 argument, 3 provided
colibri.cpp:47:86: note: undersolve()::__lambda4
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                      ^
colibri.cpp:47:86: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:118:30: error: no match for call to '(undersolve()::__lambda4) (std::pair<int, double>&, std::pair<int, double>&)'
    else if (__comp(*__a, *__c))
                              ^
colibri.cpp:47:70: note: candidates are:
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                      ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:118:30: note: void (*)() <conversion>
    else if (__comp(*__a, *__c))
                              ^
/usr/include/c++/4.8/bits/stl_algo.h:118:30: note:   candidate expects 1 argument, 3 provided
colibri.cpp:47:86: note: undersolve()::__lambda4
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                      ^
colibri.cpp:47:86: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:123:33: error: no match for call to '(undersolve()::__lambda4) (std::pair<int, double>&, std::pair<int, double>&)'
       else if (__comp(*__a, *__c))
                                 ^
colibri.cpp:47:70: note: candidates are:
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                      ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:123:33: note: void (*)() <conversion>
       else if (__comp(*__a, *__c))
                                 ^
/usr/include/c++/4.8/bits/stl_algo.h:123:33: note:   candidate expects 1 argument, 3 provided
colibri.cpp:47:86: note: undersolve()::__lambda4
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                      ^
colibri.cpp:47:86: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:125:33: error: no match for call to '(undersolve()::__lambda4) (std::pair<int, double>&, std::pair<int, double>&)'
       else if (__comp(*__b, *__c))
                                 ^
colibri.cpp:47:70: note: candidates are:
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                      ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:125:33: note: void (*)() <conversion>
       else if (__comp(*__b, *__c))
                                 ^
/usr/include/c++/4.8/bits/stl_algo.h:125:33: note:   candidate expects 1 argument, 3 provided
colibri.cpp:47:86: note: undersolve()::__lambda4
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                      ^
colibri.cpp:47:86: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of '_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Tp = std::pair<int, double>; _Compare = undersolve()::__lambda4]':
/usr/include/c++/4.8/bits/stl_algo.h:2296:78:   required from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda4]'
/usr/include/c++/4.8/bits/stl_algo.h:2394:62:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = undersolve()::__lambda4]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda4]'
colibri.cpp:47:119:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:2263:35: error: no match for call to '(undersolve()::__lambda4) (std::pair<int, double>&, const std::pair<int, double>&)'
    while (__comp(*__first, __pivot))
                                   ^
colibri.cpp:47:70: note: candidates are:
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                      ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:2263:35: note: void (*)() <conversion>
    while (__comp(*__first, __pivot))
                                   ^
/usr/include/c++/4.8/bits/stl_algo.h:2263:35: note:   candidate expects 1 argument, 3 provided
colibri.cpp:47:86: note: undersolve()::__lambda4
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                      ^
colibri.cpp:47:86: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:2266:34: error: no match for call to '(undersolve()::__lambda4) (const std::pair<int, double>&, std::pair<int, double>&)'
    while (__comp(__pivot, *__last))
                                  ^
colibri.cpp:47:70: note: candidates are:
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                      ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:2266:34: note: void (*)() <conversion>
    while (__comp(__pivot, *__last))
                                  ^
/usr/include/c++/4.8/bits/stl_algo.h:2266:34: note:   candidate expects 1 argument, 3 provided
colibri.cpp:47:86: note: undersolve()::__lambda4
       nth_element(type[3].begin(), type[3].begin(), type[3].end(), [&](auto x, auto y) { return x.second < y.second; });

                                                                                      ^
colibri.cpp:47:86: note:   candidate expects 0 arguments, 2 provided
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
                 from colibri.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of 'void std::__move_median_to_first(_Iterator, _Iterator, _Iterator, _Iterator, _Compare) [with _Iterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda5]':
/usr/include/c++/4.8/bits/stl_algo.h:2295:13:   required from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda5]'
/usr/include/c++/4.8/bits/stl_algo.h:2394:62:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Size = int; _Compare = undersolve()::__lambda5]'
/usr/include/c++/4.8/bits/stl_algo.h:5427:44:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, double>*, std::vector<std::pair<int, double> > >; _Compare = undersolve()::__lambda5]'
colibri.cpp:48:127:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:114:28: error: no match for call to '(undersolve()::__lambda5) (std::pair<int, double>&, std::pair<int, double>&)'
       if (__

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 colibri 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ă.