Borderou de evaluare (job #2874764)

Utilizator sabinandreiBocan Sabin Andrei sabinandrei Data 20 martie 2022 10:49:12
Problema Principiul includerii si excluderii Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:1:1: error: 'include' does not name a type 1 | include <bits/stdc++.h> | ^~~~~~~ main.cpp:7:1: error: 'LL' does not name a type 7 | LL a, b; | ^~ main.cpp:9:6: error: 'vector' in namespace 'std' does not name a template type 9 | std::vector<int> primes; | ^~~~~~ main.cpp:1:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? +++ |+#include <vector> 1 | include <bits/stdc++.h> main.cpp:11:6: error: 'vector' in namespace 'std' does not name a template type 11 | std::vector<LL> factors; | ^~~~~~ main.cpp:11:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? 11 | std::vector<LL> factors; | ^~~ main.cpp:13:6: error: 'bitset' in namespace 'std' does not name a template type 13 | std::bitset<PRIME_MAX> not_prime; | ^~~~~~ main.cpp:1:1: note: 'std::bitset' is defined in header '<bitset>'; did you forget to '#include <bitset>'? +++ |+#include <bitset> 1 | include <bits/stdc++.h> main.cpp: In function 'void sieve()': main.cpp:17:1: error: 'not_prime' was not declared in this scope 17 | not_prime[1] = 1; | ^~~~~~~~~ main.cpp:19:1: error: 'primes' was not declared in this scope 19 | primes.push_back(2); | ^~~~~~ main.cpp: In function 'void find_factors()': main.cpp:43:1: error: 'factors' was not declared in this scope 43 | factors.clear(); | ^~~~~~~ main.cpp:45:6: error: 'vector' is not a member of 'std' 45 | std::vector<int>::iterator prime = primes.begin(); | ^~~~~~ main.cpp:45:6: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? main.cpp:45:13: error: expected primary-expression before 'int' 45 | std::vector<int>::iterator prime = primes.begin(); | ^~~ main.cpp:47:14: error: 'primes' was not declared in this scope 47 | for (auto p: primes) { | ^~~~~~ main.cpp:49:13: error: 'b' was not declared in this scope 49 | if (p * p > b) | ^ main.cpp:53:5: error: 'b' was not declared in this scope 53 | if (b % p == 0) { Non zero exit status: 1

Ceva nu functioneaza?