Borderou de evaluare (job #658888)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Prime (clasa a 5-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 25 aug. 2022 16:21:35 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:25:69: error: 'constexpr auto Generate() [with unsigned int N = 100000]' called in a constant expression
25 | constexpr std::array<bool, 100'000> prime = Generate<100000>();
| ~~~~~~~~~~~~~~~~^~
main.cpp:8:16: note: 'constexpr auto Generate() [with unsigned int N = 100000]' is not usable as a 'constexpr' function because:
8 | constexpr auto Generate()
| ^~~~~~~~
main.cpp:12:9: error: call to non-'constexpr' function 'std::array<_Tp, _Nm>::value_type* std::array<_Tp, _Nm>::begin() [with _Tp = bool; unsigned int _Nm = 100000; std::array<_Tp, _Nm>::iterator = bool*]'
12 | for (auto& p : is_prime)
| ^~~
In file included from main.cpp:2:
/usr/lib/gcc/i686-pc-linux-gnu/11.3.0/include/g++-v11/array:127:7: note: 'std::array<_Tp, _Nm>::value_type* std::array<_Tp, _Nm>::begin() [with _Tp = bool; unsigned int _Nm = 100000; std::array<_Tp, _Nm>::iterator = bool*]' declared here
127 | begin() noexcept
| ^~~~~