Skip to content

Instantly share code, notes, and snippets.

@gauravkoradiya
Created April 25, 2020 14:01
Show Gist options
  • Save gauravkoradiya/1d7490d1dfcf7d4eb7a8f9b94aa87724 to your computer and use it in GitHub Desktop.
Save gauravkoradiya/1d7490d1dfcf7d4eb7a8f9b94aa87724 to your computer and use it in GitHub Desktop.
Codechef_DSA01 - Carvans - CARVANS
# https://www.codechef.com/problems/CARVANS
def main():
for T in range(int(input())):
num_cars = int(input())
speed = map(lambda x: int(x) , input().split())
count = 0
max_speed = float('inf')
for i in speed:
if i < max_speed:
max_speed = i
count+=1
print(count)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment