Problem twomeals
User Ush
Submission Time 2024-06-24 14:22:14
Score 0
Max Time N/A
Max Memory N/A

Compile Error

twomeals.cpp: In function ‘int main()’:
twomeals.cpp:4:5: error: ‘cin’ was not declared in this scope
4 | cin>>n;
| ^~~
twomeals.cpp:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
+++ |+#include <iostream>
1 | using namespace std;
twomeals.cpp:21:25: error: ‘max’ was not declared in this scope
21 | ans=max(ans,sum);
| ^~~
twomeals.cpp:26:5: error: ‘cout’ was not declared in this scope
26 | cout<<ans;
| ^~~~
twomeals.cpp:26:5: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?