Problem photo
User WJR
Submission Time 2026-02-20 21:54:49
Score 0
Max Time N/A
Max Memory N/A

Compile Error

photo.cpp: In function ‘int main()’:
photo.cpp:18:25: error: multiple types in one declaration
18 | unordered_map<int,int> class;
| ^~~~~
photo.cpp:18:25: error: declaration does not declare anything [-fpermissive]
photo.cpp:18:25: error: expected primary-expression before ‘class’
photo.cpp:22:6: error: expected primary-expression before ‘class’
22 | if(class[cn] == 0){
| ^~~~~
photo.cpp:22:6: error: expected ‘)’ before ‘class’
22 | if(class[cn] == 0){
| ~^~~~~
| )
photo.cpp:25:8: error: structured binding declaration cannot have type ‘int’
25 | class[cn]++;
| ^~~~
photo.cpp:25:8: note: type must be cv-qualified ‘auto’ or reference to cv-qualified ‘auto’
photo.cpp:25:9: error: conflicting declaration ‘auto cn’
25 | class[cn]++;
| ^~
photo.cpp:21:7: note: previous declaration as ‘long long int cn’
21 |