Problem | abcs |
---|---|
User | dzuizz |
Submission Time | 2024-08-03 21:45:16 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
abcs.cpp: In function ‘int main()’:
abcs.cpp:7:2: error: ‘map’ was not declared in this scope
7 | map<int, bool> mp;
| ^~~
abcs.cpp:2:1: note: ‘std::map’ is defined in header ‘<map>’; did you forget to ‘#include <map>’?
1 | #include <iostream>
+++ |+#include <map>
2 | using namespace std;
abcs.cpp:7:6: error: expected primary-expression before ‘int’
7 | map<int, bool> mp;
| ^~~
abcs.cpp:12:7: error: redeclaration of ‘int i’
12 | int i = 0;
| ^
abcs.cpp:9:11: note: ‘int i’ previously declared here
9 | for (int i = 0; i < n; ++i) {
| ^
abcs.cpp:14:3: error: ‘mp’ was not declared in this scope
14 | mp[i] = 1;
| ^~
abcs.cpp:19:10: error: ‘mp’ was not declared in this scope
19 | while (!mp[++ptr]) cout << "a";
| ^~