█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 650

Problema 0x62 - Contar elementos mayores a X en un arreglo pequeño

  • Autor: Rafael
  • Fecha: 2020-09-13 21:30:37 UTC (Hace más de 4 años)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      main.cpp:16:32: error: no member named 'bengin' in 'std::vector<int, std::allocator<int> >'; did you mean 'begin'?
    int aux = lower_bound(nums.bengin(), nums.end(), k) - nums.begin();
                               ^~~~~~
                               begin
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h:698:7: note: 'begin' declared here
      begin() _GLIBCXX_NOEXCEPT
      ^
1 error generated.

                    
#2
Error de compilación
                      main.cpp:16:32: error: no member named 'bengin' in 'std::vector<int, std::allocator<int> >'; did you mean 'begin'?
    int aux = lower_bound(nums.bengin(), nums.end(), k) - nums.begin();
                               ^~~~~~
                               begin
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h:698:7: note: 'begin' declared here
      begin() _GLIBCXX_NOEXCEPT
      ^
1 error generated.

                    
#3
Error de compilación
                      main.cpp:16:32: error: no member named 'bengin' in 'std::vector<int, std::allocator<int> >'; did you mean 'begin'?
    int aux = lower_bound(nums.bengin(), nums.end(), k) - nums.begin();
                               ^~~~~~
                               begin
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h:698:7: note: 'begin' declared here
      begin() _GLIBCXX_NOEXCEPT
      ^
1 error generated.

                    
#4
Error de compilación
                      main.cpp:16:32: error: no member named 'bengin' in 'std::vector<int, std::allocator<int> >'; did you mean 'begin'?
    int aux = lower_bound(nums.bengin(), nums.end(), k) - nums.begin();
                               ^~~~~~
                               begin
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h:698:7: note: 'begin' declared here
      begin() _GLIBCXX_NOEXCEPT
      ^
1 error generated.

                    
#5
Error de compilación
                      main.cpp:16:32: error: no member named 'bengin' in 'std::vector<int, std::allocator<int> >'; did you mean 'begin'?
    int aux = lower_bound(nums.bengin(), nums.end(), k) - nums.begin();
                               ^~~~~~
                               begin
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h:698:7: note: 'begin' declared here
      begin() _GLIBCXX_NOEXCEPT
      ^
1 error generated.

                    
#6
Error de compilación
                      main.cpp:16:32: error: no member named 'bengin' in 'std::vector<int, std::allocator<int> >'; did you mean 'begin'?
    int aux = lower_bound(nums.bengin(), nums.end(), k) - nums.begin();
                               ^~~~~~
                               begin
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h:698:7: note: 'begin' declared here
      begin() _GLIBCXX_NOEXCEPT
      ^
1 error generated.

                    
#7
Error de compilación
                      main.cpp:16:32: error: no member named 'bengin' in 'std::vector<int, std::allocator<int> >'; did you mean 'begin'?
    int aux = lower_bound(nums.bengin(), nums.end(), k) - nums.begin();
                               ^~~~~~
                               begin
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h:698:7: note: 'begin' declared here
      begin() _GLIBCXX_NOEXCEPT
      ^
1 error generated.

                    
#8
Error de compilación
                      main.cpp:16:32: error: no member named 'bengin' in 'std::vector<int, std::allocator<int> >'; did you mean 'begin'?
    int aux = lower_bound(nums.bengin(), nums.end(), k) - nums.begin();
                               ^~~~~~
                               begin
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h:698:7: note: 'begin' declared here
      begin() _GLIBCXX_NOEXCEPT
      ^
1 error generated.

                    
#9
Error de compilación
                      main.cpp:16:32: error: no member named 'bengin' in 'std::vector<int, std::allocator<int> >'; did you mean 'begin'?
    int aux = lower_bound(nums.bengin(), nums.end(), k) - nums.begin();
                               ^~~~~~
                               begin
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h:698:7: note: 'begin' declared here
      begin() _GLIBCXX_NOEXCEPT
      ^
1 error generated.

                    
#10
Error de compilación
                      main.cpp:16:32: error: no member named 'bengin' in 'std::vector<int, std::allocator<int> >'; did you mean 'begin'?
    int aux = lower_bound(nums.bengin(), nums.end(), k) - nums.begin();
                               ^~~~~~
                               begin
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h:698:7: note: 'begin' declared here
      begin() _GLIBCXX_NOEXCEPT
      ^
1 error generated.

                    
Puntos totales: 0 / 100

Código

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
  int n, c, k;
  cin >> n;
  vector<int> nums(n);
  for (int i = 0; i < n; i++)
    cin >> nums[i];
  cin >> c;
  for (int i = 0; i < c; i++) {
    cin >> k;
    int aux = lower_bound(nums.bengin(), nums.end(), k) - nums.begin();
    cout << aux << endl;
  }
  return 0;
}