Borderou de evaluare (job #2857311)
Utilizator | Data | 25 februarie 2022 12:34:44 | |
---|---|---|---|
Problema | Divizori | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:28:9: error: 'longint' was not declared in this scope; did you mean 'long'?
28 | map<longint,int> prim;
| ^~~~~~~
| long
main.cpp:28:20: error: template argument 1 is invalid
28 | map<longint,int> prim;
| ^
main.cpp:28:20: error: template argument 3 is invalid
main.cpp:28:20: error: template argument 4 is invalid
main.cpp:33:31: error: invalid types 'int[long int]' for array subscript
33 | if (n % i == 0) { prim[i]++; n=n/i; i=2; }
| ^
main.cpp:36:17: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
36 | for (auto c:prim)
| ^~~~
| std::begin
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from main.cpp:1:
/usr/include/c++/10/bits/range_access.h:108:37: note: 'std::begin' declared here
108 | template<typename _Tp> const _Tp* begin(const valarray<_Tp>&);
| ^~~~~
main.cpp:36:17: error: 'end' was not declared in this scope; did you mean 'std::end'?
36 | for (auto c:prim)
| ^~~~
| std::end
In file included from /usr/include/c++/10/string:54,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from main.cpp:1:
/usr/include/c++/10/bits/range_access.h:110:37: note: 'std::end' declared here
110 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
| ^~~
main.cpp:42:19: error: request for member 'size' in 'prim', which is of non-class type 'int'
42 | divizori(prim.size()-1,1);
| ^~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !