Problem tourist_noi
User Kavinkv
Submission Time 2025-02-20 20:51:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

tourist_noi.cpp: In function ‘int main()’:
tourist_noi.cpp:3:2: error: ‘cin’ was not declared in this scope
3 | cin >> n,x,y;
| ^~~
tourist_noi.cpp:5:2: error: expected initializer before ‘int’
5 | int sum = 0
| ^~~
tourist_noi.cpp:6:18: error: ‘i’ was not declared in this scope
6 | for (int i = 0; i < n; i++){
| ^
tourist_noi.cpp:10:3: error: ‘sum’ was not declared in this scope
10 | sum += min(arr[i]*x,y);
| ^~~
tourist_noi.cpp:10:14: error: ‘arr’ was not declared in this scope
10 | sum += min(arr[i]*x,y);
| ^~~
tourist_noi.cpp:10:10: error: ‘min’ was not declared in this scope; did you mean ‘main’?
10 | sum += min(arr[i]*x,y);
| ^~~
| main