Problem swapbuildings
User j0ashhh
Submission Time 2026-01-11 11:07:57
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swapbuildings.cpp: In function ‘int main()’:
swapbuildings.cpp:10:2: error: ‘unordred_map’ was not declared in this scope
10 | unordred_map<int, int> freq;
| ^~~~~~~~~~~~
swapbuildings.cpp:10:15: error: expected primary-expression before ‘int’
10 | unordred_map<int, int> freq;
| ^~~
swapbuildings.cpp:12:3: error: ‘freq’ was not declared in this scope; did you mean ‘free’?
12 | freq[x]++;
| ^~~~
| free
swapbuildings.cpp:15:23: error: ‘freq’ was not declared in this scope; did you mean ‘free’?
15 | for(auto& [val, c] : freq){
| ^~~~
| free
swapbuildings.cpp:18:16: error: ‘n’ cannot be used as a function
18 | cout << (n(n-1)/2) - amt;
| ^