Submission #992927

#TimeUsernameProblemLanguageResultExecution timeMemory
992927vjudge1Cave (IOI13_cave)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "cave.h" using namespace std; void exploreCave(int n) { int s[n] = {}, d[n] = {}; iota(d, d + n); for (int i = 0; i < n; i++) s[i] = tryCombination(s) == i; answer(s, d); return ; }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:7:15: error: no matching function for call to 'iota(int [n], int*)'
    7 |  iota(d, d + n);
      |               ^
In file included from /usr/include/c++/10/numeric:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:84,
                 from cave.cpp:1:
/usr/include/c++/10/bits/stl_numeric.h:88:5: note: candidate: 'template<class _ForwardIterator, class _Tp> void std::iota(_ForwardIterator, _ForwardIterator, _Tp)'
   88 |     iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
      |     ^~~~
/usr/include/c++/10/bits/stl_numeric.h:88:5: note:   template argument deduction/substitution failed:
cave.cpp:7:15: note:   candidate expects 3 arguments, 2 provided
    7 |  iota(d, d + n);
      |               ^