Problem rootedlca
User r1r2r3r4
Submission Time 2026-02-25 14:45:56
Score 0
Max Time N/A
Max Memory N/A

Compile Error

rootedlca.cpp: In function ‘int main()’:
rootedlca.cpp:76:33: error: no match for ‘operator>>’ (operand types are ‘std::basic_ostream<char>::__ostream_type’ {aka ‘std::basic_ostream<char>’} and ‘char’)
76 | cout << lca(a-1, b-1)+1 >> '\n';
| ~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~
| | |
| | char
| std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
rootedlca.cpp:76:33: note: candidate: ‘operator>>(int, int)’ <built-in>
76 | cout << lca(a-1, b-1)+1 >> '\n';
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
rootedlca.cpp:76:33: note: no known conversion for argument 1 from ‘std::basic_ostream<char>::__ostream_type’ {aka ‘std::basic_ostream<char>’} to ‘int’
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:45,