diff options
| author | Yuval Adam <yuv.adm@gmail.com> | 2011-05-07 22:53:26 +0300 |
|---|---|---|
| committer | Yuval Adam <yuv.adm@gmail.com> | 2011-05-07 22:53:26 +0300 |
| commit | f28b907b69bdc2364fcf12489dce5e4079ff6733 (patch) | |
| tree | 182445a0906f61e91103aa5bf522386f944550aa /2011/qual | |
| parent | c67a547bf831add40ee151e8237dfdd0c51cbbf8 (diff) | |
cleanup
Diffstat (limited to '2011/qual')
| -rw-r--r-- | 2011/qual/a/a.py | 2 | ||||
| -rw-r--r-- | 2011/qual/c/c.py | 8 | ||||
| -rw-r--r-- | 2011/qual/d/d.py | 1 |
3 files changed, 3 insertions, 8 deletions
diff --git a/2011/qual/a/a.py b/2011/qual/a/a.py index 9f574da..fcdd6d8 100644 --- a/2011/qual/a/a.py +++ b/2011/qual/a/a.py @@ -15,7 +15,6 @@ for t in xrange(T): step = 0 while (prs): step += 1 - #print prs, oprs, bprs, op, bp pushed = False if oprs: if prs[0] == ('O', op): @@ -38,7 +37,6 @@ for t in xrange(T): res = step s = "Case #%d: %d\n" % (t+1, res) - #print s o.write(s) f.close() diff --git a/2011/qual/c/c.py b/2011/qual/c/c.py index b081a03..ab90c5d 100644 --- a/2011/qual/c/c.py +++ b/2011/qual/c/c.py @@ -10,10 +10,8 @@ for t in xrange(T): C = map(int, f.readline().strip().split(' ')) s, p = C, [] - s.sort() - s.reverse() - - p.append(s.pop()) + s.sort() + p.append(s.pop(0)) res = 'NO' while s: @@ -22,7 +20,7 @@ for t in xrange(T): if ss == sp: res = str(sum(s)) break - p.append(s.pop()) + p.append(s.pop(0)) s = "Case #%d: %s\n" % (t+1, res) #print s diff --git a/2011/qual/d/d.py b/2011/qual/d/d.py index ba91de5..592f9fc 100644 --- a/2011/qual/d/d.py +++ b/2011/qual/d/d.py @@ -10,7 +10,6 @@ for t in xrange(T): res = len([el[i] for i in range(len(el)) if el[i] != i+1]) s = "Case #%d: %s\n" % (t+1, res) - #print s o.write(s) f.close() |
