Problem primesort
User dzuizz
Submission Time 2024-06-20 13:12:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

primesort.cpp:4:1: error: ‘vector’ does not name a type
4 | vector<int> primes;
| ^~~~~~
primesort.cpp:8:3: error: ‘map’ does not name a type
8 | map<int, node*> mp;
| ^~~
primesort.cpp: In member function ‘void node::add(int)’:
primesort.cpp:18:30: error: ‘primes’ was not declared in this scope
18 | for (int i = 0; i < (int)primes.size(); ++i) {
| ^~~~~~
primesort.cpp:20:13: error: ‘mp’ was not declared in this scope
20 | if (mp[i] == nullptr) {
| ^~
primesort.cpp:24:9: error: ‘mp’ was not declared in this scope
24 | mp[i]->add(x / primes[i]);
| ^~
primesort.cpp: In member function ‘void node::qry(int)’:
primesort.cpp:33:7: error: ‘cout’ was not declared in this scope
33 | cout << x << '\n';
| ^~~~
primesort.cpp:34:30: error: ‘primes’ was not declared in thi