You are viewing a single comment's thread. Return to all comments →
In Python 3 :
n,a= int(input()),list(map(int, input().split())) max=min=a[0];c1=c2=0 for i in range(1,n): if a[i]>max: c1+=1;max=a[i] if a[i]<min: c2+=1;min=a[i] print(c1,c2,sep=' ')
Seems like cookies are disabled on this browser, please enable them to open this website
Breaking the Records
You are viewing a single comment's thread. Return to all comments →
100 % working ,Simple and easy :-)
In Python 3 :