| Problem | potatosalad |
|---|---|
| User | lxmine |
| Submission Time | 2026-05-30 20:32:17 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
potatosalad.cpp: In function ‘int main()’:
potatosalad.cpp:9:17: error: ‘min’ was not declared in this scope; did you mean ‘std::min’?
9 | for(int i=0; i<min(d,n); i++)sum+=xyz[i];
| ^~~
| std::min
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from potatosalad.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:3456:5: note: ‘std::min’ declared here
3456 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
potatosalad.cpp:9:31: error: ‘sum’ was not declared in this scope
9 | for(int i=0; i<min(d,n); i++)sum+=xyz[i];
| ^~~
potatosalad.cpp:10:13: error: ‘sum’ was not declared in this scope
10 | std::cout<<sum<<endl;
| ^~~
potatosalad.cpp:10:18: error: ‘endl’ was not declared in this scope; did yo