Problem nystudy
User StormyGood
Submission Time 2025-01-17 21:51:10
Score 0
Max Time N/A
Max Memory N/A

Compile Error

nystudy.cpp: In function ‘int main()’:
nystudy.cpp:7:19: error: ‘n’ was not declared in this scope
7 | set<int>books(n);
| ^
nystudy.cpp:10:21: error: no match for ‘operator[]’ (operand types are ‘std::set<int>’ and ‘int’)
10 | cin >> books[i];
| ^
nystudy.cpp:18:14: error: expected unqualified-id before ‘.’ token
18 | stack.erase(it);
| ^
nystudy.cpp:19:14: error: expected unqualified-id before ‘.’ token
19 | stack.push_back(bookID);
| ^
nystudy.cpp:24:22: error: missing template arguments before ‘[’ token
24 | cout << stack[i] << " ";
| ^