Problem party_noi
User Kanish
Submission Time 2024-02-27 16:02:16
Score 0
Max Time N/A
Max Memory N/A

Compile Error

party_noi.cpp:4:1: error: ‘define’ does not name a type
4 | define int long long
| ^~~~~~
party_noi.cpp:7:30: error: ‘vector’ has not been declared
7 | int maxTotalHappiness(int n, vector<int>& a) {
| ^~~~~~
party_noi.cpp:7:36: error: expected ‘,’ or ‘...’ before ‘<’ token
7 | int maxTotalHappiness(int n, vector<int>& a) {
| ^
party_noi.cpp: In function ‘int maxTotalHappiness(int, int)’:
party_noi.cpp:9:23: error: ‘a’ was not declared in this scope
9 | return max(0, a[0]);
| ^
party_noi.cpp:9:16: error: ‘max’ was not declared in this scope; did you mean ‘std::max’?
9 | return max(0, a[0]);
| ^~~
| std::max
In file included from /usr/include/c++/9/algorithm:62,
from party_noi.cpp:3:
/usr/include/c++/9/bits/stl_algo