Problem seagame
User AltheaZ
Submission Time 2023-11-06 11:12:50
Score 0
Max Time N/A
Max Memory N/A

Compile Error

seagame.cpp: In function ‘int main()’:
seagame.cpp:39:5: error: expected ‘,’ or ‘;’ before ‘int’
39 | int median=(size%2==0)?((costs[index/2]+costs[index/2-1])/2):costs[index/2];
| ^~~
seagame.cpp:40:16: error: ‘median’ was not declared in this scope
40 | cout<<cost[median];
| ^~~~~~