Created
April 25, 2020 14:01
-
-
Save gauravkoradiya/1d7490d1dfcf7d4eb7a8f9b94aa87724 to your computer and use it in GitHub Desktop.
Revisions
-
gauravkoradiya created this gist
Apr 25, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ # 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()