Problem | primepie |
---|---|
User | Tracxr |
Submission Time | 2023-03-09 20:24:04 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
primepie.cpp: In function ‘long long int amountEaten(int)’:
primepie.cpp:8:2: error: ‘vector’ was not declared in this scope
8 | vector<bool> is_prime(n+1, true);
| ^~~~~~
primepie.cpp:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include "primepie.h";
+++ |+#include <vector>
2 | using namespace std;
primepie.cpp:8:9: error: expected primary-expression before ‘bool’
8 | vector<bool> is_prime(n+1, true);
| ^~~~
primepie.cpp:9:2: error: ‘is_prime’ was not declared in this scope
9 | is_prime[0] = is_prime[1] = false;
| ^~~~~~~~
primepie.cpp:10:9: error: expected primary-expression before ‘long’
10 | vector<long long int> ans;
| ^~~~
primepie.cpp:22:2: error: ‘ans’ was not declared in this scope
22 | ans.push_back(0);
| ^~~