Problem penguingathering
User christal
Submission Time 2023-12-09 12:00:08
Score 0
Max Time N/A
Max Memory N/A

Compile Error

penguingathering.cpp: In function ‘int main()’:
penguingathering.cpp:8:11: error: ‘i’ was not declared in this scope
8 | cin >> N[i];
| ^
penguingathering.cpp:10:17: error: ‘X’ was not declared in this scope
10 | diff[i] = K - X[i];
| ^
penguingathering.cpp:12:9: error: no match for ‘operator>>’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘int’)
12 | cout >> min_diff;
| ~~~~ ^~ ~~~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
penguingathering.cpp:12:9: note: candidate: ‘operator>>(int, int)’ <built-in>
12 | cout >> min_diff;
| ~~~~~^~~~~~~~~~~
penguingathering.cpp:12:9: note: no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘int’
In file included from /usr/include/x86_64-linux-g