Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Bolding the code

Name: Anonymous 2010-03-01 12:46

Any ideas on how I could make this program run faster?
 It's supposed to run under 0.5 seconds.
 In some cases it does, in others it fails.
 [u]The task : [/u]

 INPUT:
 From the first line of the standard input read one integer (5 <= n <= 100000). Each of the following n lines will have one of the following two formats:
 
 - 1 a - meaning that Mirko said aloud the number a, (0 <= a <= 65535).
 - 2 k - meaning that Mirko asks what is the kth smallest number he has said so far. k will always be less or equal to the number of numbers Mirko has said aloud so far.
 
 The total number of different number will not be bigger than 400, but some of the numbers can repeat!
 
 OUTPUT:
 To the standard output write one line for each of the 2 k inputs. Representing the kth smallest number at that moment.
 
 
 Input:
 7
 1 0
 1 1
 1 5
 2 1
 2 3
 1 2
 2 3
 
 Output:
 0
 5
 2

 [u]My solution : [/u]
HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN HAX MY SHITCHAN

Name: Anonymous 2010-03-01 12:47

fuck, I failed to break shitchan.

Name: Anonymous 2010-03-01 12:58

>>2
Someone already broke shiit in /sci/ http://dis.4chan.org/sci/

Name: Anonymous 2010-03-01 13:43

BREAK MY ANUS

Name: Anonymous 2010-03-01 14:42

lol why is my input box in italics

Name: Anonymous 2010-03-01 16:00

>>5
Because you HAX yourself at night.

Name: Anonymous 2010-03-12 14:35

bamp

Name: Anonymous 2010-03-12 17:04

Why would you do this? I made the ENTERPRISE thread and regretted it immediately. At the very least, it takes all the fun out of [biuo].

Footnote: global [m] could actually be considered an improvement.

Name: Anonymous 2011-01-31 19:52

<-- check em dubz

Don't change these.
Name: Email:
Entire Thread Thread List