Problem area_noi
User JAYLIU
Submission Time 2024-02-19 10:46:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

area_noi.cpp:4:11: error: redefinition of ‘int n’
4 | int n, h, n, i, size, largest;
| ^
area_noi.cpp:4:5: note: ‘int n’ previously declared here
4 | int n, h, n, i, size, largest;
| ^
area_noi.cpp: In function ‘int main()’:
area_noi.cpp:9:14: error: ‘w’ was not declared in this scope
9 | cin >> h >> w;
| ^
area_noi.cpp:14:3: error: reference to ‘size’ is ambiguous
14 | size = h * w;
| ^~~~
In file included from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from area_noi.cpp:1:
/usr/include/c++/9/bits/range_access.h:252:5: note: candidates are: ‘template<class _T