Created
April 25, 2020 14:01
-
-
Save gauravkoradiya/1d7490d1dfcf7d4eb7a8f9b94aa87724 to your computer and use it in GitHub Desktop.
Codechef_DSA01 - Carvans - CARVANS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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