Problem minimum
User wongethan8192
Submission Time 2026-02-28 18:32:47
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minimum.cpp: In function ‘int findMin(int, int*)’:
minimum.cpp:5:32: error: ‘begin’ was not declared in this scope
5 | int h=2147483647;for(int i:A)if(h>i)h=i;return h;
| ^
minimum.cpp:2:1: note: ‘std::begin’ is defined in header ‘<iterator>’; did you forget to ‘#include <iterator>’?
1 | #include "minimum.h"
+++ |+#include <iterator>
2 | using namespace std;
minimum.cpp:5:32: error: ‘end’ was not declared in this scope
5 | int h=2147483647;for(int i:A)if(h>i)h=i;return h;
| ^
minimum.cpp:5:32: note: ‘std::end’ is defined in header ‘<iterator>’; did you forget to ‘#include <iterator>’?