Problem sealevel
User chickengoat
Submission Time 2026-04-25 11:18:38
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sealevel.cpp:4:10: error: uninitialized const ‘n’ [-fpermissive]
4 | const ll n;
| ^
sealevel.cpp:5:15: error: size of array ‘visited’ is not an integral constant-expression
5 | bool visited[n+1];
| ~^~
sealevel.cpp:6:1: error: ‘height’ does not name a type
6 | height[n+1];
| ^~~~~~
sealevel.cpp: In function ‘void dfs(ll)’:
sealevel.cpp:10:13: error: ‘adjlist’ was not declared in this scope
10 | for(auto i:adjlist[x]) {
| ^~~~~~~
sealevel.cpp:11:3: error: ‘height’ was not declared in this scope
11 | height[i.first]=height[x]+i.second;
| ^~~~~~
sealevel.cpp: In function ‘int main()’:
sealevel.cpp:17:6: error: no match for ‘operator>>’ (operand types are ‘std::istream’ {aka ‘std::basic_istream<char>’} and ‘const ll’ {aka ‘const long long int’})
17 | cin >> n;
| ~~~ ^~ ~
| | |
| | const ll