Borderou de evaluare (job #753578)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Divprimi (clasa a 10-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 2 ian. 2024 16:21:57 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:25:5: error: 'vector' was not declared in this scope
25 | vector<unsigned int> v;
| ^~~~~~
main.cpp:4:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
3 | #include <algorithm>
+++ |+#include <vector>
4 |
main.cpp:25:12: error: expected primary-expression before 'unsigned'
25 | vector<unsigned int> v;
| ^~~~~~~~
main.cpp:28:19: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
28 | for(int i=2; i<=N; i++) {
| ~^~~
main.cpp:30:27: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
30 | for(int j=i; j<=N; j+=i) {
| ~^~~
main.cpp:35:19: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
35 | for(int i=1; i<=N; i++) {
| ~^~~
main.cpp:36:9: error: 'v' was not declared in this scope
36 | v.push_back(i);
| ^
main.cpp:38:10: error: 'v' was not declared in this scope
38 | sort(v.begin(), v.end(), sortare);
| ^