Name: Anonymous 2010-08-31 8:10
Discuss.
#include <stdio.h>
int main(){
unsigned short int * a;
unsigned int n,j,x,y;
int m=-1;
scanf("%u",&n);
a=new unsigned short int[n];
while (n>0){
n=n-1;
scanf("%u %u",&x,&y);
if (x==1){
m=m+1;
j=m;
a[j]=y;
while((j>0)&&(a[j]<a[j-1])){
y=a[j-1];
a[j-1]=a[j];
a[j]=y;
j=j-1;
}
}
else printf("%u\n",a[y-1]);
}
delete [] a;
return 0;
} if resp.getheader('Content-Encoding') == 'gzip':
return gzip.GzipFile(fileobj=StringIO(resp.read()))
else:
return resp
(defun some-function (signal-error)
(block nil
(ignore-errors
(unwind-protect
;; the return form is unneeded as
;; returns are implicit in CL, but I've
;; included it to illustrate the point
(return
(prog1
(print "In RETURN")
(when signal-error
(error "Oh no. Something bad happened."))
(print "In PROG1")))
(print "In protected area")))))
(some-function nil)
; Prints
;"In RETURN"
;"In PROG1"
;"In protected area"
(some-function t)
; Prints
;"In RETURN"
;"In protected area" if resp.getheader('Content-Encoding') == 'gzip':
return gzip.GzipFile(fileobj=StringIO(resp.read())) try:
if resp.getheader('Content-Encoding') == 'gzip': return gzip.GzipFile(fileobj=StringIO(resp.read()))
else: return resp
except: passdef getval(testval):
if testval == 10: return 'a'
elif testval == 21: return 'b'
else: return 'c'def getval(test):
if testval == 0: return 'a'
if testval == 1: return 'b'
return 'c'