From 73b7a329b8dd024974969144a38f539daeae0c49 Mon Sep 17 00:00:00 2001 From: Harshal Sharma <60326183+harshal-509@users.noreply.github.com> Date: Sat, 4 Dec 2021 01:58:32 +0530 Subject: [PATCH] Cards.py --- CodeForces python/Cards.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 CodeForces python/Cards.py diff --git a/CodeForces python/Cards.py b/CodeForces python/Cards.py new file mode 100644 index 0000000..ab450a9 --- /dev/null +++ b/CodeForces python/Cards.py @@ -0,0 +1,15 @@ +#Author:harshal_509 +from math import * +for _ in range(1): + n=int(input()) + a=list(map(int,input().split())) + b=[] + for i in range(n): + b.append([a[i],i+1]) + b.sort() + i=0 + j=n-1 + while(i