From 1b9d9346a189b426088eacdfca8b23d85ad7524f Mon Sep 17 00:00:00 2001 From: nwerc-082 Date: Sun, 20 Nov 2016 10:45:39 +0000 Subject: [PATCH] ... --- E.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 E.py diff --git a/E.py b/E.py new file mode 100644 index 0000000..0577113 --- /dev/null +++ b/E.py @@ -0,0 +1,7 @@ +from __future__ import print_function +import sys +n = int(sys.stdin.readline()) +ss = map(int, sys.stdin.readline().split()) +tt = sorted(enumerate(ss), key = lambda (i,x): -x) +print(" ".join(str(x[0]+1) for x in tt) if tt[0][1] <= sum(ss)-tt[0][1] + else "impossible")