### My issue

I run my code and found that using min to get the minimum of two values consumes less than half of time spent when using if comparison.

### My code

include

using namespace std;

int main() {

int T;

cin>>T;

while(T–)

{

int N;

int min_si;

long long mx_sum=0;

cin>>N;

cin>>min_si;

mx_sum+=min_si;

for(int i=1;i<N;i++)

{

int tmp;

cin>>tmp;

if(tmp<min_si)

{

min_si=tmp;

}

mx_sum+=min_si;

}

cout<<mx_sum<<endl;

}

return 0;

}

`Problem Link: https://www.codechef.com/problems/STUPMACH`