All pastes #1808579 Raw Edit

Unnamed

public text v1 · immutable
#1808579 ·published 2010-02-24 21:26 UTC
rendered paste body
#include <iostream>
#include <fstream>
#include <set>

using namespace std;

int main()
{
	set<int> s;
	int n;
	cin >> n;

	for (int i = 0; i < n ;i++)
	{
		int temp;
		cin >> temp;

		s.insert(temp);

		set<int>::iterator p = s.begin();

		for (int j = 1; j < (s.size() + 1)/2 ; j++)
			p++;

		cout << *p << endl;
	}
	return 0;
}