Borderou de evaluare (job #3326827)
| Utilizator | Data | 30 noiembrie 2025 18:24:40 | |
|---|---|---|---|
| Problema | Shukarime | Status | done |
| Runda | Arhiva ICPC | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp:6:71: error: 'constexpr const long long int random' redeclared as different kind of entity
6 | constexpr int MAXN = 1e5, MAXV = 1e6, MOD1 = 1e9 + 7, MOD2 = 1e9 + 9, random = 4737248;
| ^~~~~~
In file included from /usr/include/c++/12.2.1/bits/std_abs.h:38,
from /usr/include/c++/12.2.1/cmath:47,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:41,
from main.cpp:1:
/usr/include/stdlib.h:402:17: note: previous declaration 'long int random()'
402 | extern long int random (void) __THROW;
| ^~~~~~
main.cpp: In function 'void precalc()':
main.cpp:27:32: error: invalid operands of types 'long long int' and 'long int() noexcept' to binary 'operator*'
27 | p[i] = {p[i - 1].first * random % MOD1, p[i - 1].second * random % MOD2};
| ~~~~~~~~~~~~~~ ^ ~~~~~~
| | |
| | long int() noexcept
| long long int
main.cpp:27:65: error: invalid operands of types 'long long int' and 'long int() noexcept' to binary 'operator*'
27 | p[i] = {p[i - 1].first * random % MOD1, p[i - 1].second * random % MOD2};
| ~~~~~~~~~~~~~~~ ^ ~~~~~~
| | |
| | long int() noexcept
| long long int
main.cpp:27:80: error: no match for 'operator=' (operand types are 'std::pair<long long int, long long int>' and '<brace-enclosed initializer list>')
27 | p[i] = {p[i - 1].first * random % MOD1, p[i - 1].second * random % MOD2};
| ^
In file included from /usr/include/c++/12.2.1/bits/stl_algobase.h:64,
from /usr/include/c++/12.2.1/bits/specfun.h:45,
from /usr/include/c++/12.2.1/cmath:1935:
/usr/include/c++/12.2.1/bits/stl_pair.h:353:9: note: candidate: 'template<class _U1, class _U2> constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) requires _S_assignable<const _U1&, const _U2&>() [with _U2 = _U1; _T1 = long long int; _T2 = long long int]'
353 | operator=(const pair<_U1, _U2>& __p)
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_pair.h:353:9: note: template argument deduction/substitution failed:
main.cpp:27:80: note: couldn't deduce template parameter '_U1'
27 | p[i] = {p[i - 1].first * random % MOD1, p[i - 1].second * random % MOD2};
| ^
/usr/include/c++/12.2.1/bits/stl_pair.h:365:9: note: candidate: 'template<class _U1, class _U2> constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) requires _S_assignable<_U1, _U2>() [with _U2 = _U1; _T1 = long long int; _T2 = long long int]'
365 | operator=(pair<_U1, _U2>&& __p)
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_pair.h:365:9: note: template argument deduction/substitution failed:
main.cpp:27:80: note: couldn't deduce template parameter '_U1'
27 | p[i] = {p[i - 1].first * random % MOD1, p[i - 1].second * random % MOD2};
| ^
/usr/include/c++/12.2.1/bits/stl_pair.h:330:7: note: candidate: 'constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_T1, _T2>&) requires _S_assignable<const _T1&, const _T2&>() [with _T1 = long long int; _T2 = long long int]'
330 | operator=(const pair& __p)
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_pair.h:330:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::pair<long long int, long long int>&'
330 | operator=(const pair& __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/12.2.1/bits/stl_pair.h:341:7: note: candidate: 'constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_T1, _T2>&&) requires _S_assignable<_T1, _T2>() [with _T1 = long long int; _T2 = long long int]'
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
